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

Online Help

Home : Support : Online Help : ComplexBox/EvaluatePolynomial

ComplexBox

  

EvaluatePolynomial

  

evaluate a univariate polynomial at a ComplexBox object

 

Calling Sequence

Parameters

Description

Compatibility

Calling Sequence

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

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

Parameters

a

-

a ComplexBox object

c0, c1, ..., cn

-

complex constants or ComplexBox 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 ComplexBox 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 ComplexBox object, representing the value at which the polynomial is to be evaluated.

• 

The second argument is a list of  coefficients of the polynomial to be evaluated, where  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 ComplexBox object or a complex constant.

• 

Consider the polynomial . Evaluate it at the ComplexBox object with center  and radius  in the imaginary direction. We first use simple evaluation using the regular arithmetic operators.

poly := 292 + 72*x - 188*x^2 + 49*x^4;

(1)

cb := ComplexBox(RealBox(-1.47), RealBox(0, 0.01));

(2)

eval(poly, x = cb);

(3)
• 

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

poly_horner := convert(poly, 'horner');

(4)

eval(poly_horner, x = cb);

(5)
• 

However, this is still a severe overestimation of the radius. We write  and expand  as a polynomial in :

poly_eps := evalc(eval(poly, x = -1.47 + epsilon * I));

(6)
• 

We now plot the real and imaginary parts of the resulting polynomial as  varies between  and .

poly_im, poly_re := selectremove(has, poly_eps, I);

(7)

plot(poly_re, epsilon=-0.01 .. 0.01);

plot(poly_im/I, epsilon=-0.01 .. 0.01);

• 

We see that the real part achieves its maximum at  and its minimum at , and the imaginary part achieves its maximum at  and its minimum at .

eval(poly_re, epsilon=0), eval(poly_re, epsilon=0.01);

(8)

eval(poly_im/I, epsilon=0.01), eval(poly_im/I, epsilon=-0.01);

(9)
• 

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

EvaluatePolynomial(cb, PolynomialTools:-CoefficientList(poly, x));

(10)

Compatibility

• 

The ComplexBox:-EvaluatePolynomial command was introduced in Maple 2024.

• 

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

See Also

RealBox:-EvaluatePolynomial

 


Download Help Document