Interpolation - Maple Help

CurveFitting

 PolynomialInterpolation
 compute an interpolating polynomial

 Calling Sequence PolynomialInterpolation(xydata, v, opts) PolynomialInterpolation(xdata, ydata, v, opts)

Parameters

 xydata - list, Array, DataFrame, or Matrix of the form [[x1,y1], [x2,y2], ..., [xn,yn]]; data points xdata - list, Array, DataSeries, or Vector of the form [x1, x2, ..., xn]; independent values ydata - list, Array, DataSeries, or Vector of the form [y1, y2, ..., yn]; dependent values v - name or numeric value opts - (optional) equation of the form form=option where option is one of Lagrange, monomial, Newton, or power; specify keyword describing form of output

Description

 • The PolynomialInterpolation routine returns the polynomial of degree less than or equal to $n-1$ in variable v that interpolates the points $\left\{\left(\mathrm{x1},\mathrm{y1}\right),\left(\mathrm{x2},\mathrm{y2}\right),...,\left(\mathrm{xn},\mathrm{yn}\right)\right\}$.  If v is a numerical value, the value of the polynomial at this point is returned.
 • You can call the PolynomialInterpolation routine in two ways.
 The first, PolynomialInterpolation(xydata, v, opts), accepts a list, Array, or Matrix, $[[\mathrm{x1},\mathrm{y1}],[\mathrm{x2},\mathrm{y2}],...,[\mathrm{xn},\mathrm{yn}]]$, of data points.
 The second, PolynomialInterpolation(xdata, ydata, v, opts), accepts two lists, two Arrays, or two Vectors. In this form, the first set of data contains the independent values, $[\mathrm{x1},\mathrm{x2},...,\mathrm{xn}]$, and the second set contains the dependent values, $[\mathrm{y1},\mathrm{y2},...,\mathrm{yn}]$.  Each element must be of type algebraic and all of the independent values must be distinct.

Examples

 > $\mathrm{with}\left(\mathrm{CurveFitting}\right):$
 > $\mathrm{PolynomialInterpolation}\left(\left[\left[0,0\right],\left[1,3\right],\left[2,1\right],\left[3,3\right]\right],z\right)$
 $\frac{{3}}{{2}}{}{{z}}^{{3}}{-}{7}{}{{z}}^{{2}}{+}\frac{{17}}{{2}}{}{z}$ (1)
 > $\mathrm{PolynomialInterpolation}\left(\left[0,2,4,7\right],\left[2,a,1,3\right],3\right)$
 $\frac{{19}}{{70}}{+}\frac{{3}{}{a}}{{5}}$ (2)
 > $\mathrm{PolynomialInterpolation}\left(\left[0,2,4,7\right],\left[2,a,1,3\right],z,\mathrm{form}=\mathrm{Lagrange}\right)$
 ${-}\frac{\left({z}{-}{2}\right){}\left({z}{-}{4}\right){}\left({z}{-}{7}\right)}{{28}}{+}\frac{{a}{}{z}{}\left({z}{-}{4}\right){}\left({z}{-}{7}\right)}{{20}}{-}\frac{{z}{}\left({z}{-}{2}\right){}\left({z}{-}{7}\right)}{{24}}{+}\frac{{z}{}\left({z}{-}{2}\right){}\left({z}{-}{4}\right)}{{35}}$ (3)