return the interpolating polynomial and remainder term from an interpolation structure - Maple Help

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/InterpolantRemainderTerm

Student[NumericalAnalysis][InterpolantRemainderTerm] - return the interpolating polynomial and remainder term from an interpolation structure

 Calling Sequence InterpolantRemainderTerm(p, opts)

Parameters

 p - a POLYINTERP structure opts - (optional) equations of the form keyword=value where keyword is one of errorboundvar, independentvar, showapproximatepoly, showremainder; options for returning the interpolant and remainder term

Description

 • The InterpolantRemainderTerm command returns the approximate polynomial and remainder term from a POLYINTERP structure.
 • The interpolant and remainder term are returned in an expression sequence of the form $\mathrm{Pn}$, $\mathrm{Rn}$, where $\mathrm{Pn}$ is the interpolant and $\mathrm{Rn}$ is the remainder term.
 • The POLYINTERP structure is created using the PolynomialInterpolation command or the CubicSpline command.
 • If the POLYINTERP structure p was created using the CubicSpline command then the InterpolantRemainderTerm command can only return the approximate polynomial and therefore showremainder must be set to false.
 • In order for the remainder term to exist, the POLYINTERP structure p must have an associated exact function that has been given.

Notes

 • The remainder term is also called an error term.
 • The interpolant is also called the approximating polynomial or interpolating polynomial.

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{NumericalAnalysis}]\right):$
 > $\mathrm{xy}:=\left[\left[0,4.0\right],\left[0.5,0\right],\left[1.0,-2.0\right],\left[1.5,0\right],\left[2.0,1.0\right],\left[2.5,0\right],\left[3.0,-0.5\right]\right]$
 ${\mathrm{xy}}{:=}\left[\left[{0}{,}{4.0}\right]{,}\left[{0.5}{,}{0}\right]{,}\left[{1.0}{,}{-}{2.0}\right]{,}\left[{1.5}{,}{0}\right]{,}\left[{2.0}{,}{1.0}\right]{,}\left[{2.5}{,}{0}\right]{,}\left[{3.0}{,}{-}{0.5}\right]\right]$ (1)
 > $\mathrm{p1}:=\mathrm{PolynomialInterpolation}\left(\mathrm{xy},\mathrm{function}={2}^{2-x}\mathrm{cos}\left(\mathrm{π}x\right),\mathrm{method}=\mathrm{lagrange},\mathrm{extrapolate}=\left[0.25,0.75,1.25\right],\mathrm{errorboundvar}='\mathrm{ξ}'\right):$
 > $\mathrm{InterpolantRemainderTerm}\left(\mathrm{p1}\right)$
 ${0.3555555556}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.0}\right){}\left({x}{-}{2.5}\right){}\left({x}{-}{3.0}\right){-}{2.666666667}{}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.0}\right){}\left({x}{-}{2.5}\right){}\left({x}{-}{3.0}\right){+}{1.333333333}{}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.5}\right){}\left({x}{-}{3.0}\right){-}{0.04444444444}{}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.0}\right){}\left({x}{-}{2.5}\right){,}\left(\frac{{1}}{{5040}}{}\left({-}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{7}}{}{\mathrm{cos}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){-}{7}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{6}}{}{\mathrm{π}}{}{\mathrm{sin}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){+}{21}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{5}}{}{{\mathrm{π}}}^{{2}}{}{\mathrm{cos}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){+}{35}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{4}}{}{{\mathrm{π}}}^{{3}}{}{\mathrm{sin}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){-}{35}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{3}}{}{{\mathrm{π}}}^{{4}}{}{\mathrm{cos}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){-}{21}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{2}}{}{{\mathrm{π}}}^{{5}}{}{\mathrm{sin}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){+}{7}{}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{\mathrm{ln}}{}\left({2}\right){}{{\mathrm{π}}}^{{6}}{}{\mathrm{cos}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right){+}{{2}}^{{2}{-}{\mathrm{ξ}}}{}{{\mathrm{π}}}^{{7}}{}{\mathrm{sin}}{}\left({\mathrm{π}}{}{\mathrm{ξ}}\right)\right){}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.0}\right){}\left({x}{-}{2.5}\right){}\left({x}{-}{3.0}\right)\right){&where}\left\{{0.}{\le }{\mathrm{ξ}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ξ}}{\le }{3.0}\right\}$ (2)