Hello,
I would like to take some data sets, interpolate them, and find at
least one root of the interpolation polynomial.
I tried using 'cspline', but apparently the resulting thing does not
behave like an actual polynomial.
Consider
(%i1) load(interpol);
(%o1) /usr/local/share/maxima/5.12.0/share/numeric/interpol.mac
(%i2) xx: makelist([i*.5, sin(i*.5)],i,1,6);
(%o2) [[0.5, 0.479425538604203], [1.0, .8414709848078965],
[1.5, .9974949866040544], [2.0, .9092974268256817], [2.5,
.5984721441039565],
[3.0, .1411200080598672]]
(%i3) p: cspline(xx);
3 2
(%o3) (- .3298702967140699 x + .4948054450711049 x +
.5591557440503521 x
+ .1173800924005095) charfun2(x, minf, 1.0)
3 2
+ (.2157685260781892 x - 1.941916734703703 x + 4.857103800503383 x
- 2.778690985228064) charfun2(x, 2.5, inf)
3 2
+ (.09337219618796708 x - 1.023944260527037 x + 2.562172615061717 x
- .8662483306933426) charfun2(x, 2.0, 2.5)
3 2
+ (.01954964613784849 x - .5810089602263253 x + 1.676302014460295 x
- .2756679302923941) charfun2(x, 1.5, 2.0)
3 2
+ (.001179928310065137 x - .4983452300013003 x + 1.552306419122757
x
- .2136701326236259) charfun2(x, 1.0, 1.5)
(%i4) ev(p,x=2);
(%o4) .9092974268256817
(%i5) find_root(p,0,3);
?tramp1\$ evaluates to errexp1
Improper name or value in functional position.
-- an error. To debug this try debugmode(true);
Any hints?
TIA,
-sen
--
---------------------------------------------------------------------------
| Sheldon E. Newhouse | e-mail: sen1 at math.msu.edu |
| Mathematics Department | |
| Michigan State University | telephone: 517-355-9684 |
| E. Lansing, MI 48824-1027 USA | FAX: 517-432-1562 |
---------------------------------------------------------------------------