Exact bounds for real roots of a polynomial: realroot

### 5.29.1 Exact bounds for real roots of a polynomial: realroot

The realroot command finds bounds for the real roots of a polynomial.

- realroot takes two mandatory arguments and two optional arguments:
  - P, a polynomial.
  - є, a postive real number.
  - Optionally, a, b, two complex numbers.
- realroot(P,є) returns a list of vectors, where the elements of each vector are a list containing one of:
  - an interval of length less than є containing a real root of the polynomial and the multiplicity of this root.
  - the value of an exact real root of the polynomial and the multiplicity of this root.
- realroot(P,є,a,b) returns a list of vectors as above, but only for the roots lying in the interval [a,b].

#### Examples.

- Find the real roots of x3+1.
  Input:
  realroot(x^3+1, 0.1)
  Output:

  ⎡ ⎣ |
  −1 | 1
  | ⎤ ⎦

- Find the real roots of x3−x2−2x+2.
  Input:
  realroot(x^3-x^2-2*x+2, 0.1)
  Output:

  ⎡ ⎢ ⎢ ⎣ |
  −[1.40624999999999..1.50000000000001] | 1
  1 | 1
  [1.37499999999999..1.43750000000001] | 1
  | ⎤ ⎥ ⎥ ⎦

- Find the real roots of x3−x2−2x+2 in the interval [0;2].
  Input:
  realroot(x^3-x^2-2*x+2, 0.1,0,2)
  Output:

  ⎡ ⎢ ⎣ |
  1 | 1
  [1.37499999999999..1.43750000000001] | 1
  | ⎤ ⎥ ⎦