### 11.7.1 Roots and poles of a rational function

The froot command finds roots and poles of a rational function.

- froot takes rat, a rational function.
- froot(rat) returns a vector whose components are the roots and the poles of rat, each one followed by its multiplicity.

  If Xcas cannot find the exact values of the roots or poles, it tries to find approximate values if rat has numeric coefficients.

#### Examples

froot((x^5-2*x^4+x^3)/(x-2))

| ⎡ ⎣ | 1,2,0,3,2,−1 | ⎤ ⎦

Hence, for F(x)=x5−2x4+x3/x−2:

- 1 is a root of multiplicity 2,
- 0 is a root of multiplicity 3,
- 2 is a pole of order 1.

froot((x^3-2*x^2+1)/(x-2))

| ⎡ ⎢ ⎢ ⎣ | 1,1, |
√ |
5
| +1
2
| ,1, |
− | √ |
5
| +1
2
| ,1,2,−1 | ⎤ ⎥ ⎥ ⎦

##### Remark.

To find the complex roots and poles, put Xcas in complex mode (check the complex box in the CAS configuration, red button giving the state line; see Section 2.5.5).

#### Example

Input in complex mode:

froot((x^2+1)/(x-2))

| ⎡ ⎣ | −i,1,i,1,2,−1 | ⎤ ⎦