|
Calling Sequence
|
|
evala(RealPart(RootOf(p, x))
evala(ImaginaryPart(RootOf(p, x))
evala(RealPart(RootOf(p, x, c))
evala(ImaginaryPart(RootOf(p, x, c))
evala(RealPart(RootOf(p, x, a..b))
evala(ImaginaryPart(RootOf(p, x, a..b))
evala(RealPart(RootOf(p, x, index=i))
evala(ImaginaryPart(RootOf(p, x, index=i))
|
|
Parameters
|
|
p
|
-
|
polynomial in with rational or complex rational coefficients
|
x
|
-
|
variable (default: )
|
c
|
-
|
complex(numeric) approximation to the root
|
a,b
|
-
|
complex(numeric) interval bounds for the root
|
i
|
-
|
posint; root selector, between and the degree of ; see RootOf
|
|
|
|
|
Description
|
|
•
|
The RealPart and ImaginaryPart functions are placeholders for representing the real or imaginary parts, respectively, of an algebraic number given in RootOf notation. It is used in conjunction with evala.
|
•
|
The call evala(RealPart(RootOf(p))) computes , where is a squarefree polynomial with rational coefficients of smallest possible degree whose roots include the real parts of all the roots of . Note that in general will have additional (real or complex) roots that do not correspond to real parts of roots of .
|
•
|
The call evala(ImaginaryPart(RootOf(p))) works analogously.
|
•
|
The other calling sequences return a RootOf expression or a rational number encoding the real/imaginary part of the given . Usually, the 1st operand of the will be an irreducible polynomial, and the 2nd operand (selector) will be of the same type as the selector of the input.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
>
|
|
| (3) |
>
|
|
| (5) |
>
|
|
| (6) |
| (7) |
>
|
|
| (8) |
The input may have complex rational coefficients.
>
|
|
| (9) |
>
|
|
>
|
|
| (10) |
For the first two calling sequences, the result in general has more roots than just the real or imaginary parts, some of them even real.
| (12) |
>
|
|
| (13) |
| (14) |
In this example, the polynomial p has real roots, and therefore appears as a factor in the polynomial q defining the resulting .
| (15) |
>
|
|
| |
| |
| |
| (16) |
For an irreducible polynomial with all roots real, RealPart returns the input .
| (18) |
>
|
|
| (19) |
|
|
Compatibility
|
|
•
|
The evala/RealPart and evala/ImaginaryPart commands were introduced in Maple 2025.
|
|
|
|