Quartic equation

In mathematics, a quartic equation is one which can be expressed as a quartic function equaling zero. The general form of a quartic equation is
where "a" ≠ 0.
The quartic is the highest order polynomial equation that can be solved by radicals in the general case (i.e., one where the coefficients can take any value).
History.
Lodovico Ferrari is attributed with the discovery of the solution to the quartic in 1540, but since this solution, like all algebraic solutions of the quartic, requires the solution of a cubic to be found, it couldn't be published immediately. The solution of the quartic was published together with that of the cubic by Ferrari's mentor Gerolamo Cardano in the book "Ars Magna" (1545).
The proof that this was the highest order general polynomial for which such solutions could be found was first given in the Abel–Ruffini theorem in 1824, proving that all attempts at solving the higher order polynomials would be futile. The notes left by Évariste Galois prior to dying in a duel in 1832 later led to an elegant complete theory of the roots of polynomials, of which this theorem was one result.
Applications.
Polynomials of high degrees often appear in problems involving optimization, and sometimes these polynomials happen to be quartics, but this is a coincidence.
Quartics often arise in computer graphics and during ray-tracing against surfaces such as quadrics or tori surfaces, which are the next level beyond the sphere and developable surfaces.
Another frequent generator of quartics is the intersection of two ellipses.
In computer-aided manufacturing, the torus is a common shape associated with the endmill cutter. In order to calculate its location relative to a triangulated surface, the position of a horizontal torus on the Z-axis must be found where it is tangent to a fixed line, and this requires the solution of a general quartic equation to be calculated. Over 10% of the computational time in a CAM system can be consumed simply calculating the solution to millions of quartic equations.
A program demonstrating various analytic solutions to the quartic was provided in Graphics Gems Book V.
However, none of the three algorithms implemented are unconditionally stable.
In an updated version of the paper , which compares the 3 algorithms from the original paper and 2 others, it is demonstrated that computationally stable solutions exist only for 4 of the possible 16 sign combinations of the quartic coefficients.
Solving a quartic equation.
Special cases.
Consider a quartic equation expressed in the form formula_2:
Degenerate case.
If the constant term "a"4 = 0, then one of the roots is "x" = 0, and the other roots can be found by dividing by "x", and solving the resulting cubic equation,
Evident roots: 1 and −1 and −"k".
Call our quartic polynomial "Q"("x"). Since 1 raised to any power is 1, formula_4. Thus if formula_5, "Q"(1) = 0 and so "x" = 1 is a root of "Q"("x"). It can similarly be shown that if formula_6, "x" = −1 is a root.
In either case the full quartic can then be divided by the factor ("x" − 1) or ("x" + 1) respectively yielding a new cubic polynomial, which can be solved to find the quartic's other roots.
If formula_7, formula_8 and formula_9, then "x" = −"k" is a root of the equation. The full quartic can then be factorized this way:
If formula_11 , formula_12 and formula_13, "x" = 0 and "x" = −"k" are two known roots. "Q"("x") divided by "x"("x" + "k") is a quadratic polynomial.
Biquadratic equations.
A quartic equation where "a"3 and "a"1 are equal to 0 takes the form
and thus is a biquadratic equation, which is easy to solve: let formula_15, so our equation turns to
which is a simple quadratic equation, whose solutions are easily found using the quadratic formula:
When we've solved it (i.e. found these two "z" values), we can extract "x" from them
If either of the "z" solutions were negative or complex numbers, then some of the "x" solutions are complex numbers.
Quasi-symmetric equations.
Steps:
The general case, along Ferrari's lines.
To begin, the quartic must first be converted to a "depressed quartic".
Converting to a depressed quartic.
Let
be the general quartic equation which it is desired to solve. Divide both sides by "A",
The first step should be to eliminate the "x"3 term. To do this, change variables from "x" to "u", such that
Then
Expanding the powers of the binomials produces
Collecting the same powers of "u" yields
Now rename the coefficients of "u". Let
The resulting equation is
which is a depressed quartic equation.
If formula_29 then we have a biquadratic equation, which (as explained above) is easily solved; using reverse substitution we can find our values for formula_30.
If formula_31 then one of the roots is formula_32 and the other roots can be found by dividing by formula_33, and solving the resulting depressed cubic equation,
Using reverse substitution we can find our values for formula_30.
Ferrari's solution.
Otherwise, the depressed quartic can be solved by means of a method discovered by Lodovico Ferrari. Once the depressed quartic has been obtained, the next step is to add the valid identity
to equation (), yielding
The effect has been to fold up the "u"4 term into a perfect square: ("u"2 + α)2. The second term, "αu"2 did not disappear, but its sign has changed and it has been moved to the right side.
The next step is to insert a variable "y" into the perfect square on the left side of equation (), and a corresponding 2"y" into the coefficient of "u"2 in the right side. To accomplish these insertions, the following valid formulas will be added to equation (),
and
These two formulas, added together, produce
which added to equation () produces
This is equivalent to
The objective now is to choose a value for "y" such that the right side of equation () becomes a perfect square. This can be done by letting the discriminant of the quadratic function become zero. To explain this, first expand a perfect square so that it equals a quadratic function:
The quadratic function on the right side has three coefficients. It can be verified that squaring the second coefficient and then subtracting four times the product of the first and third coefficients yields zero:
Therefore to make the right side of equation () into a perfect square, the following equation must be solved:
Multiply the binomial with the polynomial,
Divide both sides by −4, and move the −"β"2/4 to the right,
Divide both sides by 2,
This is a cubic equation in "y". Solve for "y" using any method for solving such equations (e.g. conversion to a reduced cubic and application of Cardano's formula). Any of the three possible roots will do.
Folding the second perfect square.
With the value for "y" so selected, it is now known that the right side of equation () is a perfect square of the form
so that it can be folded:
Therefore equation () becomes
Equation () has a pair of folded perfect squares, one on each side of the equation. The two perfect squares balance each other.
If two squares are equal, then the sides of the two squares are also equal, as shown by:
Collecting like powers of "u" produces
Equation () is a quadratic equation for "u". Its solution is
Simplifying, one gets
This is the solution of the depressed quartic, therefore the solutions of the original quartic equation are
Summary of Ferrari's method.
Given the quartic equation
its solution can be found by means of the following calculations:
If formula_58 then
Otherwise, continue with
Ferrari was the first to discover one of these labyrinthine solutions. The equation which he solved was
which was already in depressed form. It has a pair of solutions which can be found with the set of formulas shown above.
Ferrari's solution in the special case of real coefficients.
If the coefficients of the quartic equation are real then the nested depressed cubic equation () also has real coefficients, thus it has at least one real root.
Furthermore the cubic function
where P and Q are given by () has the properties that
formula_70
where "α" and "β" are given by ().
This means that () has a real root greater than formula_71,
and therefore that () has a real root greater than formula_72.
Using this root the term formula_73 in () is always real,
which ensures that the two quadratic equations () have real coefficients.
Obtaining alternative solutions the hard way.
It could happen that one only obtained one solution through the formulae above, because not all four sign patterns are tried for four solutions, and the solution obtained is complex. It may also be the case that one is only looking for a real solution. Let "x"1 denote the complex solution. If all the original coefficients "A", "B", "C", "D" and "E" are real—which should be the case when one desires only real solutions – then there is another complex solution "x"2 which is the complex conjugate of "x"1. If the other two roots are denoted as "x"3 and "x"4 then the quartic equation can be expressed as
but this quartic equation is equivalent to the product of two quadratic equations:
and
Since
then
Let
so that equation () becomes
Also let there be (unknown) variables "w" and "v" such that equation () becomes
Multiplying equations () and () produces
Comparing equation () to the original quartic equation, it can be seen that
and
Therefore
Equation () can be solved for "x" yielding
One of these two solutions should be the desired real solution.
Alternative methods.
Quick and memorable solution from first principles.
Most textbook solutions of the quartic equation require a magic substitution that is almost impossible to memorize. Here is a way to approach it that makes it easy to understand.
The job is done if we can factor the quartic equation into a product of two quadratics. Let
By equating coefficients, this results in the following set of simultaneous equations: 
This is harder to solve than it looks, but if we start again with a depressed quartic where formula_89, which can be obtained by substituting formula_90 for formula_30, then formula_92, and: 
It's now easy to eliminate both formula_94 and formula_95 by doing the following: 
If we set formula_97, then this equation turns into the cubic equation: 
which is solved elsewhere. Once you have formula_99, then: 
The symmetries in this solution are easy to see. There are three roots of the cubic, corresponding to the three ways that a quartic can be factored into two quadratics, and choosing positive or negative values of formula_99 for the square root of formula_102 merely exchanges the two quadratics with one another.
Galois theory and factorization.
The symmetric group "S"4 on four elements has the Klein four-group as a normal subgroup. This suggests using a resolvent whose roots may be variously described as a discrete Fourier transform or a Hadamard matrix transform of the roots.
Suppose "r""i" for "i" from 0 to 3 are roots of 
If we now set
then since the transformation is an involution, we may express the roots in terms of the four si in exactly the same way. Since we know the value "s"0 = −"b"/2, we really only need the values for s1, s2 and s3. These we may find by expanding the polynomial 
which if we make the simplifying assumption that "b" = 0, is equal to
This polynomial is of degree six, but only of degree three in z2, and so the corresponding equation is solvable. By trial we can determine which three roots are the correct ones, and hence find the solutions of the quartic.
We can remove any requirement for trial by using a root of the same resolvent polynomial for factoring; if w is any root of (3), and if
then
We therefore can solve the quartic by solving for w and then solving for the roots of the two factors using the quadratic formula.