Test

# Cubic equation

Graph of a cubic function with 3 real roots (where the curve crosses the horizontal axis at y = 0). The case shown has two critical points. Here the function is f(x) = (x3 + 3x2 − 6x − 8)/4.

In algebra, a cubic equation in one variable is an equation of the form

${\displaystyle ax^{3}+bx^{2}+cx+d=0}$

in which a is nonzero.

The solutions of this equation are called roots of the cubic function defined by the left-hand side of the equation. If all of the coefficients a, b, c, and d of the cubic equation are real numbers, then it has at least one real root (this is true for all odd-degree polynomial functions). All of the roots of the cubic equation can be found by the following means:

The coefficients do not need to be real numbers. Much of what is covered below is valid for coefficients in any field with characteristic other than 2 and 3. The solutions of the cubic equation do not necessarily belong to the same field as the coefficients. For example, some cubic equations with rational coefficients have roots that are irrational (and even non-real) complex numbers.

## History

Cubic equations were known to the ancient Babylonians, Greeks, Chinese, Indians, and Egyptians.[1][2][3] Babylonian (20th to 16th centuries BC) cuneiform tablets have been found with tables for calculating cubes and cube roots.[4][5] The Babylonians could have used the tables to solve cubic equations, but no evidence exists to confirm that they did.[6] The problem of doubling the cube involves the simplest and oldest studied cubic equation, and one for which the ancient Egyptians did not believe a solution existed.[7] In the 5th century BC, Hippocrates reduced this problem to that of finding two mean proportionals between one line and another of twice its length, but could not solve this with a compass and straightedge construction,[8] a task which is now known to be impossible. Methods for solving cubic equations appear in The Nine Chapters on the Mathematical Art, a Chinese mathematical text compiled around the 2nd century BC and commented on by Liu Hui in the 3rd century.[2] In the 3rd century AD, the Greek mathematician Diophantus found integer or rational solutions for some bivariate cubic equations (Diophantine equations).[3][9] Hippocrates, Menaechmus and Archimedes are believed to have come close to solving the problem of doubling the cube using intersecting conic sections,[8] though historians such as Reviel Netz dispute whether the Greeks were thinking about cubic equations or just problems that can lead to cubic equations. Some others like T. L. Heath, who translated all Archimedes' works, disagree, putting forward evidence that Archimedes really solved cubic equations using intersections of two conics, but also discussed the conditions where the roots are 0, 1 or 2.[10]

Graph of the cubic function f(x) = 2x3 − 3x2 − 3x + 2 = (x + 1) (2x − 1) (x − 2)

In the 7th century, the Tang dynasty astronomer mathematician Wang Xiaotong in his mathematical treatise titled Jigu Suanjing systematically established and solved numerically 25 cubic equations of the form x3 + px2 + qx = N, 23 of them with p, q ≠ 0, and two of them with q = 0.[11]

In the 11th century, the Persian poet-mathematician, Omar Khayyam (1048–1131), made significant progress in the theory of cubic equations. In an early paper, he discovered that a cubic equation can have more than one solution and stated that it cannot be solved using compass and straightedge constructions. He also found a geometric solution.[12][13] In his later work, the Treatise on Demonstration of Problems of Algebra, he wrote a complete classification of cubic equations with general geometric solutions found by means of intersecting conic sections.[14][15]

In the 12th century, the Indian mathematician Bhaskara II attempted the solution of cubic equations without general success. However, he gave one example of a cubic equation: x3 + 12x = 6x2 + 35.[16] In the 12th century, another Persian mathematician, Sharaf al-Dīn al-Tūsī (1135–1213), wrote the Al-Muʿādalāt (Treatise on Equations), which dealt with eight types of cubic equations with positive solutions and five types of cubic equations which may not have positive solutions. He used what would later be known as the "Ruffini-Horner method" to numerically approximate the root of a cubic equation. He also used the concepts of maxima and minima of curves in order to solve cubic equations which may not have positive solutions.[17] He understood the importance of the discriminant of the cubic equation to find algebraic solutions to certain types of cubic equations.[18]

In his book Flos, Leonardo de Pisa, also known as Fibonacci (1170–1250), was able to closely approximate the positive solution to the cubic equation x3 + 2x2 + 10x = 20. Writing in Babylonian numerals he gave the result as 1,22,7,42,33,4,40 (equivalent to 1 + 22/60 + 7/602 + 42/603 + 33/604 + 4/605 + 40/606), which has a relative error of about 10−9.[19]

In the early 16th century, the Italian mathematician Scipione del Ferro (1465–1526) found a method for solving a class of cubic equations, namely those of the form x3 + mx = n. In fact, all cubic equations can be reduced to this form if we allow m and n to be negative, but negative numbers were not known to him at that time. Del Ferro kept his achievement secret until just before his death, when he told his student Antonio Fiore about it.

Niccolò Fontana Tartaglia

In 1530, Niccolò Tartaglia (1500–1557) received two problems in cubic equations from Zuanne da Coi and announced that he could solve them. He was soon challenged by Fiore, which led to a famous contest between the two. Each contestant had to put up a certain amount of money and to propose a number of problems for his rival to solve. Whoever solved more problems within 30 days would get all the money. Tartaglia received questions in the form x3 + mx = n, for which he had worked out a general method. Fiore received questions in the form x3 + mx2 = n, which proved to be too difficult for him to solve, and Tartaglia won the contest.

Later, Tartaglia was persuaded by Gerolamo Cardano (1501–1576) to reveal his secret for solving cubic equations. In 1539, Tartaglia did so only on the condition that Cardano would never reveal it and that if he did write a book about cubics, he would give Tartaglia time to publish. Some years later, Cardano learned about Ferro's prior work and published Ferro's method in his book Ars Magna in 1545, meaning Cardano gave Tartaglia six years to publish his results (with credit given to Tartaglia for an independent solution). Cardano's promise to Tartaglia said that he would not publish Tartaglia's work, and Cardano felt he was publishing del Ferro's, so as to get around the promise. Nevertheless, this led to a challenge to Cardano from Tartaglia, which Cardano denied. The challenge was eventually accepted by Cardano's student Lodovico Ferrari (1522–1565). Ferrari did better than Tartaglia in the competition, and Tartaglia lost both his prestige and his income.[20]

Cardano noticed that Tartaglia's method sometimes required him to extract the square root of a negative number. He even included a calculation with these complex numbers in Ars Magna, but he did not really understand it. Rafael Bombelli studied this issue in detail[21] and is therefore often considered as the discoverer of complex numbers.

François Viète (1540–1603) independently derived the trigonometric solution for the cubic with three real roots, and René Descartes (1596–1650) extended the work of Viète.[22]

## Factorization

If the coefficients of a cubic equation are rational numbers, one can obtain an equivalent equation with integer coefficeients, by multiplying all coefficients by a common multiple of their denominators. Such an equation

${\displaystyle ax^{3}+bx^{2}+cx+d=0,}$

with integer coefficients, is said to be reducible if the polynomial of the left-hand side is the product of polynomials of lower degrees. By Gauss's lemma, if the equation is reducible, one can suppose that the factors have integer coefficients.

Finding the roots of a reducible cubic equation is easier than solving the general case. In fact, if the equation is reducible, one of the factors must have the degree one, and have thus the form

${\displaystyle qx-p}$

with q and p being coprime integers. The rational root test allows finding q and p by examining a finite number of cases (because q must be a divisor of a, and p must be a divisor of d).

Thus, one root is ${\displaystyle \textstyle x_{1}={\frac {p}{q}},}$ and the other roots are the roots of the other factor, which can be found by polynomial long division. This other factor is

${\displaystyle {\frac {a}{q}}x^{2}+{\frac {bq+ap}{q^{2}}}x+{\frac {cq^{2}+bpq+ap^{2}}{q^{3}}}}$

(The coefficients seem not to be integers, but must be integers if p / q is a root.)

Then, the other roots are the roots of this quadratic polynomial and can be found by using the quadratic formula.

## Depressed cubic

Cubics of the form

${\displaystyle t^{3}+pt+q}$

are said to be depressed. They are much simpler than general cubics, but are fundamental, because the study of any cubic may be reduced by a simple change of variable to that of a depressed cubic.

Let

ax3 + bx2 + cx + d = 0

be a cubic equation. The change of variable

${\displaystyle x=t-{\frac {b}{3a}}}$

results into a cubic that has no term in t2. After dividing by a one gets the depressed cubic equation

${\displaystyle t^{3}+pt+q=0,}$

with

{\displaystyle {\begin{aligned}t=&x+{\frac {b}{3a}}\\p=&{\frac {3ac-b^{2}}{3a^{2}}}\\q=&{\frac {2b^{3}-9abc+27a^{2}d}{27a^{3}}}.\end{aligned}}}

The roots ${\displaystyle x_{1},x_{2},x_{3}}$ of the original equation are related to the roots ${\displaystyle t_{1},t_{2},t_{3}}$ of the depressed equation by the relations

${\displaystyle x_{i}=t_{i}-{\frac {b}{3a}},}$

for i = 1, 2, 3.

## Discriminant and nature of the roots

The nature (real or not, distinct or not) of the roots of a cubic can be determined without computing them explicitely, by using the discriminant.

### Discriminant

The discriminant of a polynomial is a function of its coefficients that is zero if and only if the polynomial has a multiple root, or, if it is divisible by the square of a non-constant polynomial. In other words, the discriminant is nonzero if and only if the polynomial is square-free.

If r1, r2, r3 are the three roots (not necessarily distinct nor real) of the cubic ${\displaystyle ax^{3}+bx^{2}+cx+d,}$ then the discriminant is

${\displaystyle a^{4}(r_{1}-r_{2})^{2}(r_{1}-r_{3})^{2}(r_{2}-r_{3})^{2}.}$

The discriminant of the depressed cubic ${\displaystyle t^{3}+pt+q}$ is

${\displaystyle -\left(4\,p^{3}+27\,q^{2}\right).}$

The discriminant of the general cubic ${\displaystyle ax^{3}+bx^{2}+cx+d}$ is

${\displaystyle 18\,abcd-4\,b^{3}d+b^{2}c^{2}-4\,ac^{3}-27\,a^{2}d^{2}.}$

It is the product of ${\displaystyle a^{4}}$ and the discriminant of the corresponding depresssed cubic. It follows that one of these two discriminants is zero if and only if the other is also zero, and, if the coefficients are real, the two discriminants have the same sign. In summary, the same information can be deduced from these two discriminants.

To prove the preceding formulas, one can use Vieta's formulas to express everything as polynomials in r1, r2, r3, and a. The proof then results in the verification of the equality of two polynomials.

### Nature of the roots

If the coefficients of the polynomial are real numbers and the discriminant ${\displaystyle \Delta }$ is not zero, there are two cases:

• If ${\displaystyle \Delta >0,}$ the cubic has three distinct real roots
• If ${\displaystyle \Delta <0,}$ the cubic has one real root and two non-real complex conjugate roots.

This can be proved as follows. First, if r is a root of a polynomial with real coefficients, then its complex conjugate is also a root. So the non-real roots, if any, occur as pairs of complex conjugate roots. As a cubic polynomial has three roots (not necessarily distinct) by the fundamental theorem of algebra, at least one root must be real.

As stated above, if r1, r2, r3 are the three roots of the cubic ${\displaystyle ax^{3}+bx^{2}+cx+d}$, then the discriminant is

${\displaystyle \Delta =a^{2}(r_{1}-r_{2})^{2}(r_{1}-r_{3})^{2}(r_{2}-r_{3})^{2}}$

If the three roots are real and distinct, the discriminant is a product of positive reals, that is ${\displaystyle \Delta >0.}$

If only one root, say r1, is real, then r2 and r3 are complex conjugates, which implies that r2r3 is a purely imaginary number, and thus that (r2r3)2 is real and negative. On the other hand, r1r2 and r1r3 are complex conjugates, and their product is real and positive. Thus the discriminant is the product of a single negative number and several positive ones. That is ${\displaystyle \Delta <0.}$

### Multiple root

If the discriminant of a cubic is zero, the cubic has a multiple root, and all of its roots are real.

The discriminant of the depressed cubic ${\displaystyle t^{3}+pt+q}$ equals zero if ${\displaystyle 4p^{3}+27q^{2}=0.}$ If p is also zero, then p = q = 0, and 0 is a triple root of the cubic. If ${\displaystyle 4p^{3}+27q^{2}=0,}$ and p ≠ 0, then the cubic has a simple root

${\displaystyle t_{1}={\frac {3q}{p}}}$

and a double root

${\displaystyle t_{2}=t_{3}={\frac {-3q}{2p}}.}$

In other words,

${\displaystyle t^{3}+pt+q=\left(t-{\frac {3q}{p}}\right)\left(t+{\frac {3q}{2p}}\right)^{2}.}$

This result can be proved by expanding the latter product or retrieved by solving the rather simple system of equations resulting from Vieta's formulas.

By using the reduction of a depressed cubic, these results can be extended to the general cubic. This gives: if the discriminant of the cubic ${\displaystyle ax^{3}+bx^{2}+cx+d}$ is zero, then

• either, if ${\displaystyle b^{2}=3ac,}$ the cubic has a triple root
${\displaystyle x_{1}=x_{2}=x_{3}={\frac {-b}{3a}},}$
and
${\displaystyle ax^{3}+bx^{2}+cx+d=a\left(x+{\frac {b}{3a}}\right)^{3}}$
• or, if ${\displaystyle b^{2}\neq 3ac,}$ the cubic has a double root
${\displaystyle x_{2}=x_{3}={\frac {9ad-bc}{2(b^{2}-3ac)}},}$
and a simple root,
${\displaystyle x_{1}={\frac {4abc-9a^{2}d-b^{3}}{a(b^{2}-3ac)}}.}$
and thus
${\displaystyle ax^{3}+bx^{2}+cx+d=a\left(x-x_{1}\right)\left(x-x_{2}\right)^{2}.}$

### Characteristic 2 and 3

The above results are valid when the coefficients belong to a field of characteristic other than 2 or 3, but must be modified for characteristic 2 or 3, because of the involved divisions by 2 and 3.

The reduction to a depressed cubic works for characteristic 2, but not for characteristic 3. However, in both cases, it is simpler to establish and state the results for the general cubic. The main tool for that is the fact that a multiple root is a common root of the polynomial and its formal derivative. In these characteristics, if the derivative is not a constant, it has a single root, being linear in characteristic 3, or the square of a linear polynomial in characteristic 2. This allows computing the multiple root, and the third root can be deduced from the sum of the roots, which is provided by Vieta's formulas.

A difference with other characteristics is that, in characteristic 2, the formula for a double root involves a square root, and, in characteristic 3, the formula for a triple root involves a cube root.

## Cardano's formula

Gerolamo Cardano is credited of the first formula for solving cubic equation. His formula applies to depressed cubics, but, as shown in § Depressed cubic, it allows solving all cubic equations.

Cardano's original result is that, if

${\displaystyle x^{3}+px+q=0}$

is a cubic equation such that p and q are real numbers such that ${\displaystyle 4p^{3}+27q^{2}>0,}$ then the equation has the real root

${\displaystyle {\sqrt[{3}]{-{\frac {q}{2}}+{\sqrt {{\frac {q^{2}}{4}}+{\frac {p^{3}}{27}}}}}}+{\sqrt[{3}]{-{\frac {q}{2}}-{\sqrt {{\frac {q^{2}}{4}}+{\frac {p^{3}}{27}}}}}}.}$

See § Derivation of the roots, below, for several methods for getting this result.

As shown in § Nature of the roots, the two other roots are non-real complex conjugate numbers, in this case. It was later shown (Cardano did not know complex numbers) that the two other roots are obtained by multiplying one of the cube root by the primitive cube root of unity ${\displaystyle {\frac {-1+i{\sqrt {3}}}{2}},}$ and the other cube root by ${\displaystyle {\frac {-1-i{\sqrt {3}}}{2}}.}$

If ${\displaystyle 4p^{3}+27q^{2}<0,}$ there are three real roots, but Galois theory allows proving that they cannot be expressed by an algebraic expression involving only real numbers. Therefore, the equation cannot be solved in this case with the knowledge of Cardano's time. This case has thus been called casus irreducibilis, meaning irreducible case in Latin.

In casus irreducibilis, Cardano's formula can still be used, but some care is needed in the use cube roots. A first method is to define the symbols ${\displaystyle {\sqrt {{~}^{~}}}}$ and ${\displaystyle {\sqrt[{3}]{{~}^{~}}}}$ as representing the principal values of the root function (that is the root that has the largest real part). With this convention Cardano's formula for the three roots remains valid, but is not purely algebraic, as the definition of a principal part is not purely algebraic, since it involves inequalities for comparing real parts. Also, the use of principal cube root may give a wrong result if the coefficients are non-real complex numbers. Moreover, if the coefficients belong to another field, the principal cube root is not defined in general.

The second way for making Cardano's formula always correct, is to remark that the product of the two cube roots must be p / 3. It results that a root of the equation is

${\displaystyle C-{\frac {p}{3C}}\quad {\text{with}}\quad C={\sqrt[{3}]{-{\frac {q}{2}}+{\sqrt {{\frac {q^{2}}{4}}+{\frac {p^{3}}{27}}}}}}.}$

In this formula, the symbols ${\displaystyle {\sqrt {{~}^{~}}}}$ and ${\displaystyle {\sqrt[{3}]{{~}^{~}}}}$ denote any square root and any cube root. The other roots of the equation are obtained either by changing of cube root or, equivalently, by multiplying the cube root by a primitive cube root of the unity, that is ${\displaystyle \textstyle {\frac {-1\pm {\sqrt {-3}}}{2}}.}$

This formula for the roots is always correct except when p = q = 0, under the condition, if q = 0, of chosing the square root for having C ≠ 0. However, the formula is useless in these cases as the roots can be expressed without any cube root. Similarly, the formula is also useless in the other cases where no cube root is needed, that is when ${\displaystyle 4p^{3}+27q^{2}=0}$ and when the cubic polynomial is not irreducible.

This formula is also correct when p and q belong to any field of characteristic different of 2 and 3.

## General cubic formula

A cubic formula for the roots of the general cubic equation (with a ≠ 0)

${\displaystyle ax^{3}+bx^{2}+cx+d=0}$

can be deduced from every variant of Cardano's formula by reduction to a depressed cubic. The variant that is presented here is valid not only for real coefficients, but also for coefficients a, b, c, d belonging to any field of characteristic different of 2 and 3.

The formula being rather complicated, it is worth splitting it in smaller formulas.

Let

{\displaystyle {\begin{aligned}\Delta _{0}&=b^{2}-3ac,\\\Delta _{1}&=2b^{3}-9abc+27a^{2}d,\end{aligned}}}

and

${\displaystyle C={\sqrt[{3}]{\frac {\Delta _{1}\pm {\sqrt {\Delta _{1}^{2}-4\Delta _{0}^{3}}}}{2}}},}$

where the symbols ${\displaystyle {\sqrt {{~}^{~}}}}$ and ${\displaystyle {\sqrt[{3}]{{~}^{~}}}}$ denote any square root and any cube root, respectively. Then, one of the roots is

${\displaystyle x=-{\frac {1}{3a}}\left(b+C+{\frac {\Delta _{0}}{C}}\right){\text{.}}}$

The other two roots can be obtained by changing the choice of the cube root in the definition of C, or, equivalently by multiplying C by a primitive cube root of unity, that is –1 ± –3/2. In other words, the three roots are

${\displaystyle x_{k}=-{\frac {1}{3a}}\left(b+\xi ^{k}C+{\frac {\Delta _{0}}{\xi ^{k}C}}\right),\qquad k\in \{0,1,2\}{\text{,}}}$

where ξ = –1 + –3/2.

As for the special case of a depressed cubic, this formula applies but is useless when the roots can be expressed without cube roots.

## Trigonometric and hyperbolic solutions

### Trigonometric solution for three real roots

When a cubic equation with real coefficients has three real roots, the formulas expressing these roots in terms of radicals involve complex numbers. Galois theory allows proving that when the three roots are real, and none is rational (casus irreducibilis), one cannot express the roots in terms of real radicals. Nevertheless, purely real expressions of the solutions may be obtained using trigonometric functions, specifically in terms of cosines and arccosines.[23] More precisely, the root of the depressed cubic

${\displaystyle t^{3}+pt+q}$

are[24]

${\displaystyle t_{k}=2{\sqrt {-{\frac {p}{3}}}}\cos \left({\frac {1}{3}}\arccos \left({\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}}\right)-{\frac {2\pi k}{3}}\right)\quad {\text{for}}\quad k=0,1,2.}$

This formula is due to François Viète.[22] It is purely real when the equation has three real roots (that is ${\displaystyle 4p^{3}+27q^{2}<0}$). Otherwise, it is still correct but involves complex cosines and arccosines when there is only one real root, and it is nonsensical (division by zero) when p = 0).

This formula can be straightforwardly transformed into a formula for the roots of a general cubic equation, using the back substitution described in § Depressed cubic. It can be proved as follows.

Starting from the equation t3 + pt + q = 0, let us set t = u cos θ. The idea is to choose u to make the equation coincide with the identity

${\displaystyle 4\cos ^{3}\theta -3\cos \theta -\cos(3\theta )=0\,.}$

For this, choose ${\displaystyle u=2{\sqrt {-{\frac {p}{3}}}},}$ and divide the equation by ${\displaystyle {\frac {u^{3}}{4}}.}$ This gives

${\displaystyle 4\cos ^{3}\theta -3\cos \theta -{\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}}=0\,.}$

Combining with the above identity, one gets

${\displaystyle \cos(3\theta )={\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}},}$

and the roots are thus

${\displaystyle t_{k}=2{\sqrt {-{\frac {p}{3}}}}\cos \left({\frac {1}{3}}\arccos \left({\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}}\right)-{\frac {2\pi k}{3}}\right)\quad {\text{for}}\quad k=0,1,2\,.}$

### Hyperbolic solution for one real root

When there is only one real root (and p ≠ 0), this root can be similarly represented using hyperbolic functions, as[25][26]

{\displaystyle {\begin{aligned}t_{0}&=-2{\frac {|q|}{q}}{\sqrt {-{\frac {p}{3}}}}\cosh \left({\frac {1}{3}}\operatorname {arcosh} \left({\frac {-3|q|}{2p}}{\sqrt {\frac {-3}{p}}}\right)\right)\quad {\text{if }}\quad 4p^{3}+27q^{2}>0{\text{ and }}p<0\,,\\t_{0}&=-2{\sqrt {\frac {p}{3}}}\sinh \left({\frac {1}{3}}\operatorname {arsinh} \left({\frac {3q}{2p}}{\sqrt {\frac {3}{p}}}\right)\right)\quad {\text{if }}\quad p>0\,.\end{aligned}}}

If p ≠ 0 and the inequalities on the right are not satisfied (the case of three real roots), the formulas remain valid but involve complex quantities.

When p = ±3, the above values of t0 are sometimes called the Chebyshev cube root.[27] More precisely, the values involving cosines and hyperbolic cosines define, when p = −3, the same analytic function denoted C1/3(q), which is the proper Chebyshev cube root. The value involving hyperbolic sines is similarly denoted S1/3(q), when p = 3.

## Geometric solutions

### Omar Khayyám's solution

Omar Khayyám's geometric solution of a cubic equation, for the case m = 2, n = 16, giving the root 2. The intersection of the vertical line on the x-axis at the center of the circle is happenstance of the example illustrated.

For solving the cubic equation x3 + m2x = n where n > 0, Omar Khayyám constructed the parabola y = x2/m, the circle that has as a diameter the line segment [0, n/m2] on the positive x-axis, and a vertical line through the point where the circle and the parabola intersect above the x-axis. The solution is given by the length of the horizontal line segment from the origin to the intersection of the vertical line and the x-axis (see the figure).

A simple modern proof is as follows. Multiplying the equation by x and regrouping the terms gives

${\displaystyle {\frac {x^{4}}{m^{2}}}=x\left({\frac {n}{m^{2}}}-x\right).}$

The left-hand side is the value of y2 on the parabola. The equation of the circle being y2 + x(xn/m2) = 0, the right hand side is the value of y2 on the circle.

### Solution with angle trisector

A cubic equation with real coefficients can be solved geometrically using compass, straightedge, and an angle trisector if and only if it has three real roots.[28]:Thm. 1

A cubic equation can be solved by compass-and-straightedge construction (without trisector) if and only if it has a rational root. This implies that the old problems of angle trisection and doubling the cube, set by ancient Greek mathematicians, cannot be solved by compass-and-straightedge construction.

## Geometric interpretation of the roots

### Three real roots

For the cubic (1) with three real roots, the roots are the projection on the x-axis of the vertices A, B, and C of an equilateral triangle. The center of the triangle has the same abscissa as the inflection point.

Viète's trigonometric expression of the roots in the three-real-roots case lends itself to a geometric interpretation in terms of a circle.[22][29] When the cubic is written in depressed form (2), t3 + pt + q = 0, as shown above, the solution can be expressed as

${\displaystyle t_{k}=2{\sqrt {-{\frac {p}{3}}}}\cos \left({\frac {1}{3}}\arccos \left({\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}}\right)-k{\frac {2\pi }{3}}\right)\quad {\text{for}}\quad k=0,1,2\,.}$

Here ${\displaystyle \arccos \left({\frac {3q}{2p}}{\sqrt {\frac {-3}{p}}}\right)}$ is an angle in the unit circle; taking 1/3 of that angle corresponds to taking a cube root of a complex number; adding k2π/3 for k = 1, 2 finds the other cube roots; and multiplying the cosines of these resulting angles by ${\displaystyle 2{\sqrt {-{\frac {p}{3}}}}}$ corrects for scale.

For the non-depressed case (1) (shown in the accompanying graph), the depressed case as indicated previously is obtained by defining t such that x = tb/3a so t = x + b/3a. Graphically this corresponds to simply shifting the graph horizontally when changing between the variables t and x, without changing the angle relationships. This shift moves the point of inflection and the centre of the circle onto the y-axis. Consequently, the roots of the equation in t sum to zero.

### One real complex root

#### In the Cartesian plane

The slope of line RA is twice that of RH. Denoting the complex roots of the cubic as g ± hi, g = OM (negative here) and h = tan ORH = slope of line RH = BE = DA.

When the graph of a cubic function is plotted in the Cartesian plane, if there is only one real root, it is the abscissa (x-coordinate) of the horizontal intercept of the curve (point R on the figure). Further,[30][31][32] if the complex conjugate roots are written as g ± hi, then the real part g is the abscissa of the tangency point H of the tangent line to cubic that passes through x-intercept R of the cubic (that is the signed length RM, negative ob the figure). The imaginary parts ±h are the square roots of the tangent of the angle between this tangent line and the horizontal axis.[clarification needed]

#### In the complex plane

With one real and two complex roots, the three roots can be represented as points in the complex plane, as can the two roots of the cubic's derivative. There is an interesting geometrical relationship among all these roots.

The points in the complex plane representing the three roots serve as the vertices of an isosceles triangle. (The triangle is isosceles because one root is on the horizontal (real) axis and the other two roots, being complex conjugates, appear symmetrically above and below the real axis.) Marden's theorem says that the points representing the roots of the derivative of the cubic are the foci of the Steiner inellipse of the triangle—the unique ellipse that is tangent to the triangle at the midpoints of its sides. If the angle at the vertex on the real axis is less than π/3 then the major axis of the ellipse lies on the real axis, as do its foci and hence the roots of the derivative. If that angle is greater than π/3, the major axis is vertical and its foci, the roots of the derivative, are complex conjugates. And if that angle is π/3, the triangle is equilateral, the Steiner inellipse is simply the triangle's incircle, its foci coincide with each other at the incenter, which lies on the real axis, and hence the derivative has duplicate real roots.

## Galois group

Given a cubic irreducible polynomial over a field k of characteristic different from 2 and 3, the Galois group over k is the group of the field automorphisms that fix k of the smallest extension of k (splitting field). As these automorphismes must permute the roots of the polynomials, this group is either the group S3 of all six permutations of the three roots, or the group A3 of the three circular permutations.

The discriminant Δ of the cubic is the square of

${\displaystyle {\sqrt {\Delta }}=a^{2}(r_{1}-r_{2})(r_{1}-r_{3})(r_{2}-r_{3}),}$

where a is the leading coefficient of the cubic, and r1, r2 and r3 are the three roots of the cubic. As ${\displaystyle {\sqrt {\Delta }}}$ changes of sign if two roots are exchanged, ${\displaystyle {\sqrt {\Delta }}}$ is fixed by the Galois group only if the Galois group is. A3. In other words, the Galois group is A3 if and only if the discriminant is the square of an element of k.

As most integers are not squares, when working over the field Q of the rational numbers, the Galois group of most irreducible cubic polynomials is the group S3 with six elements. An example of a Galois group A3 with three elements is given by p(x) = x3 − 3x − 1, whose discriminant is 81 = 92.

## Derivation of the roots

This setion regroup several methods for deriving Cardano's formula.

### Cardano's method

This method is due to Scipione del Ferro and Tartaglia, but is named after Gerolamo Cardano who first published it in his book Ars Magna (1545).

This method applies to a depressed cubic t3 + pt + q = 0. The idea is to introduce two variables u and v such that u + v = t and to substitute this in the depressed cubic, giving

${\displaystyle u^{3}+v^{3}+(3uv+p)(u+v)+q=0.}$

At this point Cardano imposed the condition 3uv + p = 0. This removes the third term in previous equality, leading to the system of equations

{\displaystyle {\begin{aligned}u^{3}+v^{3}&=-q\\uv&=-{\frac {p}{3}}.\end{aligned}}}

Knowing the sum and the product of u3 and v3, one deduces that they are the two solutions of the quadratic equation

${\displaystyle x^{2}+qx-{\frac {p^{3}}{27}}=0,}$

that is

${\displaystyle -{\frac {q}{2}}\pm {\sqrt {{\frac {q^{2}}{4}}+{\frac {p^{3}}{27}}}}.}$

As u + v = t, the sum of the cube roots of these solutions is a root if the equation. That is

${\displaystyle t={\sqrt[{3}]{-{q \over 2}+{\sqrt {{q^{2} \over 4}+{p^{3} \over 27}}}}}+{\sqrt[{3}]{-{q \over 2}-{\sqrt {{q^{2} \over 4}+{p^{3} \over 27}}}}}}$

is a root of the equation; this is Cardano's formula.

This works well when ${\displaystyle 4p^{3}+27q^{2}>0,}$ but, if ${\displaystyle 4p^{3}+27q^{2}<0,}$ the square root appearing in the formula is not real. As a complex number has three cube roots, using Cardano's formula without care would provide nine roots, while a cubic equation cannot have more three roots. This has been clarified first by Rafael Bombelli in his book L'Algebra (1572). The solution is to use the fact that uv = p/3, that is v = p/3v. This means that only one cube root need to be computed, and leads to the second formula given in § Cardano's formula.

The other roots of the equation can be obtained by changing of cube root, or, equivalently, by multiplying the cube root by each of the two primitive cube roots of unity, which are ${\displaystyle {\frac {-1\pm {\sqrt {-3}}}{2}}.}$

### Vieta's substitution

Vieta's substitution is a method introduced by François Viète (Vieta is his Latin name) in a text published posthumously in 1615, which provides directly the second formula of § Cardano's method, and avoids the problem of computing two different cube roots.[33]

Starting from the depressed cubic t3 + pt + q = 0, Vieta's substitution is t = wp/3w.[34]

The substitution t = wp/3w transforms the depressed cubic into

${\displaystyle w^{3}+q-{\frac {p^{3}}{27w^{3}}}=0.}$

Multiplying by w3, one gets a quadratic equation in w3:

${\displaystyle (w^{3})^{2}+q(w^{3})-{\frac {p^{3}}{27}}=0.}$

Let

${\displaystyle W=-{\frac {q}{2}}\pm {\sqrt {{\frac {p^{3}}{27}}+{\frac {q^{2}}{4}}}}}$

be any nonzero root of this quadratic equation. If w1, w2 and w3 are the three cube roots of W, then the roots of the original depressed cubic are w1p/3w1, w2p/3w2, and w3p/3w3. The other root of the quadratic equation is ${\displaystyle \textstyle -{\frac {p^{3}}{27W}}.}$ This implies that changing the sign of the square root exchanges wi and p/3wi for i = 1, 2, 3, and therefore does not change the roots. This method only fails when both roots of the quadratic equation are zero, that is when p = q = 0, in which case the only root of the depressed cubic is 0.

### Lagrange's method

In his paper Réflexions sur la résolution algébrique des équations ("Thoughts on the algebraic solving of equations"),[35] Joseph Louis Lagrange introduced a new method to solve equations of low degree in a uniform way, with the hope that he could generallize it for higher degrees. This method works well for cubic and quartic equations, but Lagrange did not succeed in applying it to a quintic equation, because it requires solving a resolvent polynomial of degree at least six.[36][37][38] Except that nobody succeeded before to solve the problem, this was the first indication of the non-existence of an algebraic formula for degrees 5 and higher. This has been proved later, and named Abel–Ruffini theorem. Nevertheless, the modern methods for solving solvable quintic equations are mainly based on Lagrange's method.[38]

In the case of cubic equations, Lagrange's method gives the same solution as Cardano's. Lagrange's method can be applied directly to the general cubic equation ax3 + bx2 + cx + d = 0, but the computation is simpler with the depressed cubic equation, t3 + pt + q = 0.

Lagrange's main idea was to work with the discrete Fourier transform of the roots instead with the roots themselves. More precisely, let ξ be a primitive third root of unity, that is a number such that ξ3 = 1 and ξ2 + ξ + 1 = 0 (when working in the space of complex numbers, one has ${\displaystyle \textstyle \xi ={\frac {-1\pm i{\sqrt {3}}}{2}}=e^{2i\pi /3},}$ but this complex interpretation is not used here). Denoting x0, x1 and x2 the three roots of the cubic equation to be solved, let

{\displaystyle {\begin{aligned}s_{0}&=x_{0}+x_{1}+x_{2},\\s_{1}&=x_{0}+\xi x_{1}+\xi ^{2}x_{2},\\s_{2}&=x_{0}+\xi ^{2}x_{1}+\xi x_{2},\end{aligned}}}

be the discrete Fourier transform of the roots. If s0, s1 and s2 are known, the roots may be recovered from them with the inverse Fourier transform consisting of inverting this linear transformation; that is,

{\displaystyle {\begin{aligned}x_{0}&={\tfrac {1}{3}}(s_{0}+s_{1}+s_{2}),\\x_{1}&={\tfrac {1}{3}}(s_{0}+\xi ^{2}s_{1}+\xi s_{2}),\\x_{2}&={\tfrac {1}{3}}(s_{0}+\xi s_{1}+\xi ^{2}s_{2}).\end{aligned}}}

By Vieta's formulas, s0 is known to be zero in the case of a depressed cubic, and b/a for the general cubic. So, only s1 and s2 need to be computed. They are not symmetric functions of the roots (exchanging x1 and x2 exchanges also s1 and s2), but some simple symmetric functions of s1 and s2 are also symmetric in the roots of the cubic equation to be solved. Thus these symmetric functions can be expressed in terms of the (known) coefficients of the original cubic, and this allows eventually expressing the si as roots of a polynomial with known coefficients.

In the case of a cubic equation, P=s1s2, and S=s13 + s23 are such symmetric polynomials (see below). It follows that s13 and s23 are the two roots of the quadratic equation z2Sz + P3 = 0. Thus the resolution of the equation may be finished exactly as with Cardano's method, with s1 and s2 in place of u and v.

In the case of the depressed cubic, one has x0 = 1/3(s1 + s2) and s1s2 = −3p, while in Cardano's method we have set x0 = u + v and uv = −1/3p. Thus we have, up to the exchange of u and v, s1 = 3u and s2 = 3v . In other words, in this case, Cardano's method and Lagrange's method compute exactly the same things, up to a factor of three in the auxiliary variables, the main difference being that Lagrange's method explains why these auxiliary variables appear in the problem.

#### Computation of S and P

A straightforward computation using the relations ξ3 = 1 and ξ2 + ξ + 1 = 0 gives

{\displaystyle {\begin{aligned}P&=s_{1}s_{2}=x_{0}^{2}+x_{1}^{2}+x_{2}^{2}-(x_{0}x_{1}+x_{1}x_{2}+x_{2}x_{0}),\\S&=s_{1}^{3}+s_{2}^{3}=2(x_{0}^{3}+x_{1}^{3}+x_{2}^{3})-3(x_{0}^{2}x_{1}+x_{1}^{2}x_{2}+x_{2}^{2}x_{0}+x_{0}x_{1}^{2}+x_{1}x_{2}^{2}+x_{2}x_{0}^{2})+12x_{0}x_{1}x_{2}.\end{aligned}}}

This shows that P and Q are symmetric functions of the roots. Using Newton's identities, it is straightforward to express them in terms of the elementary symmetric functions of the roots, giving

{\displaystyle {\begin{aligned}P&=e_{1}^{2}-3e_{2},\\S&=2e_{1}^{3}-9e_{1}e_{2}+27e_{3},\end{aligned}}}

with e1 = 0, e2 = p and e3 = −q in the case of a depressed cubic, and e1 = −b/a, e2 = c/a and e3 = −d/a, in the general case.

## Applications

Cubic equations arise in various other contexts.

## Notes

1. ^ Høyrup, Jens (1992), "The Babylonian Cellar Text BM 85200 + VAT 6599 Retranslation and Analysis", Amphora: Festschrift for Hans Wussing on the Occasion of his 65th Birthday, Birkhäuser, pp. 315–358, doi:10.1007/978-3-0348-8599-7_16, ISBN 978-3-0348-8599-7
2. ^ a b Crossley, John; W.-C. Lun, Anthony (1999). The Nine Chapters on the Mathematical Art: Companion and Commentary. Oxford University Press. p. 176. ISBN 978-0-19-853936-0.
3. ^ a b Van der Waerden, Geometry and Algebra of Ancient Civilizations, chapter 4, Zurich 1983 ISBN 0-387-12159-5
4. ^ Cooke, Roger (8 November 2012). The History of Mathematics. John Wiley & Sons. p. 63. ISBN 978-1-118-46029-0.
5. ^ Nemet-Nejat, Karen Rhea (1998). Daily Life in Ancient Mesopotamia. Greenwood Publishing Group. p. 306. ISBN 978-0-313-29497-6.
6. ^ Cooke, Roger (2008). Classical Algebra: Its Nature, Origins, and Uses. John Wiley & Sons. p. 64. ISBN 978-0-470-27797-3.
7. ^ Guilbeau (1930, p. 8) states that "the Egyptians considered the solution impossible, but the Greeks came nearer to a solution."
8. ^ a b Guilbeau (1930, pp. 8–9)
9. ^ Heath, Thomas L. (April 30, 2009). Diophantus of Alexandria: A Study in the History of Greek Algebra. Martino Pub. pp. 87–91. ISBN 978-1578987542.
10. ^ Archimedes (October 8, 2007). The works of Archimedes. Translation by T. L. Heath. Rough Draft Printing. ISBN 978-1603860512.
11. ^ Mikami, Yoshio (1974) [1913], "Chapter 8 Wang Hsiao-Tung and Cubic Equations", The Development of Mathematics in China and Japan (2nd ed.), New York: Chelsea Publishing Co., pp. 53–56, ISBN 978-0-8284-0149-4
12. ^ A paper of Omar Khayyam, Scripta Math. 26 (1963), pages 323–337
13. ^ In O'Connor, John J.; Robertson, Edmund F., "Omar Khayyam", MacTutor History of Mathematics archive, University of St Andrews. one may read This problem in turn led Khayyam to solve the cubic equation x3 + 200x = 20x2 + 2000 and he found a positive root of this cubic by considering the intersection of a rectangular hyperbola and a circle. An approximate numerical solution was then found by interpolation in trigonometric tables. The then in the last assertion is erroneous and should, at least, be replaced by also. The geometric construction was perfectly suitable for Omar Khayyam, as it occurs for solving a problem of geometric construction. At the end of his article he says only that, for this geometrical problem, if approximations are sufficient, then a simpler solution may be obtained by consulting trigonometric tables. Textually: If the seeker is satisfied with an estimate, it is up to him to look into the table of chords of Almagest, or the table of sines and versed sines of Mothmed Observatory. This is followed by a short description of this alternate method (seven lines).
14. ^ J. J. O'Connor and E. F. Robertson (1999), Omar Khayyam, MacTutor History of Mathematics archive, states, "Khayyam himself seems to have been the first to conceive a general theory of cubic equations."
15. ^ Guilbeau (1930, p. 9) states, "Omar Al Hay of Chorassan, about 1079 AD did most to elevate to a method the solution of the algebraic equations by intersecting conics."
16. ^ Datta, Bibhutibhushan; Singh, Avadhesh Narayan (2004), "Equation of Higher Degree", History of Hindu Mathematics: A Source Book, 2, Delhi, India: Bharattya Kala Prakashan, p. 76, ISBN 81-86050-86-8
17. ^
18. ^ Berggren, J. L. (1990), "Innovation and Tradition in Sharaf al-Dīn al-Ṭūsī's Muʿādalāt", Journal of the American Oriental Society, 110 (2): 304–309, doi:10.2307/604533, JSTOR 604533
19. ^
20. ^ Katz, Victor (2004). A History of Mathematics. Boston: Addison Wesley. p. 220. ISBN 9780321016188.
21. ^ La Nave, Federica; Mazur, Barry (2002), "Reading Bombelli", The Mathematical Intelligencer, 24 (1): 12–21, doi:10.1007/BF03025306
22. ^ a b c Nickalls, R. W. D. (July 2006), "Viète, Descartes and the cubic equation" (PDF), Mathematical Gazette, 90 (518): 203–208, doi:10.1017/S0025557200179598
23. ^ Zucker, I. J., "The cubic equation — a new look at the irreducible case", Mathematical Gazette 92, July 2008, 264–268.
24. ^ Shelbey, Samuel (1975), CRC Standard Mathematical Tables, CRC Press, ISBN 0-87819-622-6
25. ^ These are Formulas (80) and (83) of Weisstein, Eric W. 'Cubic Formula'. From MathWorld—A Wolfram Web Resource. http://mathworld.wolfram.com/CubicFormula.html, rewritten for having a coherent notation.
26. ^ Holmes, G. C., "The use of hyperbolic cosines in solving cubic polynomials", Mathematical Gazette 86. November 2002, 473–477.
27. ^ Abramowitz, Milton; Stegun, Irene A., eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, Dover (1965), chap. 22 p. 773
28. ^ Gleason, Andrew Mattei (March 1988). "Angle trisection, the heptagon, and the triskaidecagon" (PDF). The American Mathematical Monthly. 95 (3): 185–194. doi:10.2307/2323624. JSTOR 2323624. Archived from the original (PDF) on 2015-12-19.
29. ^ Nickalls, R. W. D. (November 1993), "A new approach to solving the cubic: Cardan's solution revealed" (PDF), The Mathematical Gazette, 77 (480): 354–359, doi:10.2307/3619777, ISSN 0025-5572, JSTOR 3619777 See esp. Fig. 2.
30. ^ Henriquez, Garcia (June–July 1935), "The graphical interpretation of the complex roots of cubic equations", American Mathematical Monthly, 42 (6): 383–384, doi:10.2307/2301359, JSTOR 2301359
31. ^ Barr, C. F. (1918), "Discussions: Relating to the Graph of a Cubic Equation Having Complex Roots", American Mathematical Monthly, 25 (6): 268–269, doi:10.2307/2972885, JSTOR 2972885
32. ^ Irwin, Frank; Wright, H. N. (1917), "Some Properties of Polynomial Curves.", Annals of Mathematics, 19 (2): 152–158, doi:10.2307/1967772, JSTOR 1967772
33. ^ van der Waerden, Bartel Leenert (1985), "From Viète to Descartes", A History of Algebra: From al-Khwārizmī to Emmy Noether, Springer-Verlag, ISBN 3-540-13610-X
34. ^ More precisely, Vieta introduced a new variable w and imposed the condition w(t + w) = p/3. This is equivalent with the substitution t = p/3ww, and differs from the substitution that is used here only by a change of sign of w. This change of sign allows getting directly the formulas of § Cardano's formula.
35. ^ Lagrange, Joseph-Louis (1869) [1771], "Réflexions sur la résolution algébrique des équations", in Serret, Joseph-Alfred (ed.), Œuvres de Lagrange, III, Gauthier-Villars, pp. 205–421
36. ^ Prasolov, Viktor; Solovyev, Yuri (1997), Elliptic functions and elliptic integrals, AMS Bookstore, ISBN 978-0-8218-0587-9, §6.2, p. 134
37. ^ Kline, Morris (1990), Mathematical Thought from Ancient to Modern Times, Oxford University Press US, ISBN 978-0-19-506136-9, Algebra in the Eighteenth Century: The Theory of Equations
38. ^ a b Daniel Lazard, "Solving quintics in radicals", in Olav Arnfinn Laudal, Ragni Piene, The Legacy of Niels Henrik Abel, pp. 207–225, Berlin, 2004. ISBN 3-540-43826-2

## References

• Guilbeau, Lucye (1930), "The History of the Solution of the Cubic Equation", Mathematics News Letter, 5 (4): 8–12, doi:10.2307/3027812, JSTOR 3027812