Quartic equation

From Example Problems
Jump to: navigation, search

In mathematics, a quartic equation is the result of setting a quartic function equal to zero. An example of a quartic equation is the equation

2x^{4}+4x^{3}-26x^{2}-28x+48=0;

the general form is

a_{0}x^{4}+a_{1}x^{3}+a_{2}x^{2}+a_{3}x+a_{4}=0, where a_{0}\neq 0.

Solving the quartic equation

According to the fundamental theorem of algebra, a quartic equation always has four solutions (roots). They may be complex and there may be duplicate solutions.

Much effort has been turned to finding these roots. As with other polynomials, it is sometimes possible to factor a quartic equation directly; but more often such a feat is Herculean, especially when the roots are irrational or complex. Hence it would be useful to have a general formula or algorithm (analogous to the quadratic equation, which solves all quadratics). After much effort, such a formula was indeed found for quartics — but since then it has been proven (by Evariste Galois) that such an approach dead-ends with quartics; they are the highest-degree polynomial equations whose roots can be expressed in a formula using a finite number of arithmetic operators and n-th roots. From quintics on up, one requires more powerful methods if a general algebraic solution is sought, as explained under quintic equations.

Given the complexity of the quartic formulae (see below), they are not often used. If only the real rational roots are needed, they can be found (as is true for polynomials of any degree) via trial and error, using Ruffini's rule (so long as all the polynomial coefficients are rational). In the modern age of computers, furthermore, good numerical approximations for the roots are rapidly obtainable via Newton's method. But if the quartic must be solved entirely and precisely, the procedures are outlined below.

Special cases

Quartics in name only

If a4 = 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,

a_{0}x^{3}+a_{1}x^{2}+a_{2}x+a_{3}=0.

Biquadratic equations

A quartic equation where a3 and a1 are equal to 0 takes the form

a_{0}x^{4}+a_{2}x^{2}+a_{4}=0\,\!

and thus is a biquadratic equation, very easy to solve. Let z=x^{2}, so our equation turns to

a_{0}z^{2}+a_{2}z+a_{4}=0\,\!

which is a simple quadratic equation, whose solutions are easily found using the quadratic formula:

z={{-a_{2}\pm {\sqrt  {a_{2}^{2}-4a_{0}a_{4}}}} \over {2a_{0}}}\,\!

When we've solved it (i.e. found these two z values), we can extract x from them

x_{1}=+{\sqrt  {z_{1}}}\,\!
x_{2}=-{\sqrt  {z_{1}}}\,\!
x_{3}=+{\sqrt  {z_{2}}}\,\!
x_{4}=-{\sqrt  {z_{2}}}\,\!

If any of the z solutions were negative or complex numbers, some of the x solutions are complex numbers.

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

Ax^{4}+Bx^{3}+Cx^{2}+Dx+E=0\qquad \qquad (1')

be the general quartic equation which it is desired to solve. Divide both sides by A,

x^{4}+{B \over A}x^{3}+{C \over A}x^{2}+{D \over A}x+{E \over A}=0.

The first step should be to eliminate the x3 term. To do this, change variables from x to u, such that

x=u-{B \over 4A}.

Then

\left(u-{B \over 4A}\right)^{4}+{B \over A}\left(u-{B \over 4A}\right)^{3}+{C \over A}\left(u-{B \over 4A}\right)^{2}+{D \over A}\left(u-{B \over 4A}\right)+{E \over A}=0.

Expanding the powers of the binomials produces

\left(u^{4}-{B \over A}u^{3}+{6u^{2}B^{2} \over 16A^{2}}-{4uB^{3} \over 64A^{3}}+{B^{4} \over 256A^{4}}\right)+{B \over A}\left(u^{3}-{3u^{2}B \over 4A}+{3uB^{2} \over 16A^{2}}-{B^{3} \over 64A^{3}}\right)+{C \over A}\left(u^{2}-{uB \over 2A}+{B^{2} \over 16A^{2}}\right)+{D \over A}\left(u-{B \over 4A}\right)+{E \over A}.

Collecting the same powers of u yields

u^{4}+\left({-3B^{2} \over 8A^{2}}+{C \over A}\right)u^{2}+\left({B^{3} \over 8A^{3}}-{BC \over 2A^{2}}+{D \over A}\right)u+\left({-3B^{4} \over 256A^{4}}+{CB^{2} \over 16A^{3}}-{BD \over 4A^{2}}+{E \over A}\right)=0.

Now rename the coefficients of u. Let

\alpha ={-3B^{2} \over 8A^{2}}+{C \over A},
\beta ={B^{3} \over 8A^{3}}-{BC \over 2A^{2}}+{D \over A},
\gamma ={-3B^{4} \over 256A^{4}}+{CB^{2} \over 16A^{3}}-{BD \over 4A^{2}}+{E \over A}.

The resulting equation is

u^{4}+\alpha u^{2}+\beta u+\gamma =0\qquad \qquad (1)

which is a depressed quartic equation.

If \beta =0 then we have a Biquadratic equation, which (as explained above) is easily solved; using reverse substitution we can find our values for x.

Ferrari's solution

Otherwise, the depressed quartic can be solved by means of a method discovered by Ferrari. Once the depressed quartic has been obtained, the next step is to add the valid identity

(u^{2}+\alpha )^{2}-u^{4}-2\alpha u^{2}=\alpha ^{2}

to equation (1), yielding

(u^{2}+\alpha )^{2}+\beta u+\gamma =\alpha u^{2}+\alpha ^{2}.\qquad \qquad (2)

The effect has been to fold up the u4 term into a perfect square: (u2 + α)2. The second term, α u2 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 (2), and a corresponding 2y into the coefficient of u2 in the right side. To accomplish these insertions, the following valid formulas will be added to equation (2),

{\begin{matrix}(u^{2}+\alpha +y)^{2}-(u^{2}+\alpha )^{2}&=&2y(u^{2}+\alpha )+y^{2}\ \ \\&=&2yu^{2}+2y\alpha +y^{2},\end{matrix}}

and

0=(\alpha +2y)u^{2}-2yu^{2}-\alpha u^{2}

These two formulas, added together, produce

(u^{2}+\alpha +y)^{2}-(u^{2}+\alpha )^{2}=(\alpha +2y)u^{2}-\alpha u^{2}+2y\alpha +y^{2}\qquad \qquad (y-{\hbox{insertion}})

which added to equation (2) produces

(u^{2}+\alpha +y)^{2}+\beta u+\gamma =(\alpha +2y)u^{2}+(2y\alpha +y^{2}+\alpha ^{2}).

This is equivalent to

(u^{2}+\alpha +y)^{2}=(\alpha +2y)u^{2}-\beta u+(y^{2}+2y\alpha +\alpha ^{2}-\gamma ).\qquad \qquad (3)

The objective now is to choose a value for y such that the right side of equation (3) 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:

(su+t)^{2}=(s^{2})u^{2}+(2st)u+(t^{2}).

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:

(2st)^{2}-4(s^{2})(t^{2})=0.

Therefore to make the right side of equation (3) into a perfect square, the following equation must be solved:

(-\beta )^{2}-4(2y+\alpha )(y^{2}+2y\alpha +\alpha ^{2}-\gamma )=0.

Multiply the binomial with the polynomial,

\beta ^{2}-4(2y^{3}+5\alpha y^{2}+(4\alpha ^{2}-2\gamma )y+(\alpha ^{3}-\alpha \gamma ))=0

Divide both sides by −4, and move the −β2/4 to the right,

2y^{3}+5\alpha y^{2}+(4\alpha ^{2}-2\gamma )y+\left(\alpha ^{3}-\alpha \gamma -{\beta ^{2} \over 4}\right)=0\qquad \qquad

This is a cubic equation for y. Divide both sides by 2,

y^{3}+{5 \over 2}\alpha y^{2}+(2\alpha ^{2}-\gamma )y+\left({\alpha ^{3} \over 2}-{\alpha \gamma  \over 2}-{\beta ^{2} \over 8}\right)=0.\qquad \qquad (4)
Conversion of the nested cubic into a depressed cubic

Equation (4) is a cubic equation nested within the quartic equation. It must be solved in order to solve the quartic. To solve the cubic, first transform it into a depressed cubic by means of the substitution

y=v-{5 \over 6}\alpha .

Equation (4) becomes

\left(v-{5 \over 6}\alpha \right)^{3}+{5 \over 2}\alpha \left(v-{5 \over 6}\alpha \right)^{2}+(2\alpha ^{2}-\gamma )\left(v-{5 \over 6}\alpha \right)+\left({\alpha ^{3} \over 2}-{\alpha \gamma  \over 2}-{\beta ^{2} \over 8}\right)=0.

Expand the powers of the binomials,

\left(v^{3}-{5 \over 2}\alpha v^{2}+{25 \over 12}\alpha ^{2}v-{125 \over 216}\alpha ^{3}\right)+{5 \over 2}\alpha \left(v^{2}-{5 \over 3}\alpha v+{25 \over 36}\alpha ^{2}\right)+(2\alpha ^{2}-\gamma )v-{5 \over 6}\alpha (2\alpha ^{2}-\gamma )+\left({\alpha ^{3} \over 2}-{\alpha \gamma  \over 2}-{\beta ^{2} \over 8}\right)=0.

Distribute, collect like powers of v, and cancel out the pair of v2 terms,

v^{3}+\left(-{\alpha ^{2} \over 12}-\gamma \right)v+\left(-{\alpha ^{3} \over 108}+{\alpha \gamma  \over 3}-{\beta ^{2} \over 8}\right)=0.

This is a depressed cubic equation.

Relabel its coefficients,

P=-{\alpha ^{2} \over 12}-\gamma ,
Q=-{\alpha ^{3} \over 108}+{\alpha \gamma  \over 3}-{\beta ^{2} \over 8}.

The depressed cubic now is

v^{3}+Pv+Q=0.\qquad \qquad (5)
Solving the nested depressed cubic

The solutions (any solution will do, so pick any of the three complex roots) of equation (5) are

let U={\sqrt[ {3}]{{Q \over 2}\pm {\sqrt  {{Q^{{2}} \over 4}+{P^{{3}} \over 27}}}}}
(taken from Cubic equation)
v={P \over 3U}-U

therefore the solution of the original nested cubic is

y=-{5 \over 6}\alpha +{P \over 3U}-U\qquad \qquad (6)
Remember 1: P=0\Longleftarrow {Q \over 2}+{\sqrt  {{Q^{{2}} \over 4}+{P^{{3}} \over 27}}}=0
Remember 2: \lim _{{P\to 0}}{P \over {\sqrt[ {3}]{{Q \over 2}+{\sqrt  {{Q^{{2}} \over 4}+{P^{{3}} \over 27}}}}}}=0
Folding the second perfect square

With the value for y given by equation (6), it is now known that the right side of equation (3) is a perfect square of the form

(s^{2})u^{2}+(2st)u+(t^{2})=\left(\left({\sqrt  {(s^{2})}}\right)u+{(2st) \over 2{\sqrt  {(s^{2})}}}\right)^{2}
This is correct for both signs of square root, as long as the same sign is taken for both square roots. A ± is redundant, as it would be absorbed by another ± a few equations further down this page.

so that it can be folded:

(\alpha +2y)u^{2}+(-\beta )u+(y^{2}+2y\alpha +\alpha ^{2}-\gamma )=\left(\left({\sqrt  {(\alpha +2y)}}\right)u+{(-\beta ) \over 2{\sqrt  {(\alpha +2y)}}}\right)^{2}.
Note: If β ≠ 0 then α + 2y ≠ 0. If β = 0 then this would be a biquadratic equation, which we solved earlier.

Therefore equation (3) becomes

(u^{2}+\alpha +y)^{2}=\left(\left({\sqrt  {\alpha +2y}}\right)u-{\beta  \over 2{\sqrt  {\alpha +2y}}}\right)^{2}\qquad \qquad (7).

Equation (7) 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:

(u^{2}+\alpha +y)=\pm \left(\left({\sqrt  {\alpha +2y}}\right)u-{\beta  \over 2{\sqrt  {\alpha +2y}}}\right)\qquad \qquad (7').

Collecting like powers of u produces

u^{2}+\left(\mp _{s}{\sqrt  {\alpha +2y}}\right)u+\left(\alpha +y\pm _{s}{\beta  \over 2{\sqrt  {\alpha +2y}}}\right)=0\qquad \qquad (8).
Note: The subscript s of \pm _{s} and \mp _{s} is to note that they are dependent.

Equation (8) is a quadratic equation for u. Its solution is

u={\pm _{s}{\sqrt  {\alpha +2y}}\pm _{t}{\sqrt  {(\alpha +2y)-4(\alpha +y\pm _{s}{\beta  \over 2{\sqrt  {\alpha +2y}}})}} \over 2}.

Simplifying, one gets

u={\pm _{s}{\sqrt  {\alpha +2y}}\pm _{t}{\sqrt  {-\left(3\alpha +2y\pm _{s}{2\beta  \over {\sqrt  {\alpha +2y}}}\right)}} \over 2}.

This is the solution of the depressed quartic, therefore the solutions of the original quartic equation are

x=-{B \over 4A}+{\pm _{s}{\sqrt  {\alpha +2y}}\pm _{t}{\sqrt  {-\left(3\alpha +2y\pm _{s}{2\beta  \over {\sqrt  {\alpha +2y}}}\right)}} \over 2}.\qquad \qquad (8')
Remember: The two \pm _{s} come from the same place in equation (7'), and should both have the same sign, while the sign of \pm _{t} is independent.
Summary of Ferrari's method

Given the quartic equation

Ax^{4}+Bx^{3}+Cx^{2}+Dx+E=0,

its solution can be found by means of the following calculations:

\alpha =-{3B^{2} \over 8A^{2}}+{C \over A},
\beta ={B^{3} \over 8A^{3}}-{BC \over 2A^{2}}+{D \over A},
\gamma ={-3B^{4} \over 256A^{4}}+{CB^{2} \over 16A^{3}}-{BD \over 4A^{2}}+{E \over A},
if \beta =0 solve u^{4}+\alpha u^{2}+\gamma =0 and substitute x=u-{B \over 4A} finding the roots
x=-{B \over 4A}\pm _{s}{\sqrt  {-\alpha \pm _{t}{\sqrt  {\alpha ^{2}-4\gamma }} \over 2}},\qquad \beta =0.
P=-{\alpha ^{2} \over 12}-\gamma ,
Q=-{\alpha ^{3} \over 108}+{\alpha \gamma  \over 3}-{\beta ^{2} \over 8},
R={Q \over 2}\pm {\sqrt  {{Q^{{2}} \over 4}+{P^{{3}} \over 27}}}, (either sign of the square root will do, as long as R does not disappear unnecessarily; in the case of P=0 we want R=Q)
U={\sqrt[ {3}]{R}}, (there are 3 complex roots, any one of them will do)
y=-{5 \over 6}\alpha -U+{\begin{cases}U=0&\to 0\\U\neq 0&\to {P \over 3U}\end{cases}},
x=-{B \over 4A}+{\pm _{s}{\sqrt  {\alpha +2y}}\pm _{t}{\sqrt  {-\left(3\alpha +2y\pm _{s}{2\beta  \over {\sqrt  {\alpha +2y}}}\right)}} \over 2}.
The two ±s must have the same sign, the ±t is independent. To get all roots, find x for ±st = +,+ and for +,− and for −,+ and for −,−. Double roots will be given twice, triple roots 3 times and quadruple roots would be given 4 times (although then β = 0, which is a special case). The order of the roots depends on which cubic root U one chose. (see note for (8) vis-à-vis (8'))

Quod Erat Faciendum.

There are other methods of solving the quartic equations, perhaps more optimal. Ferrari was the first to discover one of these labyrinthine solutions. The equation which he solved was

x^{4}+6x^{2}-60x+36=0

which was already in depressed form. It has a pair of solutions which can be found with the set of formulas shown above.

Obtaining alternative solutions the hard way

It could happen that one only obtained one solution through the seven formulae above, because one doesn't like trying all four sign patterns to get all four solutions, and the solution one obtained is complex. It may also be the case that one is only looking for a real solution. Let x1 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 x2 which is the complex conjugate of x1. If the other two roots are denoted as x3 and x4 then the quartic equation can be expressed as

(x-x_{1})(x-x_{2})(x-x_{3})(x-x_{4})=0,

but this quartic equation is equivalent to the product of two quadratic equations:

(x-x_{1})(x-x_{2})=0\qquad \qquad (9)

and

(x-x_{3})(x-x_{4})=0.\qquad \qquad (10)

Since

x_{2}=x_{1}^{\star }

then

{\begin{matrix}(x-x_{1})(x-x_{2})&=&x^{2}-(x_{1}+x_{1}^{\star })x+x_{1}x_{1}^{\star }\qquad \qquad \qquad \quad \\&=&x^{2}-2\,{\mathrm  {Re}}(x_{1})x+[{\mathrm  {Re}}(x_{1})]^{2}+[{\mathrm  {Im}}(x_{1})]^{2}.\end{matrix}}

Let

a=-2\,{\mathrm  {Re}}(x_{1}),
b=[{\mathrm  {Re}}(x_{1})]^{2}+[{\mathrm  {Im}}(x_{1})]^{2}

so that equation (9) becomes

x^{2}+ax+b=0.\qquad \qquad (11)

Also let there be (unknown) variables w and v such that equation (10) becomes

x^{2}+wx+v=0.\qquad \qquad (12)

Multiplying equations (11) and (12) produces

x^{4}+(a+w)x^{3}+(b+wa+v)x^{2}+(wb+va)x+vb=0.\qquad \qquad (13)

Comparing equation (13) to the original quartic equation, it can be seen that

a+w={B \over A},
b+wa+v={C \over A},
wb+va={D \over A},

and

vb={E \over A}.

Therefore

w={B \over A}-a={B \over A}+2{\mathrm  {Re}}(x_{1}),
v={E \over Ab}={E \over A\left([{\mathrm  {Re}}(x_{1})]^{2}+[{\mathrm  {Im}}(x_{1})]^{2}\right)}.

Equation (12) can be solved for x yielding

x_{3}={-w+{\sqrt  {w^{2}-4v}} \over 2},
x_{4}={-w-{\sqrt  {w^{2}-4v}} \over 2}.

One of these two solutions should be the desired real solution.

Alternative methods

Reduction to a biquadratic

We may find the roots of

x^{4}+cx^{2}+dx+e=0\qquad \qquad (1) (see Quartic equation#Converting to a depressed quartic)

by converting it to a biquadratic equation by means of a Tschirnhaus transformation.

If y=x^{2}+px+q, we may set p to be a root of

dp^{3}+(4e-c^{2})p^{2}-2cdp-d^{2}=0 (see Cubic equation)

and

q to be {c \over 2}.

This transforms the equation to

y^{4}+(-c^{2}/2+3pd+2e+p^{2}c)y^{2}+
(48p^{2}ced^{2}-128pce^{2}d-4c^{3}p^{2}d^{2}+32pc^{3}ed-128p^{2}c^{2}e^{2}+
d^{2}c^{4}-12pd^{3}c^{2}+8d^{2}ec^{2}+16p^{2}c^{4}e+256p^{2}e^{3}-48d^{2}e^{2}+d^{2}c^{4})/(16d^{2})

which is biquadratic and can be solved using square roots. Solving for x in terms of y entails solving a quadratic equation, also via square roots.

Hence we have a solution in terms of square roots and a root of a cubic polynomial.

This can result in four y's and consequently in eight x's; the four roots of (1) can then be determined by trial and error.

Galois theory and factorization

The symmetric group S4 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 ri for i from 0 to 3 are roots of

x^{4}+bx^{3}+cx^{2}+dx+e=0\qquad (1)

If we now set

s_{0}=(r_{0}+r_{1}+r_{2}+r_{3})/2
s_{1}=(r_{0}-r_{1}+r_{2}-r_{3})/2
s_{2}=(r_{0}+r_{1}-r_{2}-r_{3})/2
s_{3}=(r_{0}-r_{1}-r_{2}+r_{3})/2

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 s0 = -b/2, we really only need the values for s1, s2 and s3. These we may find by expanding out the polynomial

(z^{2}-s_{1}^{2})(z^{2}-s_{2}^{2})(z_{3}-s_{3}^{2})\qquad (2)

which if we make the simplifying assumption that b=0, is equal to

{z}^{{6}}+2c\,{z}^{{4}}+({c}^{{2}}-4e)\,{z}^{{2}}-{d}^{{2}}\qquad (3)

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 F_{1}={x}^{{2}}+wx+1/2\,{w}^{{2}}+1/2\,c-1/2\,{{\frac  {{c}^{{2}}w}{d}}}-1/2\,{{\frac  {{w}^{{5}}}{d}}}-{{\frac  {c{w}^{{3}}}{d}}}+2\,{{\frac  {ew}{d}}} F_{2}={x}^{{2}}-wx+1/2\,{w}^{{2}}+1/2\,c+1/2\,{{\frac  {{w}^{{5}}}{d}}}+{{\frac  {c{w}^{{3}}}{d}}}-2\,{{\frac  {ew}{d}}}+1/2\,{{\frac  {{c}^{{2}}w}{d}}} then

F_{1}F_{2}=x^{4}+cx^{2}+dx+e\,\,(4)

We therefore can solve the quartic by solving for w and then solving for the roots of the two factors using the quadratic formula.

See also

Reference

es:Ecuación de cuarto grado he:משוואה ממעלה רביעית ja:四次方程式 pt:Equação biquadrática ru:Биквадратное уравнение