return the interpolated polynomial from a POLYINTERP structure - Maple Help

Online Help

All Products    Maple    MapleSim


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

Student[NumericalAnalysis][Interpolant] - return the interpolated polynomial from a POLYINTERP structure

Calling Sequence

Interpolant(p, opts)

Parameters

p

-

a POLYINTERP structure

opts

-

(optional) equations of the form keyword=value where keyword is independentvar; options for returning the interpolant

Description

• 

The Interpolant command retrieves the interpolated polynomial from a POLYINTERP structure.

• 

The POLYINTERP structure is created using the PolynomialInterpolation command or the CubicSpline command.

• 

In order to perform an interpolation, the PolynomialInterpolation command or CubicSpline command is used first, where all options are chosen and the interpolation is performed.  Then the Interpolant command can be used to extract the interpolating polynomial.

Notes

• 

You may want to use the expand command to get the polynomial into a nicer form, since the Interpolant command returns the polynomial in factored form.

Examples

withStudent[NumericalAnalysis]:

xy:=0,4.0,0.5,0,1.0,2.0,1.5,0,2.0,1.0,2.5,0,3.0,0.5

xy:=0,4.0,0.5,0,1.0,2.0,1.5,0,2.0,1.0,2.5,0,3.0,0.5

(1)

p1a:=PolynomialInterpolationxy,function=22xcosπx,method=lagrange,extrapolate=0.25,0.75,1.25,errorboundvar=ξ:

p1b:=CubicSplinexy,function=22xcosπx,extrapolate=0.25,0.75,1.25:

expandInterpolantp1a

71.08333335x341.05555556x4+10.60000001x51.022222222x6+4.00000000048.67222223x2+3.066666669x

(2)

expandInterpolantp1b

&lcub;4.8.48076923076923x&plus;1.92307692307692x3x<0.55.13461538461539x&plus;3.442307692307696.69230769230769x2&plus;6.38461538461538x3x<1.021.288461538461558.6730769230769x&plus;46.8461538461538x211.4615384615385x3x<1.515.0576923076923x15.57692307692312.30769230769231x20.538461538461538x3x<2.064.8076923076923&plus;88.9038461538461x39.2307692307692x2&plus;5.61538461538461x3x<2.552.4423076923077x&plus;52.9807692307692&plus;17.3076923076923x21.92307692307692x3otherwise

(3)

xyy:=1&comma;1.105170918&comma;0.2210341836&comma;1.5&comma;1.252322716&comma;0.3756968148&comma;2&comma;1.491824698&comma;0.5967298792

xyy:=1&comma;1.105170918&comma;0.2210341836&comma;1.5&comma;1.252322716&comma;0.3756968148&comma;2&comma;1.491824698&comma;0.5967298792

(4)

p2:=PolynomialInterpolationxyy&comma;method&equals;hermite&comma;function&equals;&ExponentialE;0.1x2&comma;independentvar&equals;x&comma;errorboundvar&equals;&xi;&comma;digits&equals;5&colon;

Interpolantp2&comma;independentvar&equals;t

0.88417&plus;0.22103t&plus;0.14634t1.2&plus;0.033320t1.2t1.5&plus;0.010280t1.2t1.52&plus;0.0038400t1.2t1.52t2.

(5)

See Also

Student[NumericalAnalysis], Student[NumericalAnalysis][AddPoint], Student[NumericalAnalysis][BasisFunctions], Student[NumericalAnalysis][ComputationOverview], Student[NumericalAnalysis][CubicSpline], Student[NumericalAnalysis][DataPoints], Student[NumericalAnalysis][InterpolantRemainderTerm], Student[NumericalAnalysis][PolynomialInterpolation]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam