Ken Ward's Mathematics Pages

Examples Using Cardano's Method to Solve Cubic Equations

  1. 64x³–48x²+12x–1
  2.  x³+6x²+11x+6
  3. x³+3x²+3x–2
  4. x³+2x²+10x–20
  5.  x³+x²+10x–3
  6. x³+4x²+x–6
  7. 1000x³–1254x²–496x+191

64x³–48x²+12x–1

Cubic in normal form: x³–0.75x²+0.1875x–0.015625
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=0 q=0
So the new equation is:
t3+0t +0 [2]
As p and q are zero, then all the roots are real and equal to –a/3 (0.25)
In summary, the roots for
Cubic: 64x³–48x²+12x–1 are:
x1=0.25 (Remainder=0)
x2=0.25 (Remainder=0)
x3=0.25 (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

 x³+6x²+11x+6

Cubic in normal form: x³+6x²+11x+6
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=–1 q=0
So the new equation is:
t3–1t +0 [2]
x1=–a/3, x2=–a/3± √(–p)
As p<0, then all the roots are real
In summary, the roots for
x³+6x²+11x+6 are:
x1=–2 (Remainder=0)
x2=–1 (Remainder=0)
x3=–3 (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

x³+3x²+3x–2

Cubic in normal form: x³+3x²+3x–2
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=0 q=–3
So the new equation is:
t3+0t –3 [2]
As p=0, and q=–3
t= ∛(–q)=∛(3)
so x=t–a/3=∛(–q)–a/3=∛(3)–1
In summary, the roots for
Cubic: x³+3x²+3x–2 are:
x1=0.4422495703 (Remainder=0)
x2=–1.7211247852+1.2490247665i (Remainder=0)
x3=–1.7211247852–1.2490247665i (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

x³+2x²+10x–20

In 1225, Leonardo da Pisa found the root 1.368808107 of this equation. For his time it is intriguing, especially because this a truncated value. Rounded to 9 places, it is  1.368808108.
Cubic in normal form: x³+2x²+10x–20
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=8.666666666666666 q=–26.074074074074076
So the new equation is:
t3+8.666666666666666t –26.074074074074076 [2]
The discriminant of the cubic, D=(p/3)3+(q/2)2
Before rounding, D=194.0740740740741
D=194.0740740740741
D> 0→ 2 complex roots
D=0 → real roots, with two the same
D<0 → Three real roots
Because D>0, two of the roots are complex
Our reduced equation is:
t3+8.666666666666666t –26.074074074074076 [2, repeated]
Or in algebra, t³+pt+q=0
There is a relationship:
(u–v)3+3uv(u–v)–(u3–v3)=0, which indicates how we might solve the equation
If we set t=u–v, p=3uv, or v=p/3u and q=–(u3–v3), that is:
v=8.666666666666666/(3u) [4]
u3–(8.666666666666666/(3*u)–26.074074074074076=0 [5]
So u3– p3/(27u3)+q= 0
Hence, We need to find numbers, u and v, such that:
u³–v³=–q, and uv=p/3, giving t=v–u
u³–v³=26.074074074074076, [6] and
uv=8.666666666666666/3 [7]
Using v=8.666666666666666/3u, we can eliminate u
u³– p³/27u³ =–q
The resulting equation is:
27u6 + 27qu3 –p3=0
Normalised, this is
u6 + qu3 –p3/27=0
=u6 +26.074074074074076*u3 –8.6666666666666663/27=0
This is a quadratic equation in u3, so we know how to solve it
u3=–q/2 ±√(q2/4 +p3/27) (5)
The square root may be negative, making the u's complex numbers, although the resulting roots might not be complex.
D=679.857338820302/4+650.9629629629628/27=
194.0740740740741
After rounding, D=194.0740740740741
The square root above isn't negative, so two of the roots are complex
u= ∛(–q/2+√(D))=2.9988174659594593
v= ∛(q/2+√(D))=0.9633426914714203
x1=u1–v1–a/3=1.3688081078213723,0
x2=–0.5*(u1–v1)–a/3+(u1+v1)*√(3)/2i
x2=–1.6844040539+3.4313313502i
Now we know x2, we also know that x3 simply has the opposite sign imaginary part:
So x3=Re(x2)–Im(x2)=–1.684404053910686–3.4313313501976923i, but here is the formula:
x3=–0.5*(u1–v1)–a/3+(u1+v1)*√(3)/2i
x3=–1.6844040539–3.4313313502i
In summary, the roots for
Cubic: x³+2x²+10x–20 are:
x1=1.3688081078 (Remainder=0)
x2=–1.6844040539+3.4313313502i (Remainder=0)
x3=–1.6844040539–3.4313313502i (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

 x³+x²+10x–3

Cubic in normal form: x³+x²+10x–3
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=9.666666666666666 q=–6.2592592592592595
So the new equation is:
t3+9.666666666666666t –6.2592592592592595 [2]
The discriminant of the cubic, D=(p/3)3+(q/2)2
Before rounding, D=43.249999999999986
D=43.249999999999986
D> 0→ 2 complex roots
D=0 → real roots, with two the same
D<0 → Three real roots
Because D>0, two of the roots are complex
Our reduced equation is:
t3+9.666666666666666t –6.2592592592592595 [2, repeated]
Or in algebra, t³+pt+q=0
There is a relationship:
(u–v)3+3uv(u–v)–(u3–v3)=0, which indicates how we might solve the equation
If we set t=u–v, p=3uv, or v=p/3u and q=–(u3–v3), that is:
v=9.666666666666666/(3u) [4]
u3–(9.666666666666666/(3*u)–6.2592592592592595=0 [5]
So u3– p3/(27u3)+q= 0
Hence, We need to find numbers, u and v, such that:
u³–v³=–q, and uv=p/3, giving t=v–u
u³–v³=6.2592592592592595, [6] and
uv=9.666666666666666/3 [7]
Using v=9.666666666666666/3u, we can eliminate u
u³– p³/27u³ =–q
The resulting equation is:
27u6 + 27qu3 –p3=0
Normalised, this is
u6 + qu3 –p3/27=0
=u6 +6.2592592592592595*u3 –9.6666666666666663/27=0
This is a quadratic equation in u3, so we know how to solve it
u3=–q/2 ±√(q2/4 +p3/27) (5)
The square root may be negative, making the u's complex numbers, although the resulting roots might not be complex.
D=39.17832647462277/4+903.2962962962962/27=
43.24999999999999
After rounding, D=43.24999999999999
The square root above isn't negative, so two of the roots are complex
u= ∛(–q/2+√(D))=2.133118405301851
v= ∛(q/2+√(D))=1.510568852724448
x1=u1–v1–a/3=0.28921621924406943,0
x2=–0.5*(u1–v1)–a/3+(u1+v1)*√(3)/2i
x2=–0.6446081096+3.1555257289i
Now we know x2, we also know that x3 simply has the opposite sign imaginary part:
So x3=Re(x2)–Im(x2)=–0.6446081096220346–3.1555257288964396i, but here is the formula:
x3=–0.5*(u1–v1)–a/3+(u1+v1)*√(3)/2i
x3=–0.6446081096–3.1555257289i
In summary, the roots for
Cubic: x³+x²+10x–3 are:
x1=0.2892162192 (Remainder=0)
x2=–0.6446081096+3.1555257289i (Remainder=0)
x3=–0.6446081096–3.1555257289i (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

x³+4x²+x–6

Cubic in normal form: x³+4x²+x–6
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=–4.333333333333333 q=–2.5925925925925926
So the new equation is:
t3–4.333333333333333t –2.5925925925925926 [2]
The discriminant of the cubic, D=(p/3)3+(q/2)2
Before rounding, D=–1.3333333333333335
D=–1.333333333333333
D> 0→ 2 complex roots
D=0 → real roots, with two the same
D<0 → Three real roots
Because D<0, all the roots are real and distinct
Our reduced equation is:
t3–4.333333333333333t –2.5925925925925926 [2, repeated]
Or in algebra, t³+pt+q=0
There is a relationship:
(u–v)3+3uv(u–v)–(u3–v3)=0, which indicates how we might solve the equation
If we set t=u–v, p=3uv, or v=p/3u and q=–(u3–v3), that is:
v=–4.333333333333333/(3u) [4]
u3–(–4.333333333333333/(3*u)–2.5925925925925926=0 [5]
So u3– p3/(27u3)+q= 0
Hence, We need to find numbers, u and v, such that:
u³–v³=–q, and uv=p/3, giving t=v–u
u³–v³=2.5925925925925926, [6] and
uv=–4.333333333333333/3 [7]
Using v=–4.333333333333333/3u, we can eliminate u
u³– p³/27u³ =–q
The resulting equation is:
27u6 + 27qu3 –p3=0
Normalised, this is
u6 + qu3 –p3/27=0
=u6 +2.5925925925925926*u3 +4.3333333333333333/27=0
This is a quadratic equation in u3, so we know how to solve it
u3=–q/2 ±√(q2/4 +p3/27) (5)
The square root may be negative, making the u's complex numbers, although the resulting roots might not be complex.
D=6.72153635116598/4–81.37037037037035/27=
–1.3333333333333326
After rounding, D=–1.333333333333332
The square root is a complex number, because D<0
u=∛(1.2962962962962963 ±√(1.333333333333332) i)
We need to find the cube roots of u3= 1.2962962963+1.1547005384i
Convert to trigonometric form
D=(q/2)2+(p/3)3
So u3=–q/2+√(–D) i
As u3–v3=–q,
v3=q/2+√(–D) i
r is therefore the same for both u and v [A]
r2=(–q/2)2–D
=(–q/2)2–(q/2)2+(p/3)3)
=–(p/3)3)
r=√(–(p/3)3 )
Use cos to find φ, as this makes finding the angles easier (with a calculator or computer)
r=√( (4.333333333333333/3)3) (as it is a phasor, it can have positive values only.)
r=1.7360061696678466 and r1/3=1.2018504251546631
cos (φ)=–q/2r
cos (φ)=2.5925925925925926/(2*1.7360061696678466)
For v, cos(φv)=–2.5925925925925926/(2*1.7360061696678466)
So, cos(φv)= – cos(φ) [B]
Similarly, sin(φv)= sin(φ) [C]
acos(φ)= –q/(2*r)
φ=0.7276916222864558
x1=u–v–a/3
u=r1/3*(cos(φ/3) + i sin(φ/3)
v=r1/3*(–cos(φ/3) + i sin(φ/3) (from equations B and C above)
So, x1=2*r*cos(φ)–a/3 (because the sines cancel and the cosines are doubled
x1=2*1.2018504251546631*cos(0.7276916222864558)–4/3
We find the other x's by adding 2π to φ, and dividing the result by 3
φ2=φ+2*π
x2=2*1.2018504251546631*cos(2.3369589764886807)–4/3
φ2=φ+4*π
x3=2*1.2018504251546631*cos(4.431354078881876)–4/3
In summary, the roots for
Cubic: x³+4x²+x–6 are:
x1=1 (Remainder=0)
x2=–3 (Remainder=0)
x3=–2 (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places

1000x³–1254x²–496x+191

Cubic in normal form: x³–1.254x²–0.496x+0.191
x³+ax²+bx+c [1]
Substitute x=t–a/3, to eliminate the x² term
New equation t³+pt+q=0
Where p=b–a²/3, and q=c+ (2a³–9ab)/27
p=–1.020172 q=–0.16239726400000004
So the new equation is:
t3–1.020172t –0.16239726400000004 [2]
The discriminant of the cubic, D=(p/3)3+(q/2)2
Before rounding, D=–0.03273066871437038
D=–0.03273066871437
D> 0→ 2 complex roots
D=0 → real roots, with two the same
D<0 → Three real roots
Because D<0, all the roots are real and distinct
Our reduced equation is:
t3–1.020172t –0.16239726400000004 [2, repeated]
Or in algebra, t³+pt+q=0
There is a relationship:
(u–v)3+3uv(u–v)–(u3–v3)=0, which indicates how we might solve the equation
If we set t=u–v, p=3uv, or v=p/3u and q=–(u3–v3), that is:
v=–1.020172/(3u) [4]
u3–(–1.020172/(3*u)–0.16239726400000004=0 [5]
So u3– p3/(27u3)+q= 0
Hence, We need to find numbers, u and v, such that:
u³–v³=–q, and uv=p/3, giving t=v–u
u³–v³=0.16239726400000004, [6] and
uv=–1.020172/3 [7]
Using v=–1.020172/3u, we can eliminate u
u³– p³/27u³ =–q
The resulting equation is:
27u6 + 27qu3 –p3=0
Normalised, this is
u6 + qu3 –p3/27=0
=u6 +0.16239726400000004*u3 +1.0201723/27=0
This is a quadratic equation in u3, so we know how to solve it
u3=–q/2 ±√(q2/4 +p3/27) (5)
The square root may be negative, making the u's complex numbers, although the resulting roots might not be complex.
D=0.02637287135468571/4–1.0617449369321288/27=
–0.03273066871437038
After rounding, D=–0.03273066871437
The square root is a complex number, because D<0
u=∛(0.08119863200000002 ±√(0.03273066871437) i)
We need to find the cube roots of u3= 0.081198632+0.1809161925i
Convert to trigonometric form
D=(q/2)2+(p/3)3
So u3=–q/2+√(–D) i
As u3–v3=–q,
v3=q/2+√(–D) i
r is therefore the same for both u and v [A]
r2=(–q/2)2–D
=(–q/2)2–(q/2)2+(p/3)3)
=–(p/3)3)
r=√(–(p/3)3 )
Use cos to find φ, as this makes finding the angles easier (with a calculator or computer)
r=√( (1.020172/3)3) (as it is a phasor, it can have positive values only.)
r=0.1983025127249824 and r1/3=0.5831443503398909
cos (φ)=–q/2r
cos (φ)=0.16239726400000004/(2*0.1983025127249824)
For v, cos(φv)=–0.16239726400000004/(2*0.1983025127249824)
So, cos(φv)= – cos(φ) [B]
Similarly, sin(φv)= sin(φ) [C]
acos(φ)= –q/(2*r)
φ=1.148924921167228
x1=u–v–a/3
u=r1/3*(cos(φ/3) + i sin(φ/3)
v=r1/3*(–cos(φ/3) + i sin(φ/3) (from equations B and C above)
So, x1=2*r*cos(φ)–a/3 (because the sines cancel and the cosines are doubled
x1=2*0.5831443503398909*cos(1.148924921167228)+1.254/3
We find the other x's by adding 2π to φ, and dividing the result by 3
φ2=φ+2*π
x2=2*0.5831443503398909*cos(2.4773700761156046)––1.254/3
φ2=φ+4*π
x3=2*0.5831443503398909*cos(4.571765178508801)––1.254/3
In summary, the roots for
Cubic: 1000x³–1254x²–496x+191 are:
x1=1.4997993055 (Remainder=0)
x2=–0.5003313644 (Remainder=0)
x3=0.254532059 (Remainder=0)
The remainder is the result of substituting the value in the equation, rounded to 10 decimal places




Ken Ward's Mathematics Pages


Faster Arithmetic - by Ken Ward

Ken's book is packed with examples and explanations that enable you to discover more than 150 techniques to speed up your arithmetic and increase your understanding of numbers. Paperback and Kindle:
Buy now at Amazon.com
Faster Arithmetic for Adults