Newton backward interpolation in Mathematica

1.1k Views Asked by At

I have the following task:

Create a function (in Wolfram Mathematica), called $\mathrm{NewtonBackward}$[n_,x0_,h_,f_] which interpolates backwards the function $f(x)$ with nodes {x_i = x_0 + $i$$\cdot$ h, where $i$ = 0,..,n}.

The parameters of NewtonBackwards function are:

  • n_ :number of nodes
  • x0_ :starting node
  • h_ :the difference between neighbouring nodes
  • f_ :this is the function f(x), for example we can take f(x) = E^x

There is also another restriction - I am not allowed to use the built in functions of Wolfram Mathematica for finding sum or product (like Sum[f,{i,Subscript[i, max]}] ). Can anybody tell me how to do this ???

1

There are 1 best solutions below

5
On
NewtonBackward[n_,x0_,h_,f_]:= Interpolation[Table[{x,f[x]},{x,x0,x0+n h,h}]]; 
Plot[NewtonBackward[10, 0, 1/10, E^# &][x], {x, 0, 10}]

Mathematica graphics