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