ฅ՞>ﻌ<՞ฅ Woof! 🤍❤️🧡💛💚💙💜🖤
Last edit: 23 Aug 2026
Here we explore how to solve a cubic equation x³ + a x² + b x + c = 0, looking for a general solution.
The goal is to reduce a cubic equation to one without the x² term, such that the coefficient of x² is 0.
Starting from x³ + a x² + b x + c = 0,
we want to obtain y³ + py + q = 0.
Let x = y + k
(y + k)³ + a (y + k)² + b (y + k) + c = 0
y³ + 3y²k + 3yk² + k³ + a (y² + 2yk + k²) + b (y + k) + c = 0
y³ + (3k + a) y² + (3k² + 2ak + b) y + (k³ + ak² + bk + c) = 0
To make the coefficient of y² equal to 0:
3k + a = 0
k = - a / 3
Let p = 3k² + 2ak + b
p = 3(- a / 3)² + 2a(- a / 3) + b
p = a²/ 3 - 2a²/ 3 + b
p = b - a²/ 3
Let q = k³ + ak² + bk + c
q = (- a / 3)³ + a(- a / 3)² + b(- a / 3) + c
q = - a³ / 27 + a³ / 9 - ab / 3 + c
q = 2 a³ / 27 - ab / 3 + c
Thus, by substituting:
x = y - a / 3
p = b - a²/ 3
q = 2 a³ / 27 - ab / 3 + c
into x³ + a x² + b x + c = 0, we obtain the depressed cubic y³ + py + q = 0.
Starting from y³ + py + q = 0.
Suppose we are expanding (m - n)³:
(m - n)³ = m³ - 3m²n + 3mn² - n³
(m - n)³ = m³ - 3mn (m - n) - n³
(m - n)³ + 3mn (m - n) + (n³ - m³) = 0
Let y = (m - n)
y³ + 3mn (y) + (n³ - m³) = 0
We can see that:
p = 3mn
q = n³ - m³
Solve for m and n, by expressing them in terms of p and q, then we would find y from y = (m - n).
Rearranging from p = 3mn
n = p / 3m
Substituting into q = n³ - m³
q = (p / 3m)³ - m³
q = p³ / 27m³ - m³
Rearranging into a quadratic equation:
qm³ = p³ / 27 - (m³)²
(m³)² + qm³ - p³/27 = 0
Solving the quadratic equation with its infamous formula:
m³ = (- q ± √(q² - 4 (1) (- p³ / 27) ) ) / 2 (1)
m³ = (- q ± √(q² + 4p³ / 27) ) / 2
m = ∛ ( (- q ± √(q² + 4p³ / 27) ) / 2 )
n = p / 3m
n = p / (3 ( ∛ ( (- q ± √(q² + 4p³ / 27) ) / 2 ) ) )
Since y = m - n,
y = ∛ ( (- q ± √(q² + 4p³ / 27) ) / 2 ) - p / (3 ( ∛ ( (- q ± √(q² + 4p³ / 27) ) / 2 ) ) )
Which ± gives the three roots? Not quite yet...
This final formula is the Cardano expression, but the ± here should not be interpreted as simply giving the two or three roots. Also, if the discriminant here, q² + 4p³ / 27 < 0, then its calculation be another layer of disaster, because we now have to deal with complex numbers even when all three roots of the cubic are real. 💀
Introducing z³ = 1
z³ − 1 = 0
(z - 1) (z² + z + 1) = 0
First the brain dead solution, z = 1.
The other two come from z² + z + 1 = 0. Using quadratic formula:
z = (- 1 ± √ (1² - 4 (1) (1) ) ) / 2 (1)
z = (- 1 ± √ (-3) ) / 2
Since √ (-3) = i √ 3:
z = (- 1 ± i √ 3) / 2
z = - 1 / 2 ± i √ 3 / 2
Thus, the 3 cube roots of 1 are:
1
- 1 / 2 + i √ 3 / 2
- 1 / 2 - i √ 3 / 2
Simply naming the first complex root as:
w = - 1 / 2 + i √ 3 / 2
Then calculating w²:
w² = (- 1 / 2 + i √ 3 / 2)²
w² = 1 / 4 + 2 (- 1 / 2) (i √ 3 / 2) + (i √ 3 / 2)²
w² = 1 / 4 - i √ 3 / 2 - 3 / 4
w² = - 1 / 2 - i √ 3 / 2
Which is exactly the next complex root.
w³ = w² * w
w³ = (- 1 / 2 - i √ 3 / 2) * (- 1 / 2 + i √ 3 / 2)
w³ = 1 😲
Properties of Cube Root of Unity:
1 + w + w² = 0
w³ = 1
w⁴ = w
w⁵ = w²
w⁶ = 1
and so on ...
1 / w = w²
1 / w² = w
Back to:
m³ = (- q ± √(q² + 4p³ / 27) ) / 2
For simplicity, call the right-hand side A,
m³ = A
Therefore, m = ∛ A
Since w³ = 1,
w³ * m³ = 1 * A
(wm)³ = A
wm = ∛ A
So, wm is another cube root of A.
Similarly w⁶ = 1,
w⁶ * m³ = 1 * A
(w²m)³ = A
w²m = ∛ A
Likewise, w²m is another cube root of A.
Thus, the 3 cube roots of A = { m, wm, w²m }.
Since n = p / 3 m, and y = m - n, root of the depressed cubic are:
y₁ = m - p / 3 m
y₂ = wm - p / 3 wm
y₃ = w²m - p / 3 w²m
Knowing that 1 / w = w² and 1 / w² = w, the roots of the depressed cubic can be written more elegantly as:
y₁ = m - n
y₂ = wm - w²n
y₃ = w²m - wn
Back to:
m³ = (- q ± √(q² + 4p³ / 27) ) / 2
The ± is not a choice between the three roots. The other two values of m are then generated using the cube roots of unity. For the remainder of this derivation, we choose the + branch.
Thus,
m = ∛ ( (- q + √(q² + 4p³ / 27) ) / 2 )
n = p / (3 ( ∛ ( (- q + √(q² + 4p³ / 27) ) / 2 ) ) )
What if the discriminant q² + 4p³ / 27 < 0 ?
Starting from:
m³ = (- q + √(q² + 4p³ / 27) ) / 2
Let discriminant u = q² + 4p³ / 27,
m³ = (- q + √u) / 2
Since u < 0, √ u = i √ - u:
m³ = (- q + i √ - u) / 2
m³ = - q / 2 + i (√ - u / 2)
Convert the right-hand side to Euler's form such that re^(i Θ), where:
r = √( (- q / 2)² + (√ - u / 2)²)
r = √( q² / 4 - u / 4)
r = √(q² - u) / 2
r = √(q² - (q² + 4p³ / 27) ) / 2
r = √(- 4 p³ / 27) / 2
r = √(- p³ / 27)
tan Θ = (√ - u / 2) / (- q / 2)
tan Θ = √ - u / - q
A note that as r > 0, ∛ r = r^(1/3).
m³ = re^(i Θ)
m = ∛ (re^(i Θ))
m = r^(1/3) e^(i Θ / 3)
Applying cube root of unity, the cube root of r e^(i Θ):
m = r^(1/3) e^(i Θ / 3)
wm = wr^(1/3) e^(i Θ / 3)
w²m = w²r^(1/3) e^(i Θ / 3)
Rewriting w and w² in Euler's Form:
w = - 1 / 2 + i √ 3 / 2
w = e^(i 2π / 3)
w² = - 1 / 2 - i √ 3 / 2
w² = e^(i 4π / 3)
Thus, the cube root of r e^(i Θ):
m = r^(1/3) e^(i Θ / 3)
wm = e^(i 2π / 3) * r^(1/3) e^(i Θ / 3)
wm = r^(1/3) e^(i (2π + Θ) / 3)
w²m = e^(i 4π / 3) * r^(1/3) e^(i Θ / 3)
w²m = r^(1/3) e^(i (4π + Θ) / 3)
As for n = p / 3m:
n = p / (3 r^(1/3) e^(i Θ / 3) )
n = p / 3 * r^(-1/3) e^(- i Θ / 3)
w²n = e^(i 4π / 3) * p / 3 * r^(-1/3) e^(- i Θ / 3)
w²n = p / 3 * r^(-1/3) e^(i (4π - Θ) / 3)
wn = e^(i 2π / 3) * p / 3 * r^(-1/3) e^(- i Θ / 3)
wn = p / 3 * r^(-1/3) e^(i (2π - Θ) / 3)
Roots of the depressed cubic:
y₁ = m - n
y₁ = r^(1/3) e^(i Θ / 3) - p / 3 * r^(-1/3) e^(- i Θ / 3)
y₂ = wm - w²n
y₂ = r^(1/3) e^(i (2π + Θ) / 3) - p / 3 * r^(-1/3) e^(i (4π - Θ) / 3)
y₃ = w²m - wn
y₃ = r^(1/3) e^(i (4π + Θ) / 3) - p / 3 * r^(-1/3) e^(i (2π - Θ) / 3)
Since r = √(- p³ / 27):
r = (- p³ / 27) ^ (1/2)
r^(1/3) = ((- p³ / 27) ^ (1/2)) ^ (1/3)
r^(1/3) = ((- p³ / 27) ^ (1/3)) ^ (1/2)
r^(1/3) = (- p / 3 ) ^ (1/2)
r^(1/3) = √ (- p / 3 )
(- p / 3) = r^(2/3)
(- p / 3) * r^(-1/3) = r^(2/3) * r^(-1/3)
- p / 3 * r^(-1/3) = r^(1/3)
The first root of the depressed cubic y₁:
y₁ = r^(1/3) e^(i Θ / 3) - p / 3 * r^(-1/3) e^(- i Θ / 3)
y₁ = r^(1/3) e^(i Θ / 3) + r^(1/3) e^(- i Θ / 3)
y₁ = r^(1/3) (e^(i Θ / 3) + e^(- i Θ / 3) )
Knowing the identity e^(i Θ) + e^(- i Θ) = 2 cos Θ, then:
e^(i Θ / 3) + e^(- i Θ / 3) = 2 cos (Θ / 3)
y₁ = r^(1/3) * 2 cos (Θ / 3)
y₁ = 2 r^(1/3) cos (Θ / 3)
The imaginary parts cancelled out leaving a real root for y₁.
What about y₂ and y₃?
y₂ = r^(1/3) e^(i (2π + Θ) / 3) - p / 3 * r^(-1/3) e^(i (4π - Θ) / 3)
y₂ = r^(1/3) e^(i (2π + Θ) / 3) + r^(1/3) e^(i (4π - Θ) / 3)
y₂ = r^(1/3) * (e^(i (2π + Θ) / 3) + e^(i (4π - Θ) / 3))
y₃ = r^(1/3) e^(i (4π + Θ) / 3) - p / 3 * r^(-1/3) e^(i (2π - Θ) / 3)
y₃ = r^(1/3) e^(i (4π + Θ) / 3) + r^(1/3) e^(i (2π - Θ) / 3)
y₃ = r^(1/3) * (e^(i (4π + Θ) / 3) + e^(i (2π - Θ) / 3))
What if despite going through complex numbers, the cubic actually has three real roots?
Starting with the identity:
Casus Irreducibilis of y₂
y₂ = r^(1/3) * (e^(i (2π + Θ) / 3) + e^(i (4π - Θ) / 3))
Let A = (2π + Θ) / 3
Let B = (4π - Θ) / 3
A + B = (2π + Θ) / 3 + (4π - Θ) / 3
A + B = 6π / 3
A + B = 2π
(A + B) / 2 = π
A - B = (2π + Θ) / 3 - (4π - Θ) / 3
A - B = (2Θ - 2π) / 3
(A - B) / 2 = (Θ - π) / 3
y₂ = r^(1/3) * (e^(i A) + e^(i B))
y₂ = r^(1/3) * (2e^(i π) cos ((Θ - π) / 3))
Knowing that e^(i π) = -1,
y₂ = -2 r^(1/3) cos ((Θ - π) / 3)
Casus Irreducibilis of y₃
y₃ = r^(1/3) * (e^(i (4π + Θ) / 3) + e^(i (2π - Θ) / 3))
Let A = (4π + Θ) / 3
Let B = (2π - Θ) / 3
A + B = (4π + Θ) / 3 + (2π - Θ) / 3
A + B = 6π / 3
A + B = 2π
(A + B) / 2 = π
A - B = (4π + Θ) / 3 - (2π - Θ) / 3
A - B = (2π + 2Θ) / 3
(A - B) / 2 = (π + Θ) / 3
y₃ = r^(1/3) * (e^(i A) + e^(i B))
y₃ = r^(1/3) * (2e^(i π) cos ((π + Θ) / 3))
Knowing that e^(i π) = -1,
y₃ = -2 r^(1/3) cos ((π + Θ) / 3)
Casus irreducibilis payoff:
y₁ = 2 r^(1/3) cos (Θ / 3)
y₂ = -2 r^(1/3) cos ((Θ - π) / 3)
y₃ = -2 r^(1/3) cos ((π + Θ) / 3)
The discriminant u = q² + 4p³ / 27. When:
u > 0, 1 real + 2 complex conjugates. The other two roots are obtained using the cube roots of unity. Ugly complex number ahead!
u = 0, All real. At least 2 are identical. Easiest by far!
u < 0, 3 distinct real (casus irreducibilis). Apparently all real roots ended up with the most complex of calculation. What a paradox. 🥴
Let's build a cubic with roots x = { 2, 3 - 4i, 3 + 4i }.
(x - 2) (x - (3 - 4i)) (x - (3 + 4i)) = 0
(x - 2) (x²- (3 - 4i) x - (3 + 4i) x + (3 - 4i) (3 + 4i) ) = 0
(x - 2) (x² - 6 x + 9 + 16) = 0
(x - 2) (x² - 6 x + 25) = 0
x³ - 8x² + 37x - 50 = 0
x³ + a x² + b x + c = 0
a = - 8
b = 37
c = - 50
Depressing the cubic:
x = y - a / 3
x = y - (- 8) / 3
x = y + 8 / 3
p = b - a² / 3
p = 37 - (- 8)² / 3
p = 37 - 64 / 3
p = 47 / 3
q = 2 a³ / 27 - ab / 3 + c
q = 2 (- 8)³ / 27 - (- 8) (37) / 3 + (- 50)
q = - 2 (512) / 27 + 296 / 3 - 50
q = - 1024 / 27 + 2664 / 27 - 1350 / 27
q = 290 / 27
Thus, the depressed cubic:
y³ + (47 / 3) y + 290 / 27 = 0
Running the discriminant u = q² + 4p³ / 27:
Since q² > 0, p > 0, thus u > 0. This is the 1 real + 2 complex conjugates case.
Calculate u = q² + 4p³ / 27:
u = (290 / 27)² + 4 (47 / 3)³ / 27
u = 18496 / 27
From m³ = (- q + √u) / 2:
m³ = (- 290 / 27 + √ (18496 / 27) ) / 2
m ≈ 1.976067743
Then, n = p / 3 m:
n = (47 / 3) / 3 m
n = 47 / 9 m
n ≈ 47 / (9 * 1.976067743)
n ≈ 2.642734411
Note that cube roots of unity:
w = - 1 / 2 + i √ 3 / 2
w² = - 1 / 2 - i √ 3 / 2
Calculating y:
y₁ = m - n
y₁ ≈ 1.976067743 - 2.642734411
y₁ ≈ - 0.66667
y₂ = wm - w²n
y₂ ≈ (- 1 / 2 + i √ 3 / 2) * 1.976067743 - (- 1 / 2 - i √ 3 / 2) * 2.642734411
y₂ ≈ 0.33333334 + 4i
y₃ = w²m - wn
y₃ ≈ (- 1 / 2 - i √ 3 / 2) * 1.976067743 - (- 1 / 2 + i √ 3 / 2) * 2.642734411
y₃ ≈ 0.333333334 - 4i
Back to x = y + 8 / 3:
x₁ ≈ - 0.66667 + 8 / 3
x₁ ≈ 2
x₂ ≈ 0.33333334 + 4i + 8 / 3
x₂ ≈ 3 + 4i
x₃ ≈ 0.33333334 - 4i + 8 / 3
x₃ ≈ 3 - 4i
x = { 2, 3 + 4i, 3 - 4i }
Starting with roots x = { 2, 3, 3 }.
(x - 2) (x - 3) (x - 3) = 0
(x - 2) (x² - 6 x + 9) = 0
x³ - 8 x² + 21 x - 18 = 0
x³ + a x² + b x + c = 0
a = - 8
b = 21
c = - 18
Depressing the cubic:
x = y - a / 3
x = y - (- 8) / 3
x = y + 8 / 3
p = b - a² / 3
p = 21 - (- 8)² / 3
p = 21 - 64 / 3
p = - 1 / 3
q = 2 a³ / 27 - ab / 3 + c
q = 2 (- 8)³ / 27 - (- 8) (21) / 3 + (- 18)
q = - 2 (512) / 27 + 168 / 3 - 18
q = 2 / 27
Hence, the depressed cubic:
y³ - (1 / 3) y + 2 / 27 = 0
Running the discriminant u = q² + 4p³ / 27:
u = (2 / 27)² + 4 (- 1 / 3)³ / 27
u = 0, leading to all 3 real roots with at least 2 identical roots.
From m³ = (- q + √u) / 2:
m³ = - q / 2
m³ = - q / 2
m³ = - (2 / 27) / 2
m³ = - 1 / 27
m = - 1 / 3
Then, n = p / 3 m:
n = (- 1 / 3) / 3 (- 1 / 3)
n = 1 / 3
Note that cube roots of unity:
w = - 1 / 2 + i √ 3 / 2
w² = - 1 / 2 - i √ 3 / 2
Calculating y:
y₁ = m - n
y₁ = - 1 / 3 - 1 / 3
y₁ = - 2 / 3
y₂ = wm - w²n
y₂ = (- 1 / 2 + i √ 3 / 2) * (- 1 / 3) - (- 1 / 2 - i √ 3 / 2) * (1 / 3)
y₂ = 1 / 6 + 1 / 6 - (1 / 3) (i √ 3 / 2) + (1 / 3) (i √ 3 / 2)
y₂ = 1 / 3
y₃ = w²m - wn
y₃ = (- 1 / 2 - i √ 3 / 2) (- 1 / 3) - (- 1 / 2 + i √ 3 / 2) * (1 / 3)
y₃ = 1 / 6 + 1/ 6 + (1 / 3) (i √ 3 / 2) - (1 / 3) (i √ 3 / 2)
y₃ = 1 / 3
The complex part of y₂ and y₃ beautifully conjugated and cancelled out each other, leaving only the same real part.
Calculating x = y + 8 / 3 :
x₁ = - 2 / 3 + 8 / 3
x₁ = 2
x₂ = 1 / 3 + 8 / 3
x₂ = 3
x₃ = 1 / 3 + 8 / 3
x₃ = 3
x = { 2, 3, 3 }
Let's generate one cubic equation with roots { 2, 3, 6 }.
(x - 2) (x - 3) (x - 6) = 0
(x - 2) (x² -9x + 18) = 0
x³ - 11x²+ 36x - 36 = 0
x³ + a x² + b x + c = 0
a = - 11
b = 36
c = - 36
Depressing the cubic:
x = y - a / 3
x = y + 11 / 3
p = b - a² / 3
p = 36 - (- 11)² / 3
p = 36 - 121 / 3
p = - 13 / 3
q = 2 a³ / 27 - ab / 3 + c
q = 2 (- 11)³ / 27 - (- 11)(36) / 3 + (- 36)
q = - 2662 / 27 + 132 - 36
q = - 2662 / 27 + 132 - 36
q = - 2662 / 27 + 96
q = - 70 / 27
Thus, the depressed cubic:
y³ - (13 / 3) y - 70 / 27 = 0
Running the discriminant u = q² + 4p³ / 27:
u = (- 70 / 27)² + 4 (- 13 / 3)³ / 27
u = 4900 / 729 - 8788 / 729
u = - 3888 / 729
u < 0, this one would land in the casus irreducibilis case, leading to 3 distinct real roots.
From our previous derivation,
r^(1/3) = √ (- p / 3 )
r^(1/3) = √ (- (- 13 / 3) / 3)
r^(1/3) = √ (13 / 9)
r^(1/3) = √ 13 / 3
From m³ = - q / 2 + i (√ - u / 2):
m³ = - (- 70 / 27) / 2 + i (√ - (- 3888 / 729) / 2)
m³ = 70 / 27 / 2 + i (√ (3888 / 729) / 2)
Both the real and imaginary parts > 0, so m³ lies in Quadrant I of the Argand diagram.
tan Θ = √ - u / - q
tan Θ = √ - (- 3888 / 729) / - (- 70 / 27)
tan Θ = √ 3888 / 70
tan Θ = 36 √ 3 / 70
tan Θ = 18 √ 3 / 35
Θ ≈ 0.7287 rad
y₁ = 2 r^(1/3) cos (Θ / 3)
y₁ = 2 √ 13 / 3 cos (Θ / 3)
y₁ ≈ 2 √ 13 / 3 cos (0.7287 / 3)
y₁ ≈ 2 √ 13 / 3 cos (0.7287 / 3)
y₁ ≈ 2.3333
y₂ = -2 r^(1/3) cos ((Θ - π) / 3)
y₂ = -2 √ 13 / 3 cos ((Θ - π) / 3)
y₂ ≈ -2 √ 13 / 3 cos ((0.7287 - π) / 3)
y₂ ≈ -1.6667
y₃ = -2 r^(1/3) cos ((π + Θ) / 3)
y₃ = -2 √ 13 / 3 cos ((π + Θ) / 3)
y₃ ≈ -2 √ 13 / 3 cos ((π + 0.7287) / 3)
y₃ ≈ -0.6667
Back to x = y + 11 / 3:
x₁ ≈ 2.3333 + 11 / 3
x₁ ≈ 7 / 3 + 11 / 3
x₁ ≈ 6
x₂ ≈ -1.6667 + 11 / 3
x₂ ≈ - 5 / 3 + 11 / 3
x₂ ≈ 2
x₃ ≈ -0.6667 + 11 / 3
x₃ ≈ - 2 / 3 + 11 / 3
x₃ ≈ 3
x = { 2, 3, 6 }
We started with a cubic whose roots were deliberately chosen to be 2, 3, 6. After depressing the cubic and passing through the casus irreducibilis machinery, Cardano's formula brings us back to those same three real roots.
Congratz! That's all to it here. Thanks for sticking out until the end. 🎉