# Roots and poles of a rational function: froot

### 5.33.1 Roots and poles of a rational function: froot

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

- froot takes one argument:
  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 can not find the exact values of the roots or poles, it tries to find approximate values if rat has numeric coefficients.

#### Examples.

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

  | ⎡ ⎣ | 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.
- Input:
  froot((x^3-2*x^2+1)/(x-2))
  Output:

  ⎡
  ⎢
  ⎢
  ⎣

  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 Complex 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))

Output:

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