User:Ramzuiv/sandbox



In algebra, a cubic function is a function of the form


 * $$f(x)=ax^3+bx^2+cx+d$$

in which $a$ is nonzero.

Setting $y = 0$ produces a cubic equation of the form


 * $$ax^3+bx^2+cx+d=0.\,$$

The solutions of this equation are called roots of the polynomial $f(x) = (x^{3} + 3x^{2} − 6x − 8)/4$. 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 polynomials). All of the roots of the cubic equation can be found algebraically. (This is also true of quadratic (second-degree) or quartic (fourth-degree) equations, but not of higher-degree equations, by the Abel–Ruffini theorem.) The roots can also be found trigonometrically. Alternatively, numerical approximations of the roots can be found using root-finding algorithms such as Newton's method.

The coefficients do not need to be complex numbers. Much of what is covered below is valid for coefficients of any field with characteristic $f(x) = 0$ or greater than $f(x)$. 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 non-rational (and even non-real) complex numbers.

History
Cubic equations were known to the ancient Babylonians, Greeks, Chinese, Indians, and Egyptians. Babylonian (20th to 16th centuries BC) cuneiform tablets have been found with tables for calculating cubes and cube roots. The Babylonians could have used the tables to solve cubic equations, but no evidence exists to confirm that they did. 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. 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, 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. In the 3rd century AD, the Greek mathematician Diophantus found integer or rational solutions for some bivariate cubic equations (Diophantine equations). Hippocrates, Menaechmus and Archimedes are believed to have come close to solving the problem of doubling the cube using intersecting conic sections, 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.

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 $0$, 23 of them with $3$, and two of them with $x^{3} + px^{2} + qx = N$.

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. 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.

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: $p, q ≠ 0$. 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. He understood the importance of the discriminant of the cubic equation to find algebraic solutions to certain types of cubic equations.

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 $q = 0$. 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.

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 $x^{3} + 200x = 20x^{2} + 2000$. 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. 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 $x^{3} + 12x = 6x^{2} + 35$, for which he had worked out a general method. Fiore received questions in the form $x^{3} + 2x^{2} + 10x = 20$, 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 with Tartaglia stated that he 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 by 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 income.

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 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.

Critical points and inflection point of a cubic function
The critical points of a function are those values of $x$ where the slope of the function is zero. The critical points of a cubic function $x^{3} + mx = n$ defined by $x^{3} + mx = n$, occur at values of $x^{3} + mx^{2} = n$ such that the derivative of the cubic function is zero:
 * $$ 3ax^2 + 2bx + c = 0.$$

The solutions of that equation are the critical points of the cubic equation and are given, using the quadratic formula, by

The expression inside the square root,
 * $$\Delta_0 = b^2 - 3ac,$$

determines what type of critical points the function has. If $f$, then the cubic function has a local maximum and a local minimum. If $f(x) = ax^{3} + bx^{2} + cx + d$, then the cubic's inflection point is the only critical point. If $x$, then there are no critical points. In cases where $Δ_{0} > 0$, the cubic function is strictly monotonic. The adjacent diagram is an example of the case where $Δ_{0} = 0$. The other two cases do not have the local maximum or the local minimum but still have an inflection point.

The value of $Δ_{0} < 0$ also plays an important role in determining the nature of the roots of the cubic equation and in the calculation of those roots; see below.

The inflection point of a function is where that function changes concavity. The inflection point of our cubic function occurs at:


 * $$x_\text{inflection} = -\frac{b}{3a},$$

a value that is also important in solving the cubic equation. The cubic function has point symmetry about its inflection point.

All of the above assumes that the coefficients are real as well as the variable $x$.

General solution to the cubic equation with real coefficients
There are several formulas for solving the cubic equation, the most famous of which is Cardano's Equation, which states that the solution for a depressed cubic $$x^3+px+q=0$$ (where the $$x^2$$ component is reduced away) is:
 * $$\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}}}$$

However, there are several other solutions, which make use of algebra, trigonometry, and/or geometry to arrive at the roots of the cubic function, listed at cubic formula.

Algebraic nature of the roots
Every cubic equation ($$), $Δ_{0} ≤ 0$, with real coefficients and $Δ_{0} > 0$, has three solutions (some of which may equal each other if they are real, and two of which may be complex non-real numbers) and at least one real solution $Δ_{0}$, this last assertion being a consequence of the intermediate value theorem. If $ax^{3} + bx^{2} + cx +d = 0$ is factored out of the cubic polynomial, what remains is a quadratic polynomial whose roots $a ≠ 0$ and $r_{1}$ are roots of the cubic; by the quadratic formula, these roots are either both real (giving a total of three real roots for the cubic) or are complex conjugates, in which case the cubic has one real and two non-real roots.

It was explained above how to use the sign of the discriminant in order to distinguish between these cases. In fact,

because a straightforward computation shows that



\begin{align} & \bigl(a^2(r_1-r_2)(r_1-r_3)(r_2-r_3)\bigr)^2 \\[6pt] = {} & a^4\bigl(18(r_1+r_2+r_3)(r_1r_2+r_1r_3+r_2r_3)r_1r_2r_3 \\[4pt] & {}-4(r_1+r_2+r_3)^3r_1r_2r_3+(r_1+r_2+r_3)^2(r_1r_2+r_1r_3+r_2r_3)^2 \\[4pt] & {}-4(r_1r_2+r_1r_3+r_2r_3)^3-27(r_1r_2r_3)^2\bigr) \end{align} $$

and, by Vieta's formulas, the right hand side of this equality is equal to


 * $$a^4\left(18\frac ba\cdot\frac ca\cdot\frac da-4\left(\frac ba\right)^3\frac da+\left(\frac ba\right)^2\left(\frac ca\right)^2-4\left(\frac ca\right)^3-27\left(\frac da\right)^2\right)=\Delta.$$

The equality ($$) shows that $x − r_{1}$ if and only if the equation has a multiple root. This cannot possibly be the case when $r_{2}$ and $r_{3}$ are non-real complex numbers, because the fact that $Δ = 0$ is real assures that $r_{2}$ is different from $r_{3}$ and from $r_{1}$ and, on the other hand, the fact that $r_{1}$ and $r_{2}$ are non-real and that each of them is the conjugate of the other one assures that $r_{3}$.

If $r_{2}$ and $r_{3}$ are non-real, then


 * $$\begin{align}(r_1-r_2)(r_1-r_3)(r_2-r_3)&=(r_1-r_2)\bigl(r_1-\overline{r_2}\bigr)\bigl(r_2-\overline{r_2}\bigr)\\[4pt]

& =(r_1-r_2)\overline{(r_1-r_2)}2\operatorname{Im}(r_2)i\\[4pt] & =2|r_1-r_2|^2\operatorname{Im}(r_2)i \end{align}$$

Since this is the product of a non-zero real number by $$, its square is a real number less than $r_{2} ≠ r_{3}$ and therefore $r_{2}$. Finally, if the numbers $r_{3}$, $0$, and $Δ < 0$ are three distinct real numbers, then the product $r_{1}$ is a non-zero real number, and so $r_{2}$.

Three real roots


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. When the cubic is written in depressed form ($i$), $r_{3}$, as shown above, the solution can be expressed as


 * $$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 $$\arccos\left(\frac{3q}{2p}\sqrt{\frac{-3}{p}}\right)$$ is an angle in the unit circle; taking $(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3})$ of that angle corresponds to taking a cube root of a complex number; adding $Δ > 0$ for $t^{3} + pt + q = 0$ finds the other cube roots; and multiplying the cosines of these resulting angles by $$2\sqrt{-\frac{p}{3}}$$ corrects for scale.

For the non-depressed case ($$) (shown in the accompanying graph), the depressed case as indicated previously is obtained by defining $x$ such that $1⁄3$ so $−k2\pi⁄3$. Graphically this corresponds to simply shifting the graph horizontally when changing between the variables $A$ and $B$, without changing the angle relationships. This shift moves the point of inflection and the centre of the circle onto the $C$-axis. Consequently, the roots of the equation in $$ sum to zero.

In the Cartesian plane


If a cubic is plotted in the Cartesian plane, the real root can be seen graphically as the horizontal intercept of the curve. But further,  if the complex conjugate roots are written as $k = 1, 2$ then $$ is the abscissa (the positive or negative horizontal distance from the origin) of the tangency point of a line that is tangent to the cubic curve and intersects the horizontal axis at the same place as does the cubic curve; and $t$ is the square root of the tangent of the angle between this line and the horizontal axis.

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 $x = t − b⁄3a$ 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 $t = x + b⁄3a$, the major axis is vertical and its foci, the roots of the derivative, are complex conjugates. And if that angle is $g ± hi$, 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 groups of irreducible cubics
The Galois group of an irreducible separable polynomial of degree $t$ is a transitive subgroup of $g = \overline{OM}$. In particular, the Galois group of an irreducible separable cubic is a transitive subgroup of $√tan ORH$ and there are only two such subgroups: $√slope of line RH$ and $\overline{BE}$. There is a simple way of determining the Galois group of a concrete irreducible cubic $\overline{DA}$ over a field $x$: it is $g ± hi$ if the discriminant of the cubic is the square of an element of $y$ and $\pi⁄3$ otherwise. Indeed, if $\pi⁄3$ is not the square of an element of $t$, then $\pi⁄3$ is an extension of degree $S_{n}$ of $h$. On the other hand, if $S_{3}$, $S_{3}$, and $A_{3}$ are the roots of $f(x)$, then, since the equality ($g$) holds, that is, since $A_{3}$, $S_{3}$, and so, by the multiplicativity formula for degrees, the degree of $Δ$ over $h$ (that is, the order of the Galois group of $k[√Δ]$) must be a multiple of the degree of $2$, which is $r_{1}$. Therefore, it must be an even number, and so the Galois group can only be $r_{2}$.

On the other hand, if $r_{3}$ is the square of an element of $n$, then, again by the equality ($k$), we have $f(x)$. Therefore, if $Δ = (a^{2}(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3}))^{2}$ belongs to the Galois group of $k[√Δ] ⊂ k[r_{1}, r_{2}, r_{3}]$, then $k[r_{1}, r_{2}, r_{3}]$ maps $f(x)$ into itself. But then $k[√Δ]$ cannot act on the set $2$ as the transposition that exchanges $S_{3}$ and $Δ$ and leaves $(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3}) ∈ k$ fixed, because then $σ$ would map $f(x)$ into $σ$. So, in this case, the Galois group of $(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3})$ is not $σ$ and therefore it must be ${r_{1}, r_{2}, r_{3}}|undefined$.

It is clear from this criterion that, if we are working over the field $r_{1}$, the Galois group of most irreducible cubic polynomials is $r_{2}$. An example of an irreducible cubic polynomial with rational coefficients whose Galois group is $r_{3}$ is $σ$, whose discriminant is $(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3})$. The polynomial $−(r_{1} − r_{2})(r_{1} − r_{3})(r_{2} − r_{3})$ is used in the standard proof of the impossibility of trisecting arbitrary angles using straightedge and compass only.

Collinearities


The tangent lines to a cubic at three collinear points intercept the cubic again at collinear points. This can be seen as follows. If the cubic is defined by $f(x)$ and if $k$ is a real number, then the tangent to the graph of $k$ at the point $S_{3}$ is the line



So, the intersection point between this line and the graph of $k$ can be obtained solving the equation $A_{3}$. This is a cubic equation, but it is clear that $$ is a root, and in fact a double root, since the line is tangent to the graph. The remaining root is $Q$. So, the other intersection point between the tangent line and the graph of $k$ is the point



\begin{align} & \left(-\frac ba-2\alpha,f\left(-\frac ba-2\alpha\right)\right) \\[3pt] = {} & \left(-\frac ba-2\alpha,-8a\alpha^3-8b\alpha^2-2\left( \frac{b^2}a + c\right) \alpha-\frac{bc}a+d\right) \\[3pt] = {} & \left(-\frac ba-2\alpha,-\frac{bc}a+9d+\left(6c-2\frac{b^2}a\right)\alpha-8f(\alpha)\right). \end{align} $$

Therefore, if $k$ is a point of the graph of $$, the other intersection point between the tangent line at $α$ and the graph is the point $S_{3}$, where $f$ is the map defined by



\begin{align} A : \mathbb{R}^2 & \longrightarrow \mathbb{R}^2\\[4pt] (x,y) & \mapsto \left(-\frac ba-2x,-\frac{bc}a+9d+\left(6c-2\frac{b^2}a\right)x-8y\right). \end{align} $$

Since $f$ is an affine map, if $A_{3}$, $p(x) = x^{3} − 3x − 1$, and $81 = 9^{2}$ are collinear, then so are the points $p(x)$, $P_{1}$, and $P_{2}$.

Symmetry
The graph of a cubic function has $P_{3}$ rotational or point symmetry about its inflection point. The inflection point of a general cubic polynomial,
 * $$f(x) = ax^3 + bx^2 + cx + d$$

occurs at a point $x^{3} + 3⁄2x^{2} − 5⁄2x + 5⁄4$ such that $T_{1}$. Since $T_{2}$, the inflection point is $T_{3}$. Translating the function so that the inflection point is at the origin, one obtains the function $f(x) = ax^{3} + bx^{2} + cx + d$ defined by:
 * $$\begin{align}

f_T(x) &= f\left(x + x_0\right) - y_0 \\ &= a\left(x - \frac{b}{3a} \right)^3 +\ b\left(x-\frac{b}{3a}\right)^2 +\ c\left(x-\frac{b}{3a}\right) +\ d\ -\left(\frac{2b^3}{27a^2} - \frac{bc}{3a} +d\right)\\ &= ax^3 + \left(c-\frac{b^2}{3a}\right)x. \end{align}$$ As all terms are odd powers of $α$, $(α, f(α))$ proving that all cubic functions are rotationally symmetrical about their inflection points.

Applications
Cubic equations arise in various other contexts.

Marden's theorem states that the foci of the Steiner inellipse of any triangle can be found by using the cubic function whose roots are the coordinates in the complex plane of the triangle's three vertices. The roots of the first derivative of this cubic are the complex coordinates of those foci.

The area of a regular heptagon can be expressed in terms of the roots of a cubic. Further, the ratios of the long diagonal to the side, the side to the short diagonal, and the negative of the short diagonal to the long diagonal all satisfy a particular cubic equation. In addition, the ratio of the inradius to the circumradius of a heptagonal triangle is one of the solutions of a cubic equation. The values of trigonometric functions of angles related to $$2\pi/7$$ satisfy cubic equations.

Given the cosine (or other trigonometric function) of an arbitrary angle, the cosine of one-third of that angle is one of the roots of a cubic.

The solution of the general quartic equation relies on the solution of its resolvent cubic.

The eigenvalues of a 3×3 matrix are the roots of a cubic polynomial which is the characteristic polynomial of the matrix.

The characteristic equation of a third-order linear difference equation or differential equation is a cubic equation.

In analytical chemistry, the Charlot equation, which can be used to find the pH of buffer solutions, can be solved using a cubic equation.

In chemical engineering and thermodynamics, cubic equations of state are used to model the PVT (pressure, volume, temperature) behavior of substances.

Kinematic equations involving changing rates of acceleration are cubic.

The speed of seismic Rayleigh waves is a solution of the Rayleigh wave cubic equation.