## 64 Reputation

16 years, 31 days

## Sorry, I was wrong about fsolve...

It does return more than one real root

## ok, thanks...

It´s sort of strange that fsolve misses some roots of piecewise polynomials, every human understands that it is fundamentally the same problem as computing the rules of a single one.

## Thank you guys...

It is actually a differentiable spline, which makes things easier. The only problem that I see with the code above is that fsolve only returns a single root, whereas there may be more than one root (i.e. more than a single maximum or minimum) between critical points

Now I am coming to the next step in my calculations, which involves numerically computing double integrals of the form int(int(exp(arg(y)),y=x..critpoints[i+1])*exp(-arg(x)),x=critpoints[i]..critpoints[i+1]), where arg(.) is my piecewise cubic spline. Direct computation via piecewise takes ages, so I think I´ll follow the strategy you outlined above and break down the piecewise into single polynomials, unless anyone´s got a better idea.

## Here is the polynomial, acer...

In the original problem, I must compute the local maxima and minima of the  piecewise polynomial below in the interval x=0..12.8. I thought of doing these from the roots of the derivative and the signs of the second derivative. Any suggestions are wellcome.

piecewise(x < .38554217e-1,4.750000000-.382466870000000015e-1*x+898.208321299999966*x^3,x < .77108433e-1,4.647050858+3.96711836299999998*x+103.889155602222345*(x-.38554217e-1)^2-1873.60840400000006*(x-.38554217e-1)^3,x < .115662650,4.720643960+3.62289867899999996*x-112.817353836505788*(x-.77108433e-1)^2+2233.83630899999980*(x-.77108433e-1)^3,x < .154216867,4.534983634+4.88503735499999968*x+145.554075626365546*(x-.115662650)^2-1826.87048400000004*(x-.115662650)^3,x < .192771084,4.172132739+7.96195179299999988*x-65.7466076033863374*(x-.154216867)^2-161.220652099999995*(x-.154216867)^3,x < .231325301,5.181030297+2.17340533700000016*x-84.3938156159177311*(x-.192771084)^2+726.797664700000042*(x-.192771084)^3,x < .257028112,5.852855486-1.09307319400000002*x-.330470998512789826*(x-.231325301)^2-1277.17414099999996*(x-.231325301)^3,x < .295582329,6.485915728-3.64129713499999985*x-98.8113676701225928*(x-.257028112)^2+1522.70584099999997*(x-.257028112)^3,x < .334136546,6.671344868-4.47031076800000006*x+77.3088266533976736*(x-.295582329)^2-1615.21181299999989*(x-.295582329)^3,x < .372690763,7.108532719-5.71183470400000015*x-109.510853612231854*(x-.334136546)^2+1448.23055900000008*(x-.334136546)^3,x < .411244980,7.768964288-7.69797530099999960*x+57.9953320611959810*(x-.372690763)^2-687.799567700000012*(x-.372690763)^3,x < .449799196,7.238021800-6.29313894700000010*x-21.5573893013158228*(x-.411244980)^2+430.489891699999987*(x-.411244980)^3,x < .488353413,7.114861688-6.03571930000000023*x+28.2342115299776531*(x-.449799196)^2-161.682003500000008*(x-.449799196)^3,x < .526907630,6.436467815-4.57960926600000028*x+9.53364238689634291*(x-.488353413)^2+216.238013200000012*(x-.488353413)^3,x < .565461847,5.567609128-2.88021854700000012*x+34.5443042536732392*(x-.526907630)^2+169.207662400000004*(x-.526907630)^3,x < .604016064,3.695790856+.537983501699999976*x+54.1153110533832518*(x-.565461847)^2-893.068662300000028*(x-.565461847)^3,x < .642570281,3.610104439+.728284539300000034*x-49.1793779084837510*(x-.604016064)^2+785.633844700000054*(x-.604016064)^3,x < .681124498,3.767588222+.439503329300000022*x+41.6891153011904906*(x-.642570281)^2-504.511290299999984*(x-.642570281)^3,x < .719678715,3.143478387+1.40432713199999992*x-16.6639980169169598*(x-.681124498)^2-512.544109700000035*(x-.681124498)^3,x < .758232931,5.658958582-2.16618686900000012*x-75.9462085128839278*(x-.719678715)^2+809.732227299999976*(x-.719678715)^3,x < .796787148,7.294910453-4.41145499799999996*x+17.7095650725011602*(x-.758232931)^2-108.951420499999998*(x-.758232931)^3,x < .835341365,6.614047735-3.53174337999999999*x+5.10795495295818114*(x-.796787148)^2-373.926582699999983*(x-.796787148)^3,x < .873895582,7.664083741-4.80532140399999985*x-38.1413848843338812*(x-.835341365)^2+732.180037299999981*(x-.835341365)^3,x < .912449799,7.366228392-4.48134590999999994*x+46.5444992531410834*(x-.873895582)^2-809.838138999999954*(x-.873895582)^3,x < .951004016,7.409372660-4.50366986199999975*x-47.1235267969942200*(x-.912449799)^2+762.217090999999982*(x-.912449799)^3,x < .989558233,7.606189447-4.73834954500000017*x+41.0365226035995434*(x-.951004016)^2-494.074797699999976*(x-.951004016)^3,x < 1.028112449,6.687865112-3.77730686999999988*x-16.1094782861676826*(x-.989558233)^2+341.604325000000017*(x-.989558233)^3,x < 1.066666666,6.394459208-3.49617321699999994*x+23.4013825311153809*(x-1.028112449)^2+.135389080800000006*(x-1.028112449)^3,x < 1.105220883,4.503867219-1.69112551900000006*x+23.4170419924870146*(x-1.066666666)^2-342.145947299999989*(x-1.066666666)^3,x < 1.143775100,4.209687344-1.41119966899999993*x-16.1564652995146645*(x-1.105220883)^2+495.970687300000008*(x-1.105220883)^3,x < 1.182329317,3.109352539-.445325780700000008*x+41.2088192055716363*(x-1.143775100)^2-769.259088300000030*(x-1.143775100)^3,x < 1.220883534,3.425410341-.698122197300000024*x-47.7657262434106188*(x-1.182329317)^2+836.110238699999968*(x-1.182329317)^3,x < 1.259437751,3.347005491-.652810419000000031*x+48.9410004887095838*(x-1.220883534)^2-830.226439300000038*(x-1.220883534)^3,x < 1.297991967,3.282062192-.581261115300000020*x-47.0851904320664545*(x-1.259437751)^2+739.840076700000054*(x-1.259437751)^3,x < 1.336546184,3.684768458-.912770254300000028*x+38.4866719480863040*(x-1.297991967)^2-384.178300299999989*(x-1.297991967)^3,x < 1.375100401,2.043279439+.341717006699999992*x-5.94840873788101466*(x-1.336546184)^2-75.6045982699999968*(x-1.336546184)^3,x < 1.413654618,3.124430027-.454097771300000008*x-14.6930369965622436*(x-1.375100401)^2+686.596693299999970*(x-1.375100401)^3,x < 1.452208835,.415320175+1.47467408100000008*x+64.7205567241299918*(x-1.413654618)^2-925.826748299999962*(x-1.413654618)^3,x < 1.490763052,-.793305844+2.33665142499999989*x-42.3630194190476672*(x-1.452208835)^2+399.277162999999972*(x-1.452208835)^3,x < 1.529317269,1.381964130+.850595181999999950*x+3.81843575051193618*(x-1.490763052)^2+201.195809300000008*(x-1.490763052)^3,x < 1.567871485,-.423198985+2.04221782400000018*x+27.0892764169999190*(x-1.529317269)^2-331.582641099999989*(x-1.529317269)^3,x < 1.606425702,-1.358635986+2.65240871200000018*x-11.2624498903889574*(x-1.567871485)^2+252.656909399999989*(x-1.567871485)^3,x < 1.644979919,-1.775738931+2.91064748599999978*x+17.9605180495069448*(x-1.606425702)^2-679.044961299999954*(x-1.606425702)^3,x < 1.683534136,.914985829+1.26750129100000008*x-60.5796223076388216*(x-1.644979919)^2+718.567508999999972*(x-1.644979919)^3,x < 1.709236947,3.335701217-.199402678999999998*x+22.5318007001383016*(x-1.683534136)^2-574.792778300000010*(x-1.683534136)^3,x < 1.747791164,3.308218592-.180325257000000017*x-21.7895697373981712*(x-1.709236947)^2-185.996230200000014*(x-1.709236947)^3,x < 1.786345381,7.651374145-2.68989467500000012*x-43.3023868034313466*(x-1.747791164)^2+315.359651400000018*(x-1.747791164)^3,x < 1.824899598,11.05755300-4.62259599300000002*x-6.82705350384897969*(x-1.786345381)^2-202.964663199999990*(x-1.786345381)^3,x < 1.863453815,13.64811783-6.05409626099999976*x-30.3024845124090128*(x-1.824899598)^2+496.499003700000002*(x-1.824899598)^3,x < 1.902008032,13.85989054-6.17664384800000032*x+27.1239064816237594*(x-1.863453815)^2-910.553639999999973*(x-1.863453815)^3,x < 1.940562248,17.59295519-8.14557821400000038*x-78.1931414140860284*(x-1.902008032)^2+1400.75999200000001*(x-1.902008032)^3,x < 1.979116465,17.13583302-7.92854392200000024*x+83.8224684738739114*(x-1.940562248)^2-1202.57497600000011*(x-1.940562248)^3,x < 2.017670682,15.01290596-6.82774672599999999*x-55.2705413425312173*(x-1.979116465)^2+792.106631699999980*(x-1.979116465)^3,x < 2.056224899,16.44823147-7.55734402299999974*x+36.3466115650146904*(x-2.017670682)^2-220.896122800000001*(x-2.017670682)^3,x < 2.081927710,12.75222105-5.73975203500000042*x+10.7971804137087268*(x-2.056224899)^2-565.673473299999956*(x-2.056224899)^3,x < 2.120481927,13.92827490-6.30582648700000004*x-32.8210147062028384*(x-2.081927710)^2+731.175872300000037*(x-2.081927710)^3,x < 2.171887550,12.37398415-5.57608343600000022*x+51.7487250337185502*(x-2.120481927)^2-368.856359699999984*(x-2.120481927)^3,x < 2.223293172,7.256349297-3.17988346000000010*x-5.13514786760770470*(x-2.171887550)^2+199.009496899999988*(x-2.171887550)^3,x < 2.261847389,4.935978950-2.13016394299999989*x+25.5554730422615820*(x-2.223293172)^2-102.246689300000000*(x-2.223293172)^3,x < 2.300401606,1.542321676-.615568354700000042*x+13.7293498995184732*(x-2.261847389)^2+58.0210005699999982*(x-2.261847389)^3,x < 2.338955823,-1.464450313+.701812374299999986*x+20.4402126390257984*(x-2.300401606)^2-129.837312999999994*(x-2.300401606)^3,x < 2.441767068,-3.773754602+1.69894384599999992*x+5.42288482373958747*(x-2.338955823)^2-29.4380708400000018*(x-2.338955823)^3,x < 2.506024096,-4.191782694+1.88051626800000004*x-3.65680931665222264*(x-2.441767068)^2-21.6254078300000004*(x-2.441767068)^3,x < 2.583132529,-2.363616623+1.14269317199999998*x-7.82556262598200103*(x-2.506024096)^2+18.3596572000000009*(x-2.506024096)^3,x < 2.685943774,-.1302499882+.263343045900000017*x-3.57850943406649690*(x-2.583132529)^2+9.89275871299999920*(x-2.583132529)^3,x < 2.814457831,.9764609422-.158775081699999988*x-.527248914967910598*(x-2.685943774)^2+13.7161455500000004*(x-2.685943774)^3,x < 2.865863453,-.5344361020+.385309060300000006*x+4.76090361950732444*(x-2.814457831)^2-238.424680700000010*(x-2.814457831)^3,x < 2.904417670,3.459869741-1.01535533300000003*x-32.0082033990760380*(x-2.865863453)^2+640.819320999999945*(x-2.865863453)^3,x < 2.942971887,2.317767856-.625863103299999946*x+42.1106580656907212*(x-2.904417670)^2-671.193345300000033*(x-2.904417670)^3,x < 2.981526104,1.594247693-.371817243000000020*x-35.5213435843255780*(x-2.942971887)^2+298.998633299999994*(x-2.942971887)^3,x < 3.032931726,5.749641523-1.77749291399999998*x-.938369007749672578*(x-2.981526104)^2-45.2527698299999983*(x-2.981526104)^3,x < 3.097188754,7.121669996-2.23271428699999986*x-7.91710935039076435*(x-3.032931726)^2+98.5886623699999946*(x-3.032931726)^3,x < 3.199999999,6.484092291-2.02896652100000008*x+11.0879339629720111*(x-3.097188754)^2-7.91417408299999980*(x-3.097188754)^3,x < 3.302811244,.1000000070-.219999999999999984e-8*x+8.64693568824657356*(x-3.199999999)^2+7.91417450299999992*(x-3.199999999)^3,x < 3.367068272,-6.501293469+2.02896652999999994*x+11.0879340933456820*(x-3.302811244)^2-98.5886665700000010*(x-3.302811244)^3,x < 3.418473895,-7.167701349+2.23271426099999993*x-7.91711002833386246*(x-3.367068272)^2+45.2527798300000015*(x-3.367068272)^3,x < 3.457028112,-5.626313060+1.77749289499999996*x-.938368011349824172*(x-3.418473895)^2-298.998646600000028*(x-3.418473895)^3,x < 3.495582328,-.7853826570+.371817241700000023*x-35.5213441193645140*(x-3.457028112)^2+671.193370699999946*(x-3.457028112)^3,x < 3.534136545,-1.687755957+.625863089999999956*x+42.1106584590221047*(x-3.495582328)^2-640.819322299999953*(x-3.495582328)^3,x < 3.585542168,-3.038404424+1.01535534299999997*x-32.0082031742070967*(x-3.534136545)^2+238.424675000000008*(x-3.534136545)^3,x < 3.714056224,1.931541888-.385309061700000010*x+4.76090369017219662*(x-3.585542168)^2-13.7161459600000004*(x-3.585542168)^3,x < 3.816867469,-.396995733e-1+.158775079799999996*x-.527248957815950936*(x-3.714056224)^2-9.89275811999999986*(x-3.714056224)^3,x < 3.893975903,1.555145474-.263343037800000013*x-3.57850929353081958*(x-3.816867469)^2-18.3596578699999995*(x-3.816867469)^3,x < 3.958232931,4.949619669-1.14269317000000004*x-7.82556269319159270*(x-3.893975903)^2+21.6254082899999994*(x-3.893975903)^3,x < 4.061044176,7.843521419-1.88051626800000004*x-3.65680929493665640*(x-3.958232931)^2+29.4380706799999992*(x-3.958232931)^3,x < 4.099598393,7.099486015-1.69894384700000000*x+5.42288479516999367*(x-4.061044176)^2+129.837314499999990*(x-4.061044176)^3,x < 4.138152609,3.027148867-.701812370700000021*x+20.4402127906279852*(x-4.099598393)^2-58.0209960999999979*(x-4.099598393)^3,x < 4.176706826,-2.397315824+.615568362300000006*x+13.7293507381204130*(x-4.138152609)^2+102.246662499999999*(x-4.138152609)^3,x < 4.228112449,-8.697070085+2.13016389600000000*x+25.5554707786297116*(x-4.176706826)^2-199.009458499999994*(x-4.176706826)^3,x < 4.279518071,-13.09490491+3.17988347500000000*x-5.13514479470490848*(x-4.228112449)^2+368.856335999999998*(x-4.228112449)^3,x < 4.318072288,-23.31294999+5.57608347399999982*x+51.7487233159829644*(x-4.279518071)^2-731.175852999999961*(x-4.279518071)^3,x < 4.343775099,-26.42901456+6.30582647600000001*x-32.8210142016599066*(x-4.318072288)^2+565.673467699999946*(x-4.318072288)^3,x < 4.382329316,-23.98219199+5.73975204200000011*x+10.7971804675974514*(x-4.343775099)^2+220.896117800000013*(x-4.343775099)^3,x < 4.420883533,-31.91877020+7.55734400900000036*x+36.3466110490236503*(x-4.382329316)^2-792.106610000000046*(x-4.382329316)^3,x < 4.459437750,-28.68467328+6.82774677400000041*x-55.2705393324557903*(x-4.420883533)^2+1202.57489400000009*(x-4.420883533)^3,x < 4.497991967,-33.60684731+7.92854375299999958*x+83.8224609495632224*(x-4.459437750)^2-1400.75982500000009*(x-4.459437750)^3,x < 4.536546184,-34.53874466+8.14557805499999966*x-78.1931338033245851*(x-4.497991967)^2+910.553549299999986*(x-4.497991967)^3,x < 4.575100401,-25.67063019+6.17664387199999964*x+27.1239036012625263*(x-4.536546184)^2-496.498944999999992*(x-4.536546184)^3,x < 4.613654617,-25.09809852+6.05409632399999964*x-30.3024806017255237*(x-4.575100401)^2+202.964598899999999*(x-4.575100401)^3,x < 4.652208834,-18.52706177+4.62259608599999972*x-6.82705764023970296*(x-4.613654617)^2-315.359605900000020*(x-4.613654617)^3,x < 4.690763051,-9.563951650+2.68989464900000018*x-43.3023856836760999*(x-4.652208834)^2+185.996217599999994*(x-4.652208834)^3,x < 4.716465862,2.154136922+.180325262500000000*x-21.7895700800284332*(x-4.690763051)^2+574.792782999999986*(x-4.690763051)^3,x < 4.755020079,2.059524083+.199402676700000002*x+22.5318007336567234*(x-4.716465862)^2-718.567508299999986*(x-4.716465862)^3,x < 4.793574296,9.026994079-1.26750128899999992*x-60.5796221909467150*(x-4.755020079)^2+679.044955699999946*(x-4.755020079)^3,x < 4.832128513,16.85240503-2.91064749699999981*x+17.9605175492200858*(x-4.793574296)^2-252.656888900000013*(x-4.793574296)^3,x < 4.870682730,15.61677956-2.65240866999999980*x-11.2624480059336350*(x-4.832128513)^2+331.582599500000015*(x-4.832128513)^3,x < 4.909236947,12.64699481-2.04221776799999999*x+27.0892744745144540*(x-4.870682730)^2-201.195796199999990*(x-4.870682730)^3,x < 4.947791163,6.825773473-.850595218299999956*x+3.81843530942456599*(x-4.909236947)^2-399.277167700000006*(x-4.909236947)^3,x < 4.986345380,14.16126330-2.33665142999999986*x-42.3630191807346890*(x-4.947791163)^2+925.826746699999944*(x-4.947791163)^3,x < 5.024899597,9.853234276-1.47467407800000006*x+64.7205566812369568*(x-4.986345380)^2-686.596693299999970*(x-4.986345380)^3,x < 5.063453814,.218204302+.454097769300000009*x-14.6930370633030912*(x-5.024899597)^2+75.6046014700000058*(x-5.024899597)^3,x < 5.102008031,4.230268243-.341716999299999991*x-5.94840842802460478*(x-5.063453814)^2+384.178287699999998*(x-5.063453814)^3,x < 5.140562248,-2.156961034+.912770227999999961*x+38.4866707754015068*(x-5.102008031)^2-739.840038299999946*(x-5.102008031)^3,x < 5.179116465,-.438008740+.581261075300000041*x-47.0851893942201443*(x-5.140562248)^2+830.226439300000038*(x-5.140562248)^3,x < 5.217670681,-.830981397+.652810459000000010*x+48.9410015221178014*(x-5.179116465)^2-836.110280300000000*(x-5.179116465)^3,x < 5.256224898,-1.042571869+.698122225700000042*x-47.7657275471864012*(x-5.217670681)^2+769.259102999999982*(x-5.217670681)^3,x < 5.294779115,.259267579+.445325774000000008*x+41.2088196110141922*(x-5.256224898)^2-495.970693299999994*(x-5.256224898)^3,x < 5.333333332,-4.821990519+1.41119966599999991*x-16.1564656175090846*(x-5.294779115)^2+342.145957699999997*(x-5.294779115)^3,x < 5.371887549,-6.319336195+1.69112553700000000*x+23.4170428590221463*(x-5.333333332)^2-.135423836999999992*(x-5.333333332)^3,x < 5.410441766,-15.98104900+3.49617314800000000*x+23.4013793829692603*(x-5.371887549)^2-341.604262000000006*(x-5.371887549)^3,x < 5.448995983,-17.48689851+3.77730680599999990*x-16.1094751374754317*(x-5.410441766)^2+494.074757999999974*(x-5.410441766)^3,x < 5.487550200,-22.71924765+4.73834954700000033*x+41.0365211669324665*(x-5.448995983)^2-762.217056299999967*(x-5.448995983)^3,x < 5.526104416,-21.41411474+4.50366991399999961*x-47.1235241990181564*(x-5.487550200)^2+809.838116700000000*(x-5.487550200)^3,x < 5.564658633,-21.31438573+4.48134596500000004*x+46.5444968418689130*(x-5.526104416)^2-732.180012700000020*(x-5.526104416)^3,x < 5.603212850,-23.08997313+4.80532138600000014*x-38.1413844262418351*(x-5.564658633)^2+373.926583699999981*(x-5.564658633)^3,x < 5.641767067,-15.98911000+3.53174339999999987*x+5.10795553186215479*(x-5.603212850)^2+108.951391500000000*(x-5.603212850)^3,x < 5.680321284,-20.93840116+4.41145493400000000*x+17.7095622987932196*(x-5.641767067)^2-809.732149700000036*(x-5.641767067)^3,x < 5.718875501,-8.204636900+2.16618678499999984*x-75.9462047270350382*(x-5.680321284)^2+512.544067700000028*(x-5.680321284)^3,x < 5.757429718,12.13117192-1.40432711200000004*x-16.6639991249868444*(x-5.718875501)^2+504.511305699999980*(x-5.718875501)^3,x < 5.795983934,6.580409516-.439503326999999998*x+41.6891159476211400*(x-5.757429718)^2-785.633875999999986*(x-5.757429718)^3,x < 5.834538151,8.271125420-.728284527300000040*x-49.1793784991036986*(x-5.795983934)^2+893.068669000000000*(x-5.795983934)^3,x < 5.873092368,7.138885273-.537983502999999974*x+54.1153112995635723*(x-5.834538151)^2-169.207667899999990*(x-5.834538151)^3,x < 5.911646585,-12.86578952+2.88021853899999990*x+34.5443038595719260*(x-5.873092368)^2-216.237998400000010*(x-5.873092368)^3,x < 5.950200802,-22.87303164+4.57960929399999994*x+9.53364371712125624*(x-5.911646585)^2+161.681949300000014*(x-5.911646585)^3,x < 5.988755019,-31.51374118+6.03571919300000026*x+28.2342066031793167*(x-5.950200802)^2-430.489801300000011*(x-5.950200802)^3,x < 6.027309236,-33.03806669+6.29313882000000024*x-21.5573850579772534*(x-5.988755019)^2+687.799544699999956*(x-5.988755019)^3,x < 6.065863452,-41.49807820+7.69797539600000034*x+57.9953336287296750*(x-6.027309236)^2-1448.23056399999996*(x-6.027309236)^3,x < 6.104417669,-29.44721184+5.71183511100000008*x-109.510848395134984*(x-6.065863452)^2+1615.21140399999990*(x-6.065863452)^3,x < 6.142971886,-21.93863782+4.47030974900000012*x+77.3087844783552356*(x-6.104417669)^2-1522.70406400000002*(x-6.104417669)^3,x < 6.168674697,-16.81840842+3.64130079599999990*x-98.8112041870496968*(x-6.142971886)^2+1277.16224000000012*(x-6.142971886)^3,x < 6.207228914,-1.142741878+1.09306167199999992*x-.331225151319192834*(x-6.168674697)^2-726.770352300000014*(x-6.168674697)^3,x < 6.245783131,19.09050092-2.17335321600000020*x-84.3914107619566068*(x-6.207228914)^2+161.123212400000000*(x-6.207228914)^3,x < 6.284337348,55.12985436-7.96214875099999996*x-65.7554728664243698*(x-6.245783131)^2+1827.23292999999990*(x-6.245783131)^3,x < 6.322891565,35.79459927-4.88430164800000010*x+145.587131824556536*(x-6.284337348)^2-2235.18865400000004*(x-6.284337348)^3,x < 6.361445782,27.92455732-3.62564454600000019*x-112.940713366231776*(x-6.322891565)^2+1878.65540499999998*(x-6.322891565)^3,x < 6.399999999,29.97141451-3.95687008400000018*x+104.349551055710592*(x-6.361445782)^2-917.044398300000012*(x-6.361445782)^3,x < 6.438554217,4.750000371-.580000000000000032e-7*x-1.71823512227677488*(x-6.399999999)^2+917.044405699999970*(x-6.399999999)^3,x < 6.477108433,-20.67652341+3.95687021499999992*x+104.349554729060912*(x-6.438554217)^2-1878.65552499999990*(x-6.438554217)^3,x < 6.515662650,-18.48369354+3.62564464999999992*x-112.940717975716240*(x-6.477108433)^2+2235.18870500000003*(x-6.477108433)^3,x < 6.554216867,-26.72446163+4.88430161900000036*x+145.587133061910890*(x-6.515662650)^2-1827.23294400000009*(x-6.515662650)^3,x < 6.592771084,-46.78564967+7.96214875600000038*x-65.7554732063572090*(x-6.554216867)^2-161.123208500000004*(x-6.554216867)^3,x < 6.631325301,-8.728420240+2.17335321699999984*x-84.3914106395795472*(x-6.592771084)^2+726.770350000000008*(x-6.592771084)^3,x < 6.657028112,12.84844753-1.09306167400000008*x-.331225300894636698*(x-6.631325301)^2-1277.16223100000002*(x-6.631325301)^3,x < 6.695582329,29.79024170-3.64130078599999996*x-98.8112036227380628*(x-6.657028112)^2+1522.70404299999996*(x-6.657028112)^3,x < 6.734136546,35.28132724-4.47030978999999996*x+77.3087826970334789*(x-6.695582329)^2-1615.21133099999997*(x-6.695582329)^3,x < 6.772690763,43.66427659-5.71183496599999962*x-109.510841834159592*(x-6.734136546)^2+1448.23042899999996*(x-6.734136546)^3,x < 6.811244980,57.03600574-7.69797523100000002*x+57.9953289052710374*(x-6.772690763)^2-687.799533300000008*(x-6.772690763)^3,x < 6.849799196,47.51411119-6.29313896599999988*x-21.5573884556882760*(x-6.811244980)^2+430.489882700000010*(x-6.811244980)^3,x < 6.888353413,45.74346517-6.03571929499999982*x+28.2342113033924420*(x-6.849799196)^2-161.682001000000014*(x-6.849799196)^3,x < 6.926907630,35.74596712-4.57960926700000038*x+9.53364244760967061*(x-6.888353413)^2+216.238012599999990*(x-6.888353413)^3,x < 6.965461847,24.00100782-2.88021854499999996*x+34.5443042374051502*(x-6.926907630)^2+169.207662499999998*(x-6.926907630)^3,x < 7.004016064,.252696445+.537983501699999976*x+54.1153110577422751*(x-6.965461847)^2-893.068662300000028*(x-6.965461847)^3,x < 7.042570281,-1.050916612+.728284539300000034*x-49.1793779096517483*(x-7.004016064)^2+785.633844700000054*(x-7.004016064)^3,x < 7.081124498,.954766915+.439503329300000022*x+41.6891153015034562*(x-7.042570281)^2-504.511290299999984*(x-7.042570281)^3,x < 7.119678715,-5.844215258+1.40432713199999992*x-16.6639980170008216*(x-7.081124498)^2-512.544109700000035*(x-7.081124498)^3,x < 7.158232931,19.52255454-2.16618686900000012*x-75.9462085128614462*(x-7.119678715)^2+809.732227299999976*(x-7.119678715)^3,x < 7.196787148,35.52822244-4.41145499799999996*x+17.7095650724951348*(x-7.158232931)^2-108.951420499999998*(x-7.158232931)^3,x < 7.235341365,29.21720537-3.53174337999999999*x+5.10795495295979496*(x-7.196787148)^2-373.926582699999983*(x-7.196787148)^3,x < 7.273895582,38.41814073-4.80532140399999985*x-38.1413848843343146*(x-7.235341365)^2+732.180037299999981*(x-7.235341365)^3,x < 7.312449799,36.04684222-4.48134590999999994*x+46.5444992531412112*(x-7.273895582)^2-809.838138999999954*(x-7.273895582)^3,x < 7.351004016,36.23285978-4.50366986199999975*x-47.1235267969942555*(x-7.312449799)^2+762.217090999999982*(x-7.312449799)^3,x < 7.389558233,37.93162653-4.73834954500000017*x+41.0365226035995505*(x-7.351004016)^2-494.074797699999976*(x-7.351004016)^3,x < 7.428112449,30.86262908-3.77730686999999988*x-16.1094782861676862*(x-7.389558233)^2+341.604325000000017*(x-7.389558233)^3,x < 7.466666666,28.76996780-3.49617321699999994*x+23.4013825311153809*(x-7.428112449)^2+.135389080800000006*(x-7.428112449)^3,x < 7.505220883,15.32707054-1.69112551900000006*x+23.4170419924870146*(x-7.466666666)^2-342.145947299999989*(x-7.466666666)^3,x < 7.543775100,13.24136523-1.41119966899999993*x-16.1564652995146645*(x-7.505220883)^2+495.970687300000008*(x-7.505220883)^3,x < 7.582329317,5.959437536-.445325780700000008*x+41.2088192055716363*(x-7.543775100)^2-769.259088300000030*(x-7.543775100)^3,x < 7.620883534,7.893392403-.698122197300000024*x-47.7657262434106188*(x-7.582329317)^2+836.110238699999968*(x-7.582329317)^3,x < 7.659437751,7.524992173-.652810419000000031*x+48.9410004887095838*(x-7.620883534)^2-830.226439300000038*(x-7.620883534)^3,x < 7.697991967,7.002133330-.581261115300000020*x-47.0851904320664545*(x-7.659437751)^2+739.840076700000054*(x-7.659437751)^3,x < 7.736546184,9.526498085-.912770254300000028*x+38.4866719480863040*(x-7.697991967)^2-384.178300299999989*(x-7.697991967)^3,x < 7.775100401,-.143709404+.341717006699999992*x-5.94840873788101466*(x-7.736546184)^2-75.6045982699999968*(x-7.736546184)^3,x < 7.813654618,6.030655764-.454097771300000008*x-14.6930369965622436*(x-7.775100401)^2+686.596693299999970*(x-7.775100401)^3,x < 7.852208835,-9.022593940+1.47467408100000008*x+64.7205567241299918*(x-7.813654618)^2-925.826748299999962*(x-7.813654618)^3,x < 7.890763052,-15.74787496+2.33665142499999989*x-42.3630194190476672*(x-7.852208835)^2+399.277162999999972*(x-7.852208835)^3,x < 7.929317269,-4.061845034+.850595181999999950*x+3.81843575051193618*(x-7.890763052)^2+201.195809300000008*(x-7.890763052)^3,x < 7.967871485,-13.49339306+2.04221782400000018*x+27.0892764169999190*(x-7.929317269)^2-331.582641099999989*(x-7.929317269)^3,x < 8.006425702,-18.33405174+2.65240871200000018*x-11.2624498903889574*(x-7.967871485)^2+252.656909399999989*(x-7.967871485)^3,x < 8.044979919,-20.40388284+2.91064748599999978*x+17.9605180495069448*(x-8.006425702)^2-679.044961299999954*(x-8.006425702)^3,x < 8.083534136,-7.19702243+1.26750129100000008*x-60.5796223076388216*(x-8.044979919)^2+718.567508999999972*(x-8.044979919)^3,x < 8.109236947,4.611878363-.199402678999999998*x+22.5318007001383016*(x-8.083534136)^2-574.792778300000010*(x-8.083534136)^3,x < 8.147791164,4.462300237-.180325257000000017*x-21.7895697373981712*(x-8.109236947)^2-185.996230200000014*(x-8.109236947)^3,x < 8.186345381,24.86670007-2.68989467500000012*x-43.3023868034313466*(x-8.147791164)^2+315.359651400000018*(x-8.147791164)^3,x < 8.224899598,40.64216736-4.62259599300000002*x-6.82705350384897969*(x-8.186345381)^2-202.964663199999990*(x-8.186345381)^3,x < 8.263453815,52.39433390-6.05409626099999976*x-30.3024845124090128*(x-8.224899598)^2+496.499003700000002*(x-8.224899598)^3,x < 8.302008032,53.39041117-6.17664384800000032*x+27.1239064816237594*(x-8.263453815)^2-910.553639999999973*(x-8.263453815)^3,x < 8.340562248,69.72465576-8.14557821400000038*x-78.1931414140860284*(x-8.302008032)^2+1400.75999200000001*(x-8.302008032)^3,x < 8.379116465,67.87851412-7.92854392200000024*x+83.8224684738739114*(x-8.340562248)^2-1202.57497600000011*(x-8.340562248)^3,x < 8.417670682,58.71048501-6.82774672599999999*x-55.2705413425312173*(x-8.379116465)^2+792.106631699999980*(x-8.379116465)^3,x < 8.456224899,64.81523322-7.55734402299999974*x+36.3466115650146904*(x-8.417670682)^2-220.896122800000001*(x-8.417670682)^3,x < 8.481927710,49.48663407-5.73975203500000042*x+10.7971804137087268*(x-8.456224899)^2-565.673473299999956*(x-8.456224899)^3,x < 8.520481927,54.28556441-6.30582648700000004*x-32.8210147062028384*(x-8.481927710)^2+731.175872300000037*(x-8.481927710)^3,x < 8.571887550,48.06091814-5.57608343600000022*x+51.7487250337185502*(x-8.520481927)^2-368.856359699999984*(x-8.520481927)^3,x < 8.623293172,27.60760344-3.17988346000000010*x-5.13514786760770470*(x-8.571887550)^2+199.009496899999988*(x-8.571887550)^3,x < 8.661847389,18.56902818-2.13016394299999989*x+25.5554730422615820*(x-8.623293172)^2-102.246689300000000*(x-8.623293172)^3,x < 8.700401606,5.481959146-.615568354700000042*x+13.7293498995184732*(x-8.661847389)^2+58.0210005699999982*(x-8.661847389)^3,x < 8.738955823,-5.956049508+.701812374299999986*x+20.4402126390257984*(x-8.700401606)^2-129.837312999999994*(x-8.700401606)^3,x < 8.841767068,-14.64699522+1.69894384599999992*x+5.42288482373958747*(x-8.738955823)^2-29.4380708400000018*(x-8.738955823)^3,x < 8.906024096,-16.22708681+1.88051626800000004*x-3.65680931665222264*(x-8.841767068)^2-21.6254078300000004*(x-8.841767068)^3,x < 8.983132529,-9.676852920+1.14269317199999998*x-7.82556262598200103*(x-8.906024096)^2+18.3596572000000009*(x-8.906024096)^3,x < 9.085943774,-1.815645482+.263343045900000017*x-3.57850943406649690*(x-8.983132529)^2+9.89275871299999920*(x-8.983132529)^3,x < 9.214457831,1.992621465-.158775081699999988*x-.527248914967910598*(x-9.085943774)^2+13.7161455500000004*(x-9.085943774)^3,x < 9.265863453,-3.000414088+.385309060300000006*x+4.76090361950732444*(x-9.214457831)^2-238.424680700000010*(x-9.214457831)^3,x < 9.304417670,9.958143872-1.01535533300000003*x-32.0082033990760380*(x-9.265863453)^2+640.819320999999945*(x-9.265863453)^3,x < 9.342971887,6.323291717-.625863103299999946*x+42.1106580656907283*(x-9.304417670)^2-671.193345300000033*(x-9.304417670)^3,x < 9.381526104,3.973878048-.371817243000000020*x-35.5213435843255994*(x-9.342971887)^2+298.998633299999994*(x-9.342971887)^3,x < 9.432931726,17.12559617-1.77749291399999998*x-.938369007749599526*(x-9.381526104)^2-45.2527698299999983*(x-9.381526104)^3,x < 9.497188754,21.41104143-2.23271428699999986*x-7.91710935039100594*(x-9.432931726)^2+98.5886623699999946*(x-9.432931726)^3,x < 9.599999999,19.46947803-2.02896652100000008*x+11.0879339629728211*(x-9.497188754)^2-7.91417408299999980*(x-9.497188754)^3,x < 9.702811244,.1000000211-.219999999999999984e-8*x+8.64693568824408842*(x-9.599999999)^2+7.91417450299999992*(x-9.599999999)^3,x < 9.767068272,-19.48667926+2.02896652999999994*x+11.0879340933548125*(x-9.702811244)^2-98.5886665700000010*(x-9.702811244)^3,x < 9.818473895,-21.45707262+2.23271426099999993*x-7.91711002837735922*(x-9.767068272)^2+45.2527798300000015*(x-9.767068272)^3,x < 9.857028112,-17.00226759+1.77749289499999996*x-.938368011165497840*(x-9.818473895)^2-298.998646600000028*(x-9.818473895)^3,x < 9.895582328,-3.165013004+.371817241700000023*x-35.5213441201667024*(x-9.857028112)^2+671.193370699999946*(x-9.857028112)^3,x < 9.934136545,-5.693279736+.625863090299999980*x+42.1106584620465156*(x-9.895582328)^2-640.819322299999953*(x-9.895582328)^3,x < 9.985542168,-9.536678620+1.01535534299999997*x-32.0082031855025448*(x-9.934136545)^2+238.424675400000012*(x-9.934136545)^3,x < 10.11405622,4.397519869-.385309060300000006*x+4.76090372743796308*(x-9.985542168)^2-13.7161460099999992*(x-9.985542168)^3,x < 10.21686747,-1.055860205+.158775091799999990*x-.527248777686277426*(x-10.11405622)^2-9.89275980000000032*(x-10.11405622)^3,x < 10.29397590,3.240541324-.263343077699999983*x-3.57850978117801422*(x-10.21686747)^2-18.3596547799999997*(x-10.21686747)^3,x < 10.35823293,12.26285593-1.14269316800000009*x-7.82556224646598242*(x-10.29397590)^2+21.6254150600000018*(x-10.29397590)^3,x < 10.46104418,19.87882420-1.88051613900000002*x-3.65680741193805536*(x-10.35823293)^2+29.4380479999999985*(x-10.35823293)^3,x < 10.49959839,17.97272820-1.69894399600000012*x+5.42288012494271499*(x-10.46104418)^2+129.837450200000006*(x-10.46104418)^3,x < 10.53815261,7.518750032-.701812560699999977*x+20.4402210875504267*(x-10.49959839)^2-58.0211266000000023*(x-10.49959839)^3,x < 10.57670683,-6.336953112+.615568340299999962*x+13.7293432477772814*(x-10.53815261)^2+102.246759999999995*(x-10.53815261)^3,x < 10.62811245,-22.33011890+2.13016388399999990*x+25.5554754893410490*(x-10.57670683)^2-199.009475600000002*(x-10.57670683)^3,x < 10.67951807,-33.44616307+3.17988384399999990*x-5.13514094996628057*(x-10.62811245)^2+368.856203699999980*(x-10.62811245)^3,x < 10.71807229,-58.99987894+5.57608297999999980*x+51.7487045649336112*(x-10.67951807)^2-731.175364700000046*(x-10.67951807)^3,x < 10.74377510,-66.78630448+6.30582651900000002*x-32.8209830575482898*(x-10.71807229)^2+565.672529299999952*(x-10.71807229)^3,x < 10.78232932,-60.71660250+5.73975180299999988*x+10.7971375660983906*(x-10.74377510)^2+220.896995800000013*(x-10.74377510)^3,x < 10.82088353,-80.28577822+7.55734459600000008*x+36.3466716884315133*(x-10.78232932)^2-792.107743700000015*(x-10.78232932)^3,x < 10.85943775,-72.38226322+6.82774775399999978*x-55.2705931812486498*(x-10.82088353)^2+1202.57521599999996*(x-10.82088353)^3,x < 10.89799197,-84.34951396+7.92854252099999979*x+83.8224551728121128*(x-10.85943775)^2-1400.75927299999989*(x-10.85943775)^3,x < 10.93654618,-86.67044766+8.14557836900000076*x-78.1930883739986342*(x-10.89799197)^2+910.552913999999987*(x-10.89799197)^3,x < 10.97510040,-65.20115752+6.17664447299999962*x+27.1238563847590300*(x-10.93654618)^2-496.498442000000012*(x-10.93654618)^3,x < 11.01365462,-63.84430425+6.05409534600000044*x-30.3024741008581877*(x-10.97510040)^2+202.964765599999993*(x-10.97510040)^3,x < 11.05220883,-48.11167908+4.62259629899999958*x-6.82702941963942323*(x-11.01365462)^2-315.360152900000002*(x-11.01365462)^3,x < 11.09076305,-26.77928356+2.68989520700000016*x-43.3024141007375505*(x-11.05220883)^2+185.996570399999996*(x-11.05220883)^3,x < 11.11646586,1.000057364+.180325071100000012*x-21.7895560082287824*(x-11.09076305)^2+574.792537000000038*(x-11.09076305)^3,x < 11.15502008,.783346961+.199402675899999992*x+22.5317941106755342*(x-11.11646586)^2-718.567269699999996*(x-11.11646586)^3,x < 11.19357430,17.13900021-1.26750109899999996*x-60.5796076845320642*(x-11.15502008)^2+679.044604700000036*(x-11.15502008)^3,x < 11.23212851,35.48055070-2.91064764699999978*x+17.9604975692640104*(x-11.19357430)^2-252.656593799999996*(x-11.19357430)^3,x < 11.27068273,32.59219749-2.65240888800000008*x-11.2624285645170304*(x-11.23212851)^2+331.582348400000001*(x-11.23212851)^3,x < 11.30923695,25.71718487-2.04221744300000019*x+27.0892678727316962*(x-11.27068273)^2-201.195799099999988*(x-11.27068273)^3,x < 11.34779116,12.26958484-.850595392000000006*x+3.81842656377835477*(x-11.30923695)^2-399.277068299999996*(x-11.30923695)^3,x < 11.38634538,29.11583128-2.33665132799999986*x-42.3630092799390070*(x-11.34779116)^2+925.826498300000026*(x-11.34779116)^3,x < 11.42489960,19.29114670-1.47467393099999988*x+64.7205462253824494*(x-11.38634538)^2-686.596545300000002*(x-11.38634538)^3,x < 11.46345381,-2.688020437+.454097682999999974*x-14.6930365634021350*(x-11.42489960)^2+75.6046047300000056*(x-11.42489960)^3,x < 11.50200803,6.417256461-.341716948999999992*x-5.94840913665451598*(x-11.46345381)^2+384.178224300000011*(x-11.46345381)^3,x < 11.54056225,-7.998689860+.912770172700000049*x+38.4866662132771680*(x-11.50200803)^2-739.839913300000034*(x-11.50200803)^3,x < 11.57911646,-4.158078100+.581260943299999999*x-47.0851861484535377*(x-11.54056225)^2+830.226523700000030*(x-11.54056225)^3,x < 11.61767068,-5.008966116+.652810267699999946*x+48.9409970811681560*(x-11.57911646)^2-836.110085000000026*(x-11.57911646)^3,x < 11.65622490,-5.510553590+.698122180699999982*x-47.7657194327975034*(x-11.61767068)^2+769.258899000000042*(x-11.61767068)^3,x < 11.69477912,-2.590816443+.445325693999999994*x+41.2088110820212421*(x-11.65622490)^2-495.970491999999978*(x-11.65622490)^3,x < 11.73333333,-13.85366912+1.41119972900000001*x-16.1564553272868601*(x-11.69477912)^2+342.145854699999973*(x-11.69477912)^3,x < 11.77188755,-17.14254045+1.69112560700000002*x+23.4170340647562618*(x-11.73333333)^2-.135425642099999994*(x-11.73333333)^3,x < 11.81044177,-38.35655155+3.49617267200000014*x+23.4013703704571867*(x-11.77188755)^2-341.603905699999984*(x-11.77188755)^3,x < 11.84899598,-41.66166586+3.77730712600000018*x-16.1094460304594129*(x-11.81044177)^2+494.074366699999985*(x-11.81044177)^3,x < 11.88755020,-53.04468764+4.73834979200000017*x+41.0364946290645563*(x-11.84899598)^2-762.216768000000002*(x-11.84899598)^3,x < 11.92610442,-50.23759266+4.50366911299999995*x-47.1235242694367145*(x-11.88755020)^2+809.838343699999996*(x-11.88755020)^3,x < 11.96465863,-49.99500686+4.48134654700000024*x+46.5445327509942288*(x-11.92610442)^2-732.180748699999981*(x-11.92610442)^3,x < 12.00321285,-53.84403719+4.80532198800000021*x-38.1414182566907840*(x-11.96465863)^2+373.926871300000016*(x-11.96465863)^3,x < 12.04176707,-38.59225944+3.53174270699999981*x+5.10795833659243126*(x-12.00321285)^2+108.951554200000004*(x-12.00321285)^3,x < 12.08032128,-49.17171702+4.41145528799999998*x+17.7095849103210626*(x-12.04176707)^2-809.732709699999986*(x-12.04176707)^3,x < 12.11887550,-22.06824032+2.16618744800000006*x-75.9462298989634234*(x-12.08032128)^2+512.544347700000003*(x-12.08032128)^3,x < 12.15742972,21.11886698-1.40432723999999998*x-16.6639872830806192*(x-12.11887550)^2+504.511107999999978*(x-12.11887550)^3,x < 12.19598393,9.393228946-.439503173700000026*x+41.6891094632853054*(x-12.15742972)^2-785.633886999999958*(x-12.15742972)^3,x < 12.23453815,12.93214403-.728284333700000008*x-49.1793721317348300*(x-12.19598393)^2+893.068401699999981*(x-12.19598393)^3,x < 12.27309237,10.58198193-.537983686000000016*x+54.1152947969681009*(x-12.23453815)^2-169.207268099999992*(x-12.23453815)^3,x < 12.31164658,-31.29919474+2.88021907400000020*x+34.5443320798636648*(x-12.27309237)^2-216.238531099999988*(x-12.27309237)^3,x < 12.35020080,-52.18253360+4.57960949699999986*x+9.53361487316150580*(x-12.31164658)^2+161.682245300000005*(x-12.31164658)^3,x < 12.38875502,-70.14233741+6.03571865899999960*x+28.2342134400575020*(x-12.35020080)^2-430.489949299999978*(x-12.35020080)^3,x < 12.42730924,-73.31414529+6.29313802400000010*x-21.5573991950783822*(x-12.38875502)^2+687.800042999999960*(x-12.38875502)^3,x < 12.46586345,-90.76512928+7.69797608100000018*x+57.9953833402560406*(x-12.42730924)^2-1448.23171700000012*(x-12.42730924)^3,x < 12.50441767,-66.00296526+5.71183581000000018*x-109.510905865681720*(x-12.46586345)^2+1615.21219100000008*(x-12.46586345)^3,x < 12.54297189,-50.54862323+4.47030998999999962*x+77.3088326006929379*(x-12.50441767)^2-1522.70566299999996*(x-12.50441767)^3,x < 12.56867470,-40.12268614+3.64129701799999994*x-98.8113548394019148*(x-12.54297189)^2+1277.17388299999994*(x-12.54297189)^3,x < 12.60722891,-8.138481790+1.09307322499999992*x-.330481901321193372*(x-12.56867470)^2-726.797668300000054*(x-12.56867470)^3,x < 12.64578313,33.00061410-2.17340497999999992*x-84.3938116857952707*(x-12.60722891)^2+161.220727600000004*(x-12.60722891)^3,x < 12.68433735,106.0851081-7.96195119500000014*x-65.7465934925050562*(x-12.64578313)^2+1826.86997100000008*(x-12.64578313)^3,x < 12.72289156,67.06345830-4.88503708100000012*x+145.554046779189292*(x-12.68433735)^2-2233.83618900000011*(x-12.68433735)^3,x < 12.76144578,51.09374484-3.62289850699999994*x-112.817321761205363*(x-12.72289156)^2+1873.60773500000006*(x-12.72289156)^3,55.42615970-3.96711787799999982*x+103.889132648723660*(x-12.76144578)^2-898.208052700000052*(x-12.76144578)^3)

## Going to a conference...

Thanks, acer, I am going to a conference for two weeks and must leave now, but I'll come back to the subject in about ten days time

## Thank you...

Thanks, realroots does not actually seem to be working, the polynome I have has been generated with Spline and it seems to have problems with that. I'll check the SNAP package.

 Page 1 of 1
﻿