The Newton divided difference interpolation is the interpolation polynomial approximation for a given set of data points
in the Newton form (i.e. uses the Taylor expansion to perform the interpolation). Basically, the divided differences are used
to approximately calculate the various derivatives.
Algorithm Creation
The general form of the Newton divided difference polynomial for a given set of (n + 1) data
points, (x_{0},y_{0}),(x_{1},y_{1}),...,(x_{n},y_{n}) which
can be written as,
f_{n}(x) = c_{0} + c_{1}(x  x_{0}) + ... c_{n}(x  x_{0})(x  x_{1})... (x  x_{n1})

where,
c_{0} = f[x_{0}]
c_{1} = f[x_{1},x_{0}]
.
.
.
c_{n} = f[x_{n},x_{n1}, ...,x_{0}]

from above definition, the Newton differences are calculated recursively.
Testing the Newton Divided Difference Method
In order to test the Spline method as defined above, a new TestNewtonDividedDifference()
static method has been added and executed. Supporting code and methods are not shown.
static void TestNewtonDividedDifference();
{
ListBox1.Items.Clear();
ListBox2.Items.Clear();
double[] xarray = new double[] { t1, t2, t3, t4, t5 };
double[] yarray = new double[] { t6, t7, t8, t9, t10 };
double[] x = new double[] { t11, t12, t13, t14 };
double[] y = Interpolation.NewtonDividedDifference(xarray, yarray, x);
VectorR vx = new VectorR(x);
VectorR vy = new VectorR(y);
ListBox1.Items.Add(" " + vx.ToString());
ListBox2.Items.Add(" " + vy.ToString());
}
