Computing with the exact root of a polynomial

### 11.1.21 Computing with the exact root of a polynomial

The rootof command finds the value of one polynomial at a root of another.

- rootof takes two arguments: P and Q, two polynomials given by the lists of their coefficients.
- rootof(P,Q) gives the value P(α) where α is the root of Q with largest real part (and largest imaginary part in case of equality).

In exact computations, Xcas will rewrite rational evaluations of rootof as a unique rootof with degree(P)<degree(Q). If the resulting rootof is the solution of a second degree equation, it will be simplified.

#### Example

Let α be the root with largest imaginary part of Q(x)=x4+10x2+1 (all roots of Q have real part equal to 0).

Compute 1/α.

normal(1/rootof([1,0],[1,0,10,0,1]))

−i | ⎛ ⎜ ⎝ | − | √ |
2
| + | √ |
3
| ⎞ ⎟ ⎠

P(x)=x is represented by [1,0] and α by rootof([1,0],[1,0,10,0,1]).

Compute α2.

normal(rootof([1,0],[1,0,10,0,1])^2)

or (since P(x)=x2 is represented by [1,0,0]):

normal(rootof([1,0,0],[1,0,10,0,1]))

−2 | √ |
6
| −5