PolynomialInterpolation - 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]

  

PolynomialInterpolation

  

perform polynomial interpolation on a set of data

 

Calling Sequence

Parameters

Options

Description

Notes

Examples

Calling Sequence

PolynomialInterpolation(xy, opts)

Parameters

xy

-

list(numeric), list(list(numeric, numeric)), list(list(numeric, numeric, numeric)); the data points to be interpolated

opts

-

equation(s) of the form keyword=value where keyword is one of digits, errorboundvar, extrapolate, function, independentvar, method; the options for interpolating the data xy

Options

• 

digits = posint

  

A positive integer; the environment variable Digits will be set to this integer during the execution of this procedure. By default, digits = 10.

• 

errorboundvar = name

  

The name to assign to the variable in the errorbound term.

• 

extrapolate = algebraic, list(algebraic)

  

The points to be extrapolated. By default no points are extrapolated. To see the extrapolated values after using the PolynomialInterpolation command, use the ExactValue or ApproximateValue command.

• 

function = algebraic

  

The exact function to use when computing the absolute error. If only the x data is given in xy, the function must be specified by the user, or an exception will be raised. By default, no function is used.

• 

independentvar = name

  

The name to assign to the independent variable in the interpolant. If independentvar is not specified, the independent variable in function will be used.  If function and independentvar are both unspecified, ind_var will be used as the independent variable in the interpolant.

• 

method = hermite, lagrange, neville, newton

  

The method to use when performing the polynomial interpolation.

– 

hermite : Hermite Interpolation; this method requires xy to be in the form [[x1, y1, p1], [x2, y2, p2],...].

– 

lagrange : Lagrange Form Interpolation

– 

neville : Neville's Algorithm

– 

newton : Newton Interpolation

  

If no method is specified by the user, the Lagrange method will be used.  However, if xy is of the form list(numeric, numeric, numeric) and the user does not specify a method, the Hermite method will be used.

Description

• 

The PolynomialInterpolation command interpolates the given data points xy and stores all computed information in a POLYINTERP structure.

• 

The POLYINTERP structure is then passed around to different interpolation commands in the Student[NumericalAnalysis] subpackage where information can be extracted from it and, depending on the command, manipulated. To see a list of commands that accept a POLYINTERP structure, see Interpolation in the Glossary of Commands.

Notes

• 

When the Hermite method is used to perform interpolation, xy must be of the form list(list(numeric, numeric, numeric)).

• 

This procedure operates numerically; that is, inputs that are not numeric are first evaluated to floating-point numbers before computations proceed.

Examples

withStudentNumericalAnalysis:

xy0,1,12,1,1,1110,32,34,2,78,52,910,3,1110,72,1

xy0,1,12,1,1,1110,32,34,2,78,52,910,3,1110,72,1

(1)

LPolynomialInterpolationxy,independentvar=x,method=lagrange:

NevPolynomialInterpolationxy,independentvar=x,method=neville:

NewPolynomialInterpolationxy,independentvar=x,method=newton:

expandInterpolantL

1+22175x653225x71722473600x3+73320x43296225x5+225475x281831200x

(2)

expandInterpolantNev

1+22175x653225x71722473600x3+73320x43296225x5+225475x281831200x

(3)

expandInterpolantNew

1+22175x653225x71722473600x3+73320x43296225x5+225475x281831200x

(4)

xyyp1,1.105170918,0.2210341836,1.5,1.252322716,0.3756968148,2,1.491824698,0.5967298792

xyyp1,1.105170918,0.2210341836,1.5,1.252322716,0.3756968148,2,1.491824698,0.5967298792

(5)

p2PolynomialInterpolationxyyp,method=hermite,function=exp0.1x2,independentvar=x,errorboundvar=ξ,digits=5:

RemainderTermp2

0.120ⅇ0.1ξ2+0.0720ξ2ⅇ0.1ξ2+0.00480ξ4ⅇ0.1ξ2+0.000064ξ6ⅇ0.1ξ2x1.2x1.52x2.2720&where1.ξ2.

(6)

DividedDifferenceTablep2

1.1052000001.10520.2210300001.25230.294200.146340001.25230.375700.163000.033320001.49180.479000.206600.0436000.01028001.49180.596730.235460.0577200.0141200.0038400

(7)

Drawp2

See Also

Glossary of Commands

Student[NumericalAnalysis]

Student[NumericalAnalysis][AddPoint]

Student[NumericalAnalysis][BasisFunctions]

Student[NumericalAnalysis][ComputationOverview]

Student[NumericalAnalysis][CubicSpline]

Student[NumericalAnalysis][DataPoints]

Student[NumericalAnalysis][ExactValue]

Student[NumericalAnalysis][InterpolantRemainderTerm]