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

Online Help

evala/RealPart

real part of an algebraic number

evala/ImaginaryPart

imaginary part of an algebraic number

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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 x with rational or complex rational coefficients

x

-

variable (default: _Z)

c

-

complex(numeric) approximation to the root

a,b

-

complex(numeric) interval bounds for the root

i

-

posint; root selector, between 1 and the degree of p; 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 RootOfq, where q is a squarefree polynomial with rational coefficients of smallest possible degree whose roots include the real parts of all the roots of p. Note that in general q will have additional (real or complex) roots that do not correspond to real parts of roots of p.

• 

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 RootOf. Usually, the 1st operand of the RootOf will be an irreducible polynomial, and the 2nd operand (selector) will be of the same type as the selector of the input.

Examples

evalaRealPartRootOfx4+x2+1

RootOf4_Z21

(1)

evalaImaginaryPartRootOfx4+x2+1

RootOf4_Z23

(2)

fRootOfx4+x2+1,index=1:

re,imevalaRealPartf,evalaImaginaryPartf

re,im12,RootOf4_Z23,index=real2

(3)

evalaNormalre+Iimf

0

(4)

gRootOfx4+x2+1,1I..0:

evalfg

−0.50000000000.8660254038I

(5)

re,imevalaRealPartg,evalaImaginaryPartg

re,im12,RootOf4_Z23,−1..0

(6)

evalfre,evalfim

−0.5000000000,−0.8660254038

(7)

evalaRealPartRootOfx10+1=RootOfexpandChebyshevT5,x

RootOf16_Z520_Z3+5_Z=RootOf16_Z520_Z3+5_Z

(8)

The input may have complex rational coefficients.

fRootOfx3I:

evalaRealPartf,evalaImaginaryPartf

RootOf4_Z33_Z,RootOf2_Z2+_Z1

(9)

gRootOfx3I,0..1+I:

evalaRealPartg,evalaImaginaryPartg

RootOf4_Z23,0..1,12

(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.

px4+x1

px4+x1

(11)

fsolvep,complex

−1.220744085,0.24812606281.033982061I,0.2481260628+1.033982061I,0.7244919590

(12)

revalaRealPartRootOfp

rRootOf64_Z10+64_Z748_Z6_Z4+16_Z316_Z2_Z+1

(13)

fsolveopr

−1.220744085,−0.2481260628,0.2481260628,0.7244919590

(14)

In this example, the polynomial p has real roots, and therefore appears as a factor in the polynomial q defining the resulting RootOf.

factoropr

_Z4+_Z164_Z6+16_Z21

(15)

forito4dorevalaRealPartRootOfp,index=i;printr,evalfrenddo:

RootOf_Z4+_Z1,index=real2,0.7244919590

RootOf64_Z6+16_Z21,index=real2,0.2481260628

RootOf_Z4+_Z1,index=real1,−1.220744085

RootOf64_Z6+16_Z21,index=real2,0.2481260628

(16)

For an irreducible polynomial with all roots real, RealPart returns the input RootOf.

px43x2+1

px43x2+1

(17)

fsolvep

−1.618033989,−0.6180339887,0.6180339887,1.618033989

(18)

evalaRealPartRootOfp,evalaImaginaryPartRootOfp

RootOf_Z43_Z2+1,0

(19)

Compatibility

• 

The evala/RealPart and evala/ImaginaryPart commands were introduced in Maple 2025.

• 

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

See Also

evala

evala/Minpoly

evalc

Im

Re

RootOf

 


Download Help Document