Student[NumericalAnalysis] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : 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

Options

 • errorboundvar = name
 The name to assign to the independent variable in the remainder term. By default, the errorboundvar given when the POLYINTERP structure was created is used.
 • independentvar = name
 The name to assign to the independent variable in the approximated polynomial. By default, the independentvar given when the POLYINTERP structure was created is used.
 • showapproximatepoly = true or false
 Whether to return the approximated polynomial. By default this is set to true.
 • showremainder = true or false
 Whether to return the remainder term. By default, this is set to true.

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{Pi}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{\left({-}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{7}}{}{\mathrm{cos}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){-}{7}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{6}}{}{\mathrm{\pi }}{}{\mathrm{sin}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){+}{21}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{5}}{}{{\mathrm{\pi }}}^{{2}}{}{\mathrm{cos}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){+}{35}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{4}}{}{{\mathrm{\pi }}}^{{3}}{}{\mathrm{sin}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){-}{35}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{3}}{}{{\mathrm{\pi }}}^{{4}}{}{\mathrm{cos}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){-}{21}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{2}}{}{{\mathrm{\pi }}}^{{5}}{}{\mathrm{sin}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){+}{7}{}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{\mathrm{ln}}{}\left({2}\right){}{{\mathrm{\pi }}}^{{6}}{}{\mathrm{cos}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\right){+}{{2}}^{{2}{-}{\mathrm{\xi }}}{}{{\mathrm{\pi }}}^{{7}}{}{\mathrm{sin}}{}\left({\mathrm{\pi }}{}{\mathrm{\xi }}\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)}{{5040}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{0.}{\le }{\mathrm{\xi }}{\le }{3.0}\right\}$ (2)