Exercise "Interpolation"

  1. Implement a function which makes a Lagrange polynomial interpolation of a table {x[i],y[i]} at a given point z.
  2. Implement a function for the linear spline interpolation.
  3. Implement a function for the quadratic spline interpolation.
  4. Hint: location of the index i: x[i]<z<x[i+1] must be done using the binary search.
  5. Create your own individual interesting interpolation examples -- a step function perhaps, a function with a pole, or what not.

Ideas for the project

  1. Cubic spline