Exact values of rational roots of a polynomial: rationalroot

### 6.29.7 Exact values of rational roots of a polynomial: rationalroot

The rationalroot command finds rational roots of polynomials.

- rationalroot takes one mandatory and two optional arguments:
  - P, a polynomial.
  - Optionally, α and β, two real numbers.
- rationalroot(P) returns the list of the value of the rational roots of P without multiplicity.
- rationalroot(P,α,β) returns the list of the rational roots of P which are in the interval [α,β].

Examples.

- Find the rational roots of 2*x3−3*x2−8*x+12:
  Input:
  rationalroot(2*x^3-3*x^2-8*x+12)
  Output:

  ⎡ ⎢ ⎢ ⎣ | 2,−2, |
  3
  2
  | ⎤ ⎥ ⎥ ⎦

- Find the rational roots of 2*x3−3*x2−8*x+12 in [1,2]:
  Input:
  rationalroot(2*x^3-3*x^2-8*x+12,1,2)
  Output:

  ⎡ ⎢ ⎢ ⎣ | 2, |
  3
  2
  | ⎤ ⎥ ⎥ ⎦

- Find the rational roots of 2*x3−3*x2+8*x−12:
  Input:
  rationalroot(2*x^3-3*x^2+8*x-12)
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  3
  2
  | ⎤ ⎥ ⎥ ⎦

- Find the rational roots of 2*x3−3*x2+8*x−12:
  Input:
  rationalroot(2*x^3-3*x^2+8*x-12)
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  3
  2
  | ⎤ ⎥ ⎥ ⎦

- Find the rational roots of (3*x−2)2*(2x+1)=18*x3−15*x2−4*x+4:
  Input:
  rationalroot(18*x^3-15*x^2-4*x+4)
  Output:

  ⎡ ⎢ ⎢ ⎣ | − |
  1
  2
  | , |
  2
  3
  | ⎤ ⎥ ⎥ ⎦