Polynomial interpolation
The polynomial interpolation algorithm builds for n supporting points
(xk, yk) a
polynomial of the degree n that crosses all the supporting points. This
polynomial looks like
Where x and y are the coordinates of one supporting point. For n
supporting points we get n such equations for x1, y1 to xn, yn. So the
algorithm basically has to set up the equation matrix of n*n and solve
this by a Gauss algorithm. That gives the parameters a0 to an and with
this parameters for any xp the corresponding yp value can be calculated.
Now the polynomial interpolation is the easiest algorithm of the
interpolation algorithms, but it gets to its limits regarding accuracy
quite soon. If the delta(X) between the supporting points is too small
or too big the Gaussian algorithm gets problems with the constellation
of the matrix equation already with 10 supporting points. It can help
to scale the delta(X) up or down to get a delta(X) close to 1 only to
solve the matrix equation. But the problem remains. The polynomial
interpolation is not reliable any more.
Trial of a Polynomial interpolation with f=1/x^2 and 20 supporting
points.But this is not the end
In the equation matrix we start with
go on to the equation of y2, the y3 and so on. That means in the first
line we have the smallest values because of x1 and Gauss does not like
that. Filling up the equation matrix upside down like
I implemented an online interpolation solver with the polynomial interpolation algorithm. This solver
can be found here
C# Demo Projects to polynomial
interpolation
Polynom.zip
Polynom_Givens.zip
Java Demo Project to polynomial interpolation
PolynomInterpolation.zip
PolynomIterpGivens.zip