Interpolant - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[NumericalAnalysis]

  

Interpolant

  

return the interpolated polynomial from a POLYINTERP structure

 

Calling Sequence

Parameters

Options

Description

Notes

Examples

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

Options

• 

independentvar = name

  

A name for the independent variable in the polynomial.  By default, the name given in the PolynomialInterpolation call is used.

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

withStudentNumericalAnalysis:

xy0,4.0,0.5,0,1.0,2.0,1.5,0,2.0,1.0,2.5,0,3.0,0.5

xy0,4.0,0.5,0,1.0,−2.0,1.5,0,2.0,1.0,2.5,0,3.0,−0.5

(1)

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

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

expandInterpolantp1a

48.67222223x21.022222222x6+71.08333335x341.05555556x4+10.60000001x5+4.000000000+3.066666669x

(2)

expandInterpolantp1b

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

(3)

xyy1&comma;1.105170918&comma;0.2210341836&comma;1.5&comma;1.252322716&comma;0.3756968148&comma;2&comma;1.491824698&comma;0.5967298792

xyy1&comma;1.105170918&comma;0.2210341836&comma;1.5&comma;1.252322716&comma;0.3756968148&comma;2&comma;1.491824698&comma;0.5967298792

(4)

p2PolynomialInterpolationxyy&comma;method=hermite&comma;function=exp0.1x2&comma;independentvar=x&comma;errorboundvar=ξ&comma;digits=5&colon;

Interpolantp2&comma;independentvar=t

0.88417+0.22103t+0.14634t1.2+0.033320t1.2t1.5+0.010280t1.2t1.52+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]