A question about cubic equation general solution

cubicslinear algebra

In the Wikipedia article Cubic equation, the roots are obtained from the following:

$-\frac{1}{3a}(b+\xi^kC+\frac{\Delta_0}{\xi^kC})$

Where $C=\sqrt[3]\frac{\Delta_1\pm\sqrt{\Delta_1^2-4\Delta_0^3}}{2}$… but the $\sqrt{\Delta_1^2-4\Delta_0^3}$ can be trivial itself; because the amount under radical can be negative while the equation has roots. This is not my question here. If you want to know more about it look at this good question.

My question: as the wikipedia article states, $\xi=\frac{-1\pm i\sqrt{3}}{2}$ and $k\in{0,1,2}$. we obtain a real and two imaginary roots using the solution (the solution without $\xi$ in wikipedia is just for the real root).

But what if we have an equation with three real roots? this solution just yields one of the real roots.

I myself wonder if we can use different signs to obtain all three roots (we assume $k=0$).

$$-\frac{1}{3a}(b+\sqrt[3]\frac{\Delta_1+\sqrt{\Delta_1^2-4\Delta_0^3}}{{2}}+\frac{\Delta_0}{\sqrt[3]\frac{\Delta_1+\sqrt{\Delta_1^2-4\Delta_0^3}}{2}})$$, and $$-\frac{1}{3a}(b+\sqrt[3]\frac{\Delta_1-\sqrt{\Delta_1^2-4\Delta_0^3}}{{2}}+\frac{\Delta_0}{\sqrt[3]\frac{\Delta_1+\sqrt{\Delta_1^2-4\Delta_0^3}}{2}})$$, and $$-\frac{1}{3a}(b+\sqrt[3]\frac{\Delta_1+\sqrt{\Delta_1^2-4\Delta_0^3}}{{2}}+\frac{\Delta_0}{\sqrt[3]\frac{\Delta_1-\sqrt{\Delta_1^2-4\Delta_0^3}}{2}})$$

Note that if we choose both signs negative the answer doesn't differ from choosing both signs positive.

I have tried these three presumptive roots in several three-rooted qubics; but I failed except for that one root with both signs positive. Or maybe I had mistakes in solving them.

What do you think? Are these solutions applicable for all three real roots?

In that wikipedia article it is also stated that choosing the signs is arbitrary and doesn't change the answer. If signs aren't important, then how to find the other two real roots?

Best Answer

The solution for 3 real roots is buried in there, but it is not obtained by flipping signs. It really does involve the "cube roots of unity" which are spaced at 120 degrees, or $\dfrac{2\pi}{3}$ radians, apart around the unit circle.

In Wikipedia's formulation, the $\xi$ is a cube root of unity.

So first let's note that the reciprocal of $\xi^k$ is the complex conjugate of $\xi^k$ (the sign of the imaginary part is opposite)

$$ \dfrac{1}{\xi^k} = \left(\dfrac{-1\mp i\sqrt{3}}{2}\right)^k = \bar\xi^k = \overline{\xi^k} $$

Next note that there is another conjugate relationship

$$\begin{align*}\dfrac{\Delta_0}{C} & = \dfrac{\Delta_0}{\sqrt[3]{\dfrac{\Delta_1\pm\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}} \cdot \dfrac{\sqrt[3]{\dfrac{\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}}{\sqrt[3]{\dfrac{\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}}\\ \\ &= \dfrac{\Delta_0 \sqrt[3]{\dfrac{\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}}{\sqrt[3]{\dfrac{\left(\Delta_1\pm\sqrt{\Delta_1^2-4\Delta_0^3}\right)\left(\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}\right)}{4}}}\\ \\ &= \dfrac{\Delta_0 \sqrt[3]{\dfrac{\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}}{\sqrt[3]{\dfrac{\Delta_1^2-\Delta_1^2+4\Delta_0^3}{4}}}\\ \\ &= \sqrt[3]{\dfrac{\Delta_1\mp\sqrt{\Delta_1^2-4\Delta_0^3}}{2}} = C^* \end{align*}$$

where $C^*$ has the opposite sign inside the cube root compared to $C$.

So now your formula for the roots looks like

$$x_k = -\dfrac{1}{3a}\left(b + \xi^k C + \overline{\xi^k}C^*\right) \quad k \in \{0,1,2\}$$

For the case of three real roots, $\Delta_1^2-4\Delta_0^3 < 0$, so we can write $C$ and $C^*$ as

$$C = \sqrt[3]{\dfrac{\Delta_1\pm i\sqrt{4\Delta_0^3-\Delta_1^2}}{2}}$$ $$C^* = \sqrt[3]{\dfrac{\Delta_1\mp i\sqrt{4\Delta_0^3-\Delta_1^2}}{2}} = \overline{C}$$

So $C^*$ is actually the complex conjugate of $C$.

Now the formula for the case of 3 real roots is

$$\begin{align*}x_k &= -\dfrac{1}{3a}\left(b + \xi^k C + \overline{\xi^k}\overline{C}\right) \quad k \in \{0,1,2\}\\ \\ &= -\dfrac{1}{3a}\left(b + \xi^k C + \overline{\xi^kC}\right) \quad k \in \{0,1,2\}\\ \end{align*}$$

Notice that the last two terms in that expression are complex conjugates, meaning that their imaginary terms will cancel out when added together, leaving you with a real number, for any value of $k$.

Alternately, the above expression is equivalent to

$$x_k = -\dfrac{1}{3a}\left(b+2r\cos\left[\theta+\dfrac{2\pi}{3}k\right]\right) \quad k \in \{0,1,2\}$$

Where the $\dfrac{2\pi}{3}k$ portion of the angle, contributed by $\xi^k$, represents the angle in the complex plane of the 3 cube roots of unity.

$r$ and $\theta$ are the magnitude and angle of $C$ in the complex plane.

Update per request in the comments

I'm going to ignore Wikipedia's hard to remember formulation and use Nickalls' formulation instead to find the 3 real roots of

$$x^3-6x^2+11x-6 =0 $$

Start by finding some parameters based on the geometry of the cubic curve

$$\begin{align*} x_N &= \dfrac{-b}{3a} = 2\\ \\ \delta^2 &= \dfrac{b^2-3ac}{9a^2} = x_N^2 - \dfrac{c}{3a} = 4 - \dfrac{11}{3} = \dfrac{1}{3} \\ \\ y_N &= f(x_N) = \dfrac{2b^3}{27a^2} - \dfrac{bc}{3a} + d = 8-24+22-6 = 0\\ \\ h &= 2a\delta^3 =2\left(\dfrac{1}{3}\right)^{\frac{3}{2}} \\ \end{align*}$$

Then starting with the expression for the roots that is akin to the non-intuitive one presented by Wikipedia, let's express the roots in terms of a cosine function:

$$\begin{align*} x_k &= x_N + \sqrt[3]{\dfrac{1}{2a}\left(-y_N + \sqrt{y_N^2 - h^2}\right)} + \sqrt[3]{\dfrac{1}{2a}\left(-y_N - \sqrt{y_N^2 - h^2}\right)} \\ \\ &= x_N + 2\delta\left(\dfrac{1}{2}\sqrt[3]{\dfrac{-y_N}{h} + \sqrt{\left(\dfrac{-y_N}{h}\right)^2 -1}} + \dfrac{1}{2}\sqrt[3]{\dfrac{-y_N}{h} - \sqrt{\left(\dfrac{-y_N}{h}\right)^2 -1}}\right) \\ \\ &= x_N + 2\delta\left(\dfrac{1}{2}\sqrt[3]{\cos(3\theta+2\pi k) +i\sin(3\theta+2\pi k) } + \dfrac{1}{2}\sqrt[3]{\cos(3\theta+2\pi k) - i\sin(3\theta+2\pi k)}\right) \\ \\ &= x_N + 2\delta\left(\dfrac{1}{2}\sqrt[3]{e^{i(3\theta+2\pi k)}} + \dfrac{1}{2}\sqrt[3]{e^{-i(3\theta+2\pi k)}}\right) \\ \\ &= x_N + 2\delta\left(\dfrac{e^{i\left(\theta+\frac{2\pi}{3} k\right)} + e^{-i\left(\theta+\frac{2\pi}{3} k\right)}}{2}\right)\\ \\ &= x_N + 2\delta\cos\left(\theta + \frac{2\pi}{3} k\right) \\ \end{align*}$$

With

$$\dfrac{-y_N}{h} = \cos(3\theta)$$

or

$$\theta = \dfrac{1}{3}\mathrm{arccos}\left(\dfrac{-y_N}{h}\right) = \dfrac{1}{3}\mathrm{arccos}\left(0\right) = \dfrac{\pi}{6}$$

Plugging in numbers:

$$x_k = 2 + \dfrac{2}{\sqrt{3}}\cos\left(\dfrac{\pi}{6}+\dfrac{2\pi}{3}k\right) \quad k \in\{0,1,2\}$$

and we find the roots to be

$$x_k = 2 + \dfrac{2}{\sqrt{3}} \left(\left\{\dfrac{\sqrt{3}}{2},-\dfrac{\sqrt{3}}{2},0\right\}\right) = \{3, 1, 2\}$$

Related Question