# How do you find all the real and complex roots of x^3+x^2+x+2?

May 28, 2016

Use Cardano's method to find Real zero:

${x}_{1} = - \frac{1}{3} \left(1 + \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} + \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}\right)$

and related Complex zeros.

#### Explanation:

$f \left(x\right) = {x}^{3} + {x}^{2} + x + 2$

By the rational root theorem, any zeros of $f \left(x\right)$ must be expressible in the form $\frac{p}{q}$ for integers $p , q$ with $p$ a divisor of the constant term $2$ and $q$ a divisor of the coefficient $1$ of the leading term.

That means that the only possible rational zeros are:

$\pm 1$, $\pm 2$

In addition, all of the coefficients of $f \left(x\right)$ are positive, so any Real zeros it has will be negative ones. That leaves:

$- 1$, $- 2$

We find:

$f \left(- 1\right) = - 1 + 1 - 1 + 2 = 3$

$f \left(- 2\right) = - 8 + 4 - 2 + 2 = - 4$

So $f \left(x\right)$ has no rational zeros and has an irrational zero in $\left(- 2 , - 1\right)$.

The discriminant $\Delta$ of a cubic $a {x}^{3} + b {x}^{2} + c x + d$ is given by the formula:

$\Delta = {b}^{2} {c}^{2} - 4 a {c}^{3} - 4 {b}^{3} d - 27 {a}^{2} {d}^{2} + 18 a b c d$

In our example $a = b = c = 1$, $d = 2$ and we find:

$\Delta = 1 - 4 - 8 - 108 + 36 = - 83 < 0$

Since $\Delta < 0$, we can deduce that $f \left(x\right)$ has one Real zero and a Complex conjugate pair of non-Real zeros.

To simplify the cubic to have no square term, first multiply by ${3}^{3} = 27$ to reduce the arithmetic involving fractions.

$27 f \left(x\right) = 27 {x}^{3} + 27 {x}^{2} + 27 x + 54$

$= {\left(3 x + 1\right)}^{3} + 6 \left(3 x + 1\right) + 47$

Let $t = 3 x + 1$

We want to solve:

${t}^{3} + 6 t + 47 = 0$

Using Cardano's method, let $t = u + v$

${u}^{3} + {v}^{3} + 3 \left(u v + 2\right) \left(u + v\right) + 47 = 0$

Let $v = - \frac{2}{u}$ to eliminate the term in $\left(u + v\right)$

${u}^{3} - \frac{8}{u} ^ 3 + 47 = 0$

Multiply through by ${u}^{3}$ and rearrange slightly to get:

${\left({u}^{3}\right)}^{2} + 47 \left({u}^{3}\right) - 8 = 0$

Use the quadratic formula to find:

${u}^{3} = \frac{- 47 \pm \sqrt{{47}^{2} - 4 \left(1\right) \left(- 8\right)}}{2}$

$= \frac{- 47 \pm \sqrt{2209 + 32}}{2}$

$= \frac{- 47 \pm \sqrt{2241}}{2}$

$= \frac{- 47 \pm 3 \sqrt{249}}{2}$

This is Real and the derivation was symmetric in $u$ and $v$, so we can use one of these roots for ${u}^{3}$ and the other for ${v}^{3}$ to find the Real root:

${t}_{1} = - \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} - \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}$

and Complex roots:

${t}_{2} = - \omega \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} - {\omega}^{2} \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}$

${t}_{3} = - {\omega}^{2} \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} - \omega \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}$

where $\omega = - \frac{1}{2} + \frac{\sqrt{3}}{2} i$ is the primitive Complex cube root of $1$.

Then $x = \frac{1}{3} \left(t - 1\right)$, so the zeros of the original cubic are:

${x}_{1} = - \frac{1}{3} \left(1 + \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} + \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}\right)$

${x}_{2} = - \frac{1}{3} \left(1 + \omega \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} + {\omega}^{2} \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}\right)$

${x}_{3} = - \frac{1}{3} \left(1 + {\omega}^{2} \sqrt[3]{\frac{47 + 3 \sqrt{249}}{2}} + \omega \sqrt[3]{\frac{47 - 3 \sqrt{249}}{2}}\right)$

May 28, 2016

$\left({\left(x - 0.1766\right)}^{2} + {1.2028}^{2}\right) \left(x + 1.3532\right) \approx {x}^{3} + {x}^{2} + x + 2$

#### Explanation:

A polynomial with real coefficients and with an odd maximum degree has at least a real root.
Having this in mind we propose for the polynomial a structure such as

${x}^{3} + {x}^{2} + x + 2 = \left({\left(x - a\right)}^{2} + {b}^{2}\right) \left(x - c\right)$
Here we are supposing that the two other roots are complex conjugate. Equating the coefficients we have

{ (2 + a^2 c + b^2 c=0),( 1 - a^2 - b^2 - 2 a c=0), (1 + 2 a + c=0) :}

Handling the first and the second equations eliminating ${a}^{2} + {b}^{2}$ we get the reduced system

 { (2 + c - 2 a c^2 = 0), (1 + 2 a + c = 0) :}

plotting those equations we can observe that there is an intersection approximately for $a = 0.1 , b = - 1.0$

This coarse initial "solution" will be conveniently approximated using correction formulas. The approximation formulas can be obtained substituting for $a \to a + {\delta}_{a}$ and $b \to b + {\delta}_{b}$ and considering that ${\delta}_{a}^{2} < \left\mid {\delta}_{a} \right\mid$ and ${\delta}_{b}^{2} < \left\mid {\delta}_{b} \right\mid$ resulting in

{ (2 + c - 2 a c^2 - 2 c^2 delta_a + delta_c - 4 a c delta_c = 0), (1 + 2 a + c + 2 delta_a + delta_c =0):}

Solving for ${\delta}_{a} , {\delta}_{b}$

{(delta_a = -((-1 + 2 a - 4 a c - 8 a^2 c - 2 a c^2)/( 2 (1 - 4 a c + c^2)))), (delta_c = -1 - 2 a - c + (-1 + 2 a - 4 a c - 8 a^2 c - 2 a c^2)/( 1 - 4 a c + c^2)) :}

substituting the initial values we get
${\delta}_{a} = 0.108333 , {\delta}_{b} = - 0.416667$
once more now with $a = 0.208333 , b = - 1.41667$
${\delta}_{a} = - 0.0301958 , {\delta}_{c} = 0.0603957$
obtaining after three iterations
$a = 0.1766 , c = - 1.3532$ within an acceptable error.
The calculation of $b$ follows without more problems giving
$b = - 1.2028$
The final result is
$\left({\left(x - 0.1766\right)}^{2} + {1.2028}^{2}\right) \left(x + 1.3532\right) \approx {x}^{3} + {x}^{2} + x + 2$