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

Online Help

All Products    Maple    MapleSim


RealBox

  

EvaluatePolynomial

  

evaluate a univariate polynomial at a RealBox object

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

EvaluatePolynomial(a, [c0, c1, ..., cn])

EvaluatePolynomial(a, [c0, c1, ..., cn], precopt)

Parameters

a

-

a RealBox object

c0, c1, ..., cn

-

real constants or RealBox objects

precopt

-

(optional) equation of the form precision = n, where n is a positive integer

Description

• 

The EvaluatePolynomial command evaluates a dense univariate polynomial at a RealBox object. It does this in a manner that sometimes produces a smaller radius than simple evaluation using the standard arithmetic operations.

• 

The first argument is a RealBox object, representing the value at which the polynomial is to be evaluated.

• 

The second argument is a list of n+1 coefficients of the polynomial to be evaluated, where n is the degree of the polynomial. The first entry is the constant coefficient, the second the linear coefficient, and so on. Each coefficient can be a RealBox object or a real constant.

Examples

Consider the polynomial 49x4188x2+72x+292. Evaluate it at the RealBox object with center −1.47 and radius 0.01. We first use simple evaluation using the regular arithmetic operators.

poly292+72x188x2+49x4

poly49x4188x2+72x+292

(1)

rbRealBox1.47,0.01

rbRealBox: -1.47±0.01

(2)

evalpoly,x=rb

RealBox: 8.71575±12.5558

(3)

The radius of the result is smaller if we first convert the polynomial to Horner form.

poly_hornerconvertpoly,horner

poly_horner292+72+49x2188xx

(4)

evalpoly_horner,x=rb

RealBox: 8.71575±6.30864

(5)

However, this is still a severe overestimation of the radius: the minimal value on this interval is about 8.713 and the maximal value of about 8.781 is achieved at x=−1.46. We verify these values numerically and graphically below.

plotpoly,x=1.48..1.46

Optimization:-Minimizepoly,x=1.48..1.46

8.71324004901427,x=−1.47236599608282

(6)

evalpoly,x=1.46

8.7814094

(7)

So ideally we would like the result to have a center of about  8.747 and a radius of about 0.034. We don't quite achieve that with EvaluatePolynomial, but we get much closer than with the other options above.

EvaluatePolynomialrb,PolynomialTools:-CoefficientListpoly,x

RealBox: 8.71575±0.0662341

(8)

Compatibility

• 

The RealBox:-EvaluatePolynomial command was introduced in Maple 2023.

• 

For more information on Maple 2023 changes, see Updates in Maple 2023.

See Also

ComplexBox:-EvaluatePolynomial