bug in Interpolation[] of Mma 3.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg5767] bug in Interpolation[] of Mma 3.0*From*: Gennady <stupakov at slac.stanford.edu>*Date*: Sat, 18 Jan 1997 14:58:51 -0500*Organization*: SLAC*Sender*: owner-wri-mathgroup at wolfram.com

In my calculation of Interpolation[] function with Mathematica 3.0 I found the following bug. If I run a piece of code given below with Mma 3.0 on my PowerPC 9500/120 and compare the ListPlot of the original array and the Plot of its Interpolation function, I see that the interpolation is very poor. There is a big bump between values of abscissa 1.6 and 3.4 which certainly should not be there. The integral of the interpolation function (computed in the last line of the code) equals 33.838. If I run the same code with Mathematica 2.2 (on the same PowerPC), I find that the bump disappears, and the visual agreement between the ListPlot and the Interpolation function is much better. Also, the integral now is 27.0384, rather than 33.838. It would be interesting to check if the same bug appears on other computers/platforms. I have reported the bug to Wolfram Research. Gennady Stupakov. (*---- Mathematica code --------*) testlist={{0., 4.037}, {1.689, 4.744}, {3.379, 6.865}, {3.551, 7.637}, {3.723, 9.563}, {4.157, 17.429}, {4.251, 19.065}}; fun=Interpolation[testlist]; ListPlot[testlist,PlotJoined->True,DisplayFunction->Identity] Plot[fun[s],{s,0,4.2},PlotRange->All,DisplayFunction->Identity] Show[%,%%,DisplayFunction->$DisplayFunction]; NIntegrate[fun[s],{s,0,4.251}] (*------------------------------*)