Exercise "Interpolation"
-
Implement a function which makes a Lagrange polynomial interpolation
of a table {x[i],y[i]} at a given point z.
- Implement a function for the linear spline interpolation.
- Implement a function for the quadratic spline interpolation.
- Hint: location of the index i: x[i]<z<x[i+1]
must be done using the binary search.
-
Create your own individual interesting interpolation examples -- a step function
perhaps, a function with a pole, or what not.
Ideas for the project
- Cubic spline
- Implement a function for cubic spline interpolation.
- Implement a function which calculates the derivative of a tabulated
function by building a spline and then differentiating (analytically)
the spline.
- Implement a function which calculates the antiderivative (the
integral) of a tabulated function by building a spline and then
integrating (analytically) the spline.