(* Numerical Mathematics and Computing, Fifth Edition *) (* Ward Cheney & David Kincaid *) (* Brooks/Cole Publ. Co. *) (* (c) 2003 *) (* No warranties implied or expressed. *) (* File: newt_inter3 *) (* Newton interpolation polynomial & fit it to data*) F[x_]:=Sin[x] a=0; b=1.6875; n=9; h=(b-a)/n; data = Table[N[{x,F[x]}], {x, a, b, h}] plotdata = ListPlot[data] Fit[data, Table[x^i, {i,0,n}],x] plotcurve=Plot[%,{x,a,b}] Show[plotdata, plotcurve]