Student[NumericalAnalysis] - Maple Programming Help

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

Student[NumericalAnalysis]

 BasisFunctions
 return a list of the basis functions from a POLYINTERP structure

 Calling Sequence BasisFunctions(p) BasisFunctions(p, indvar)

Parameters

 p - a POLYINTERP structure invar - (optional) name; the name to assign to the independent variable in the basis functions that are returned

Description

 • The BasisFunctions routine retrieves the basis functions from a POLYINTERP structure.
 • The POLYINTERP structure is created using the PolynomialInterpolation command.
 • Only POLYINTERP structures that contain data points that have been interpolated using the Lagrange, Newton or Hermite methods can use the BasisFunctions command.

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{BasisFunctions}\left(\mathrm{p1}\right)$
 $\left[{0.08888888889}{}\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){,}{-}{0.5333333333}{}{x}{}\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){,}{1.333333333}{}{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.777777778}{}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\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.5333333333}{}{x}{}\left({x}{-}{0.5}\right){}\left({x}{-}{1.0}\right){}\left({x}{-}{1.5}\right){}\left({x}{-}{2.0}\right){}\left({x}{-}{3.0}\right){,}{0.08888888889}{}{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)\right]$ (2)
 > $\mathrm{Draw}\left(\mathrm{p1},\mathrm{objects}=\left[\mathrm{BasisFunctions}\right]\right)$
 > $\mathrm{xyyp}≔\left[\left[1,1.105170918,0.2210341836\right],\left[1.5,1.252322716,0.3756968148\right],\left[2,1.491824698,0.5967298792\right]\right]$
 ${\mathrm{xyyp}}{≔}\left[\left[{1}{,}{1.105170918}{,}{0.2210341836}\right]{,}\left[{1.5}{,}{1.252322716}{,}{0.3756968148}\right]{,}\left[{2}{,}{1.491824698}{,}{0.5967298792}\right]\right]$ (3)
 > $\mathrm{p2}≔\mathrm{PolynomialInterpolation}\left(\mathrm{xyyp},\mathrm{method}=\mathrm{hermite},\mathrm{function}={ⅇ}^{0.1{x}^{2}},\mathrm{independentvar}='x',\mathrm{errorboundvar}='\mathrm{ξ}',\mathrm{digits}=5\right):$
 > $\mathrm{BasisFunctions}\left(\mathrm{p2}\right)$
 $\left[{1}{,}{x}{-}{1.}{,}{\left({x}{-}{1.}\right)}^{{2}}{,}{\left({x}{-}{1.}\right)}^{{2}}{}\left({x}{-}{1.5}\right){,}{\left({x}{-}{1.}\right)}^{{2}}{}{\left({x}{-}{1.5}\right)}^{{2}}{,}{\left({x}{-}{1.}\right)}^{{2}}{}{\left({x}{-}{1.5}\right)}^{{2}}{}\left({x}{-}{2.}\right)\right]$ (4)