Quartic function

The quartic function is the bridge between the cubic function and more advanced functions such as the quintic and sextic.

=Objective=


 * Present quartic function and quartic equation.
 * Introduce the concept of roots of equal absolute value.
 * Show how to predict and calculate equal roots, techniques that will be useful when applied to higher order functions.
 * Simplify the depressed quartic.
 * Show that the quartic equation is effectively solved when at least one root is known.
 * Present the "resolvent" cubic function.
 * Show how to derive and use the quartic formula.

=Lesson=

Introduction
The quartic function is the sum of powers of $$x$$ from $$0$$ through $$4$$:

$$y = f(x) = ax^4 + bx^3 + cx^2 + dx^1 + ex^0$$

usually written as:

$$y = f(x) = ax^4 + bx^3 + cx^2 + dx + e.$$

If $$e == 0$$ the function becomes $$x(ax^3 + bx^2 + cx + d).$$

Within this page we'll say that:


 * both coefficients $$a, e$$ must be non-zero,
 * coefficient $$a$$ must be positive (simply for our convenience),
 * all coefficients must be real numbers, accepting that the function may contain complex roots.

The quartic equation is the quartic function equated to zero:

$$ax^4 + bx^3 + cx^2 + dx + e = 0$$.

Roots of the function are values of $$x$$ that satisfy the quartic equation.

Because the function is "quartic" (maximum power of $$x$$ is $$4$$), the function contains exactly $$4$$ roots, an even number of complex roots and an even number of real roots.

Other combinations of real and complex roots are possible, but they produce complex coefficients.

The figure shows a typical quartic function.

The function crosses the $$X$$ axis in 4 different places. The function has 4 roots: $$(-2,0), (1,0), (5,0), (10,0).$$

This function contains one local minimum, one local maximum and one absolute minimum. There is no absolute maximum.

Because the function contains one absolute minimum:


 * If abs($$x$$) is very large, $$f(x)$$ is always positive.


 * If absolute minimum is above $$X$$ axis, curve does not cross $$X$$ axis and function contains only complex roots.


 * There is always at least one point where the curve is parallel to $$X$$ axis.

The curve is never parallel to the $$Y$$ axis. For any real value of $$x$$ there is always a real value of $$y.$$

If coefficient $$d$$ is missing, the quartic function becomes $$y = ax^4 + bx^3 + cx^2 + e,$$ and

$$y' = 4ax^3 + 3bx^2 + 2cx = x(4ax^2 + 3bx + 2c).$$

For a stationary point $$y' = x(4ax^2 + 3bx + 2c) = 0.$$

When coefficient $$d$$ is missing, there is always a stationary point at $$x = 0.$$

If coefficients $$b, d$$ are missing, the quartic function becomes a quadratic in $$x^2.$$

The curve (red line) in diagram has equation: $$y = f(x) = \frac{x^4 - 13x^2 + 36}{5}$$

The quartic equation may be solved as: $$X^2 - 13X + 36 = 0$$ where $$X = x^2$$ or $$x = \sqrt{X}.$$

$$X = 4$$ or $$X = 9.$$

$$x = \pm 2$$ or $$x = \pm 3.$$

The quartic function may be expressed as $$x = ay^4 + by^3 + cy^2 + dy + e.$$

Unless otherwise noted, references to "quartic function" on this page refer to function of form $$y = ax^4 + bx^3 + cx^2 + dx + e.$$

Coefficient $$a$$ may be negative as shown in diagram.

As $$(x)$$ increases, the value of $$f(x)$$ is dominated by the term $$-ax^4.$$

When $$(x)$$ is very large, $$f(x)$$ is always negative.

Unless stated otherwise, any reference to "quartic function" on this page will assume coefficient $$a$$ positive.

When sum of roots is $$0,$$ coefficient $$b = 0.$$

In the diagram, roots of $$f(x)$$ are $$-5, -4, 2, 7.$$

Sum of roots $$= 0.$$

Therefore coefficient $$b = 0.$$

Function as product of linear function and cubic
When $$p$$ is a root of the function, the function may be expressed as:

$$(x - p)( Ax^3 + Bx^2 + Cx + D )$$ where

$$A = a;\ B = Ap + b;\ C = Bp + c;\ D = Cp + d.$$

When one real root $$p$$ is known, the other three roots may be calculated as roots of the cubic function $$Ax^3 + Bx^2 + Cx + D.$$

In the diagram the quartic function has equation: $$y = \frac{ x^4 - 23x^3 + 163x^2 - 393x + 252 }{ 48 }.$$

It is known that $$3$$ is a root of this function.

The associated cubic has equation: $$y = \frac { x^3 - 20x^2 + 103x - 84} { 48 }$$

The 2 curves coincide at points $$(1, 0),\ (7, 0),\ (12, 0),$$ the three points that are roots of both functions. $$$$

Function defined by 5 points
Because the quartic function contains 5 coefficients, 5 simultaneous equations are needed to define the function.

See Figure 1. The quartic function may be defined by any 5 unique points on the curve.

For example, let us choose the five points:

$$(-5,0), (-2,0), (1,0), (3,-6), (6,2)$$

Rearrange the standard quartic function to prepare for the calculation of $$a,b,c,d,e:$$

$$x^4 a + x^3 b + x^2 c + x d + 1e - y = 0.$$

For function  see "Solving simultaneous equations".

Quartic function defined by the 5 points $$(-5,0), (-2,0), (1,0), (3,-6), (6,2)$$ is $$y = \frac{0.875 x^4 + 0.15 x^3 - 27.975 x^2 - 24.05 x + 51}{33}.$$

Function defined by 3 points and 2 slopes
Because the quartic function contains 5 coefficients, 5 simultaneous equations are needed to define the function.

See Figure 1. The quartic function may be defined by any 3 unique points on the curve and the slopes at any 2 of these points.

For example, let us choose the three points:

$$(-2, -2), (6, -4), (4, 1)$$

At point $$(-2, -2)$$ slope is $$0.$$

At point $$(6, -4)$$ slope is $$0.$$

Rearrange the standard quartic function to prepare for the calculation of $$a,b,c,d,e:$$

$$x^4 a + x^3 b + x^2 c + x d + 1e - y = 0.$$

Rearrange the standard cubic function of slope to prepare for the calculation of $$a,b,c,d,e:$$

$$ 4 x^3 a + 3 x^2 b + 2 x c + 1 d + 0 e - s = 0.$$

For function  see "Solving simultaneous equations".

Quartic function defined by three points and two slopes is: $$y = \frac{ 1.5625 x^4 -12.125 x^3 -14.75 x^2 + 136.5 x  + 114.0 } {48}.$$

When p
-2====

Quartic function is: $$y = f(x) = \frac{ 1.5625 x^4 -12.125 x^3 -14.75 x^2 + 136.5 x  + 114.0 } {48}.$$

When $$p == -2,$$ associated cubic function is : $$y = g(x) = \frac{ 1.5625 x^3 - 15.25 x^2 + 15.75 x + 105 } {48}.$$

Three blue vertical lines show 3 values of $$x$$ where $$g(x) = 0$$ and $$f(x) = f(-2)$$

In this case roots of $$g(x)$$ include $$x = p.$$

When p
5====

Quartic function is: $$y = f(x) = \frac{ 1.5625 x^4 -12.125 x^3 -14.75 x^2 + 136.5 x  + 114.0 } {48}.$$

When $$p == 5,$$ associated cubic function is : $$y = g(x) = \frac{ 1.5625 x^3 - 4.3125 x^2 - 36.3125 x - 45.0625 } {48}.$$

Two blue vertical lines show 2 values of $$x$$ where $$f(x) = f(5)$$

In this case the one root of $$g(x)$$ excludes $$x = p.$$

When p
6====

Quartic function is: $$y = f(x) $$$$= \frac{ 1.5625 x^4 -12.125 x^3 -14.75 x^2 + 136.5 x  + 114.0 } {48}.$$

When $$p == 6,$$ associated cubic function is: $$y = g(x) $$$$= \frac{ 1.5625 x^3 - 2.75 x^2 - 31.25 x - 51 } {48}.$$

One blue vertical line shows 1 value of $$x$$ where $$f(x) = f(6)$$

In this case the one root of $$g(x)$$ includes $$x = p.$$

Quartic with 2 stationary points
In the diagram the red line represents quartic function $$y = f(x) = 4(x^4 + 3x^3 + 3x^2 + x) - 1.$$

The grey line $$g(x)$$ is the first derivative of $$f(x).$$

The 2 roots of $$g(x),\ -1$$ and $$\frac{-1}{4}$$ show that $$f(x)$$ has stationary points at $$x = -1$$ and $$x = -0.25.$$

Quartic with 1 stationary point
In the diagram the red line represents quartic function $$y = f(x) = \frac{x^4 + 3x^3 + 3x^2 + 3x}{2}$$

The grey line $$g(x)$$ is the first derivative of $$f(x).$$

The 1 root of $$g(x),\ -1.607$$ (approx.), shows that $$f(x)$$ has 1 stationary point where $$g(x) = 0.$$

=First and second derivatives=

Points of inflection
In the diagram the black line has equation: $$y = f(x) = \frac{x^4 - 16x^3 + 42x^2 + 12x + 4}{144}.$$

The first derivative, the red line, has equation: $$y' = g(x) = \frac{x^3 - 12x^2 + 21x + 3}{36}.$$

The second derivative, the blue line, has equation: $$y'' = h(x) = \frac{x^2 - 8x + 7}{12}.$$

When $$x < x_1:$$


 * $$y'$$ is increasing.


 * $$y''$$ is positive.


 * $$f(x)$$ is always concave up.

When $$x == x_1:$$


 * $$y'$$ is at a local maximum.


 * $$y'' = 0.$$


 * Concavity of $$f(x)$$ is between up and down.

When $$x_1 < x < x_2:$$


 * $$y'$$ is decreasing.


 * $$y''$$ is negative.


 * $$f(x)$$ is always concave down.

When $$x == x_2:$$


 * $$y'$$ is at a local minimum.


 * $$y'' = 0.$$


 * Concavity of $$f(x)$$ is between down and up.

When $$x_2 < x:$$


 * $$y'$$ is increasing.


 * $$y''$$ is positive.


 * $$f(x)$$ is always concave up.

The roots of $$h(x): x_1 = 1, x_2 = 7.$$

Let point $$p_1$$ on $$f(x)$$ have coordinates $$(x_1, f(x_1)).$$

Let point $$p_2$$ on $$f(x)$$ have coordinates $$(x_2, f(x_2)).$$

At point $$p_1$$ concavity of $$f(x)$$ changes from up to down.

At point $$p_2$$ concavity of $$f(x)$$ changes from down to up.

The points $$p_1, p_2$$ (the $$X$$ coordinates of which are roots of $$h(x)$$) are the points of inflection of $$f(x).$$

Maxima and minima
In the diagram the black line has equation: $$y = f(x) = \frac{1.5625x^4 - 12.125x^3 - 14.75x^2 + 136.5x + 114}{48}.$$

The first derivative, the red line, has equation: $$y' = g(x) = \frac{6.25x^3 - 36.375x^2 - 29.5x + 136.5}{48}.$$

The second derivative, the blue line, has equation: $$y'' = h(x) = \frac{18.75x^2 - 72.75x - 29.5}{48}.$$

Roots of $$g(x):\ x_1 = -2;\ x_2 = 1.82;\ x_3 = 6.$$

Let point $$p_1$$ on $$f(x)$$ have coordinates $$(x_1, f(x_1)).$$

At $$x_1\ h(x_1)$$ is positive. Point $$p_1$$ is a stationary point and $$f(x)$$ at $$p_1$$ is concave up. Point $$p_1$$ is a local minimum.

Let point $$p_2$$ on $$f(x)$$ have coordinates $$(x_2, f(x_2)).$$

At $$x_2\ h(x_2)$$ is negative. Point $$p_2$$ is a stationary point and $$f(x)$$ at $$p_2$$ is concave down. Point $$p_2$$ is a local maximum.

Let point $$p_3$$ on $$f(x)$$ have coordinates $$(x_3, f(x_3)).$$

At $$x_3\ h(x_3)$$ is positive. Point $$p_3$$ is a stationary point and $$f(x)$$ at $$p_3$$ is concave up. Point $$p_3$$ is a local minimum.

Quartic with 2 stationary points
In the diagram, point $$p_1$$ on $$f(x)$$ has coordinates $$(x_1, f(x_1)).$$

Similarly, points $$p_2, p_3$$ have coordinates $$(x_2, f(x_2)),\ (x_3, f(x_3)).$$

$$y'$$ has roots: $$x_1 = -1;\ x_3 = -0.25.$$

Points $$p_1, p_3$$ are stationary points.

$$y''$$ has roots: $$x_1 = -1;\ x_2 = -0.5.$$

Points $$p_1, p_2$$ are points of inflection.

At point $$p_3\ y''$$ is positive. $$f(x)$$ at $$p_3$$ is concave up. Point $$p_3$$ is local minimum.

Summary:


 * Point $$p_1$$ is both stationary point and point of inflection.


 * Point $$p_2$$ is point of inflection.


 * Point $$p_3$$ is both stationary point and local minimum.

=The simplest quartic function=

The simplest quartic function has coefficients $$b = c = d = 0.$$

Red line in diagram has equation: $$y = f(x) = x^4 - 1.1^4$$

First derivative (not shown) of $$f(x):\ y' = g(x) = 4x^3.$$

When $$x == 0,\ g(x) = 0.$$ There is a stationary point on $$f(x)$$ when $$x == 0,$$ point $$p_0.$$

Second derivative (not shown) of $$f(x):\ y'' = h(x) = 12x^2.$$

When $$x == 0,\ h(x) = 0.$$ There is a point of inflection on $$f(x)$$ when $$x == 0.$$

For every non-zero value of $$x,\ h(x)$$ is positive. To left and right of point $$p_0,\ f(x)$$ is always concave up. Point $$p_0$$ is both local minimum and absolute minimum.


 * Point $$p_0$$ is stationary point and point of inflection and absolute minimum.

Curve $$f(x)$$ is useful for finding the fourth root of a real number.

Solve: $$x = N^{\frac{1}{4}}.$$

$$x^4 = N.$$

$$x^4 - N = 0.$$

This is equivalent to finding a root of function $$y = j(x) = x^4 - N.$$

If you use Newton's method to find a root of $$j(x),$$ this would be more efficient than solving $$x = \sqrt{\sqrt{N}}.$$

=Roots of equal absolute value=

The standard quartic function: $$y = ax^4 + bx^3 + cx^2 + dx + e\ \dots\ (1)$$

For $$x$$ in $$(1)$$ substitute $$(p+q).$$ Call this $$(2).$$

For $$x$$ in $$(1)$$ substitute $$(p-q).$$ Call this $$(3).$$

Combine $$(2)$$ and $$(3)$$ to eliminate $$q$$ and produce an equation in $$p:$$

$$(- 64aaa)pppppp+$$

$$(- 96aab)ppppp+$$

$$(- 32aac - 48abb)pppp+$$

$$(- 32abc - 8bbb)ppp+$$

$$(+ 16aae - 4abd - 4acc - 8bbc)pp+$$

$$(+ 8abe - 2bbd - 2bcc)p+$$

$$(+ add + bbe - bcd)\ =\ 0\ \dots\ (4).$$

We are interested in coefficient $$0$$ of $$(4):\ c_0 = add + bbe - bcd.$$

If $$c_0 == 0,\ p=0$$ is a solution and function $$(1)$$ has 2 roots of form $$0 \pm q$$ where $$q = \sqrt{\frac{-d}{b}}.$$

An example:

In the diagram the red line has equation: $$y = f(x) = \frac{x^4 - 12x^3 + 31x^2 + 48x -140}{45}.$$

$$a,b,c,d,e = 1,-12,31,48,-140$$

$$c_0 = add + bbe - bcd $$$$= 1(48)(48) + (-12)(-12)(-140) - (-12)(31)(48) = 0.$$

$$f(x)$$ has roots of equal absolute value.

$$q = \sqrt{\frac{-d}{b}} = \sqrt{\frac{-48}{-12}} = \sqrt{4} = \pm 2.$$

The 2 roots of equal absolute value are: $$2, -2.$$

The method works with complex roots of equal absolute value:

In the diagram the red line has equation: $$y = f(x) = \frac{x^4 - 3x^3 - x^2 - 27x - 90}{50}.$$

$$a,b,c,d,e = 1,-3,-1,-27,-90$$

$$c_0 = 0.$$

$$f(x)$$ has roots of equal absolute value.

$$q = \sqrt{\frac{-d}{b}} = \sqrt{\frac{-(-27)}{-3}} = \sqrt{-9} = \pm 3i.$$

The 2 roots of equal absolute value are: $$3i, -3i.$$

=Equal roots=

Equal roots occur when the function and the slope of the function both equal zero.

$$ax^4 + bx^3 + cx^2 + dx + e = 0\ \dots\ (1)$$

$$4ax^3 + 3bx^2 + 2cx + d = 0\ \dots\ (2)$$

Begin the process of reducing $$(1),\ (2)$$ to linear functions.

Combine $$(1),\ (2)$$ to produce 2 cubic functions:

$$Fx^3 + Gx^2 + Hx + J\ \dots\ (1a)$$ where:

$$F = ad;\ G = bd - 4ae;\ H = cd - 3be;\ J = dd - 2ce.$$

$$fx^3 + gx^2 + hx + j\ \dots\ (2a)$$ where:

$$f = 4a;\ g = 3b;\ h = 2c;\ j = d.$$

Combine $$(1a),\ (2a)$$ to produce 2 quadratic functions:

$$Kx^2 + Lx + M\ \dots\ (1b)$$ where:

$$K = Gf -Fg;\ L = Hf -Fh;\ M = Jf - Fj.$$

$$kx^2 + lx + m\ \dots\ (2b)$$ where:

$$k = Fj - Jf;\ l = Gj - Jg;\ m = Hj - Jh.$$

Combine $$(1b),\ (2b)$$ to produce 2 linear functions:

$$Rx + S\ \dots\ (1c)$$ where:

$$R = Lk - Kl;\ S = Mk - Km.$$

$$rx + s\ \dots\ (2c)$$ where:

$$r = Km-Mk;\ s = Lm - Ml.$$

From $$(1c):\ x_1 = \frac{-S}{R}$$

From $$(2c):\ x_2 = \frac{-s}{r}$$

If $$x_1 == x_2:$$

$$\frac{-S}{R} = \frac{-s}{r}$$

$$Rs = rS$$

$$Rs - Sr = 0.$$

The value $$Rs - Sr$$ is in fact:

which, by removing values $$aa, d$$$$d$$ (common to all values), may be reduced to:

If $$status == 0,$$ there are at least 2 equal roots which may be calculated as shown below.

If coefficient $$d$$ is non-zero, it is not necessary to calculate $$status.$$

If coefficient $$d == 0,$$ verify that $$status = 0$$ before proceeding.

No equal roots
Red line in diagram is of function: $$y = f(x) = \frac{x^4 - 3x^3 - x^2 - 27x - 90}{50}$$

$$a,b,c,d,e = 1, -3, -1, -27, -90$$

$$R, S = 15269148, -35977608$$

$$x_1 = \frac{-S}{R} = \frac{35977608}{15269148} = 2.3562289133617\dots$$

$$r, s = 35977608, -60634332$$

$$x_2 = \frac{-s}{r} = \frac{60634332}{35977608} = 1.685335278543253\dots$$

$$x_1 != x_2.$$ There are no equal roots.

Exactly 2 equal roots
Red line in diagram is of function: $$y = f(x) = \frac{x^4 + 6x^3 - 48x^2 - 182x + 735}{100}$$

$$a,b,c,d,e = 1, 6, -48, -182, 735$$

$$R, S = -1027353600, -7191475200$$

$$x_1 = \frac{-S}{R} = \frac{7191475200}{-1027353600} = -7$$

$$r, s = 7191475200, 50340326400$$

$$x_2 = \frac{-s}{r} = \frac{-50340326400}{7191475200} = -7$$

$$x_1 = x_2 = -7.$$ There are 2 equal roots at $$x = -7.$$

The following 3 graphs show the steps that lead to calculation of equal roots at point $$(-7, 0).$$

In all graphs, all curves have a common root at point $$(-7, 0).$$

See "Function as product of linear function and cubic" above.

To calculate all roots: Roots of quadratic function $$g(x) = x^2 - 8x + 15$$ are $$3, 5.$$

All roots of $$f(x)$$ are $$-7, -7, 3, 5.$$

Exactly 3 equal roots
Red line in diagram is of function: $$y = f(x) = \frac{x^4 - 2x^3 - 36x^2 + 162x - 189}{100}$$

$$a,b,c,d,e = 1, -2, -36, 162, -189$$

$$R, S = 0, 0\ \dots\dots\ (1c)$$

$$r, s = 0, 0\ \dots\dots\ (2c)$$

In this case the calculation of $$x_1, x_2$$ is not appropriate because there are more than 2 equal roots. Try equations $$(1b), (2b).$$ Both of these are equivalent to: $$y = g(x) = x^2 - 6x + 9,$$ blue line in diagram.

Discriminant of $$g(x) = (-6)^2 - 4(1)(9) = 0.\ g(x)$$ has two equal roots at $$x = \frac{-(-6)}{2(1)} = 3.$$ Therefore $$f(x)$$ has 3 equal roots at $$x = 3.$$

Four equal roots
Red line in diagram is of function: $$y = f(x) = x^4 - 20x^3 + 150x^2 - 500x + 625.$$

$$a,b,c,d,e = 1, -20, 150, -500, 625$$

$$R, S = 0, 0$$

$$r, s = 0, 0$$

$$K, L, M = 0, 0, 0$$

$$k, l, m = 0, 0, 0$$

In this case $$(1b), (2b), (1c), (2c)$$ are all null.

This is the only case in which $$(1b), (2b)$$ are null.

$$(1a), (2a)$$ are both equivalent to: $$y = g(x) = x^3 - 15x^2 + 75x - 125,$$ blue line in diagram.

$$g(x)$$ has one root at $$x = 5.$$ Therefore $$f(x)$$ has 4 equal roots at $$x = 5.$$

Two pairs of equal roots
Red line in diagram is of function: $$y = f(x) = \frac{x^4 - 6x^3 - 11x^2 + 60x + 100}{20}.$$

$$a,b,c,d,e = 1, -6, -11, 60, 100$$

$$R, S = 0, 0$$

$$r, s = 0, 0$$

In this case $$(1c), (2c)$$ are both null.

$$(1b), (2b)$$ are both equivalent to: $$y = g(x) = \frac{x^2 - 3x - 10}{20},$$ blue line in diagram.

$$g(x)$$ has one root at $$x = -2$$ and one root at $$x = 5.$$ Therefore $$f(x)$$ has 2 equal roots at $$x = -2$$ and 2 equal roots at $$x = 5.$$

This method is valid for complex roots.

For example: $$y = f(x) = x^4 - 12x^3 + 62x^2 - 156x + 169.$$

$$a,b,c,d,e = 1,-12,62,-156,169.$$

In this case $$(1c),\ (2c)$$ are both null.

$$(1b),\ (2b)$$ are both equivalent to: $$y = g(x) = x^2 - 6x + 13,$$ blue line in diagram.

Roots of $$g(x)$$ are $$3 \pm 2i.$$

$$f(x)$$ has 2 roots equal to $$3 + 2i$$ and 2 roots equal to $$3 - 2i.$$

Caution
Black line in diagram has equation: $$y = f(x) = 0.012684240362811794x^4$$ $$ -\  0.19522392290249435x^3   $$ $$ +\   0.7654478458049887x^2 + 0x - 3. $$

$$f(x)$$ is a quartic function with exactly 2 equal roots and coefficient $$d$$ missing.

Calculation of equal roots of $$f(x)$$ gives linear functions $$(1c), (2c)$$ null and quadratic functions $$(1b), (2b)$$ with equal roots of $$ (4,0),   (7.543296089385474,0). $$

Usually, this indicates that $$f(x)$$ should have 2 equal roots at $$(4,0)$$ and 2 equal roots at $$(7.543296089385474,0).$$

It is obvious that $$7.543296089385474$$ is not a root of $$f(x).$$

When $$x = 7.543296089385474,$$ slope of derivative $$g(x) = 0.$$ Value of $$f(x)\ != 0.$$

This example indicates that it would be wise to verify that calculated equal roots are in fact valid roots of $$f(x).$$

=Depressed quartic=

A depressed quartic is any quartic function with any one or more of coefficients $$b,c,d$$ missing. Within this section a depressed quartic has coefficient $$b$$ missing.

To produce the depressed quartic:

$$y = ax^4 + bx^3 + cx^2 + dx + e\ \dots\ (1)$$

$$y = \frac{(4^4 a^3)(ax^4 + bx^3 + cx^2 + dx + e)}{4^4 a^3}\ \dots\ (2)$$

Let $$x = \frac{-b + t}{4a}.$$ Substitute in $$(2),$$ expand and simplify:

$$y = \frac{t^4 + At^2 + Bt + C}{4^4a^3}\ \dots\ (3)$$

where:

$$A = 16ac - 6b^2$$

$$B = 64a^2 d - 32abc + 8b^3$$

$$C = 256a^3e - 64a^2 bd + 16ab^2 c - 3 b^4$$

When equated to $$0,\ (3)$$ becomes the depressed equation:

$$t^4 + At^2 + Bt + C = 0\ \dots\ (4).$$

Be prepared for the possibility that any 1 or more of $$A, B, C$$ may be zero.

Coefficient B missing


If coefficient $$B == 0,\ (4)$$ becomes a quadratic in $$t^2:$$

$$t^4 + At^2 + C = 0.$$

$$(1)$$ has the appearance of a quadratic.

The black line: $$y = f(x) = \frac{x^4 - 4x^3 + 9x^2 - 10x + 5}{10}$$

$$B = 64a^2 d - 32abc + 8b^3$$ $$= 8( 8(-10) - 4(-4)(9) + -64 )$$ $$= 8(-80 + 144 - 64)$$ $$= 8(0) = 0.$$

The red line: $$y' = g(x) = \frac{4x^3 - 12x^2 + 18x - 10}{10}$$

$$y' = g(x) = 0$$ where $$x = 1.$$

The grey line: $$y'' = h(x) = \frac{12x^2 - 24x + 18}{10}$$


 * Absolute minima of $$f(x)$$ and of $$h(x)$$ and point of inflection of $$g(x)$$ occur where $$x = \frac{-b}{4} = 1.$$


 * $$y''$$ is always positive. $$f(x)$$ is always concave up.


 * $$f(1 + p) = f(1-p).$$

If $$(1)$$ contains 2 pairs of equal roots, coefficient $$B = 0.$$

The converse is not necessarily true.

If $$(1)$$ contains 4 equal roots, coefficients $$A = B = C = 0.$$

Coefficient C missing
If coefficient $$C == 0,\ (4)$$ becomes:

$$t^4 + At^2 + Bt = t(t^3 + At + B) = 0$$

in which case $$t = 0$$ is a solution and $$x = \frac{-b}{4a}$$ is a root of $$(1).$$

Curve (red line) in example has equation: $$y = f(x) = 8x^4 + 16x^3 + 24x^2 + 89x + 40.$$

Coefficients of depressed function are:

Coefficient $$C$$ of depressed function is missing. $$t = 0$$ is a solution.

Using $$x = \frac{-b + t}{4a},$$

one root of $$f(x) = \frac{-16 + 0}{4(8)} = -0.5.$$

Resolvent cubic
This section introduces a special cubic function called "resolvent" because it helps to resolve a requirement, the calculation of the roots of the quartic.

The depressed quartic: $$t^4 + At^2 + Bt + C\ \dots\ (1)$$

For $$t$$ substitute $$(u+v)\ \dots\ (2)$$

For $$t$$ substitute $$(u-v)\ \dots\ (3)$$

$$(2)+(3):\ 2Auu + 2Avv + 2Bu + 2C + 2uuuu + 12uuvv + 2vvvv\ \dots\ (4)$$

Simplify $$(4):\ Auu + AV + Bu + C + uuuu + 6uuV + VV\ \dots\ (4a)$$

$$(2)-(3):\ 4Auv + 2Bv + 8uuuv + 8uvvv\ \dots\ (5)$$

Simplify $$(5):\ 2Au + B + 4uuu + 4uV\ \dots\ (5a)$$

From $$(5a):\ 4uV = -(2Au + B + 4uuu)\ \dots\ (5b)$$

$$(4a)*4u4u:\ 4u4uAuu + A4u(4uV) + 4u4uBu + 4u4uC + 4u4uuuuu + 6uu4u(4uV) + (4uV)(4uV)\ \dots\ (6)$$

In $$(6)$$ replace $$4uV$$ with $$(-(2Au + B + 4uuu)),$$ expand, simplify, gather like terms and result is:

$$Pu^6 + Qu^4 + Ru^2 + S$$ or

$$PU^3 + QU^2 + RU + S\ \dots\ (7)$$ where:

$$U = u^2$$

$$P = 64$$

$$Q = 32A$$

$$R = 4A^2 - 16C$$

$$S = -B^2$$

From $$(5b):\ V = v^2 = \frac{-(2Au + B + 4uuu)}{4u} = -(\frac{A}{2} + U) - \frac{B}{4u}\ \dots\ (8)$$

Some simple changes reduce the number of calculations and also the sizes of coefficients $$P, Q, R, S.$$

$$A2 = 8ac - 3b^2$$ where $$A2 = \frac{A}{2}$$

$$B4 = 16a^2 d - 8abc + 2b^3$$ where $$B4 = \frac{B}{4}$$

$$C = 256a^3e - 64a^2 bd + 16ab^2 c - 3 b^4$$

Then:

$$P = 64$$

$$Q = 32(A2)(2) = 64A2$$

$$R = 4(A2)(2)(A2)(2) - 16C = 16A2^2 - 16C$$

$$S = -(B4)(4)(B4)(4) = -16 B4^2$$

Divide all 4 coefficients by $$16:$$

$$P = 4$$

$$Q = 4A2$$

$$R = A2^2 - C$$

$$S = -B4^2$$

$$V = v^2 = -(A2 + U) - \frac{B4}{u}.$$

A close examination of coefficients $$R, S$$ shows that both coefficients are always exactly divisible by $$4.$$

Therefore, all four coefficients may be defined as follows:

$$P = 1$$

$$Q = A2$$

$$R = \frac{A2^2 - C}{4}$$

$$S = \frac{-B4^2}{4}$$

=Solving quartic equation=

This section presents 4 examples that show how to use the depressed quartic and the resolvent cubic to solve the quartic equation.

Four real roots
Calculate roots of: $$y = f(x) = x^4 - x^3 - 19x^2 - 11x + 30$$

Calculate coefficients of depressed quartic:

Calculate coefficients of resolvent cubic:

Calculate roots of cubic function: $$y = g(x) = 64x^3 - 9920x^2 + 277696x - 1742400.$$

There are 3 real, positive roots: $$9, 25, 121.$$

Using 3 roots of $$g(x),$$ calculate 4 roots of $$f(x):$$

Roots of $$f(x)$$ are: $$5, 1, -2, -3.$$

All 3 values of $$U$$ produce the same results, but not in same sequence.

It is not necessary to calculate all 3 roots of resolvent cubic. Any one non-zero root is sufficient to do the job.

Example 1
Calculate roots of: $$y = f(x) = x^4 + 2x^3 + 18x^2 - 70x - 87$$

Calculate coefficients of depressed quartic:

Calculate coefficients of resolvent cubic:

Calculate one real root of cubic function: $$y = g(x) = 64x^3 + 8448x^2 + 474112x -31002624.$$

$$36$$ is one real root. Choose $$U = 36.$$

Calculate roots of $$f(x):$$

Example 2
Calculate roots of: $$y = f(x)$$ $$= 3x^4 - 6x^3 - 41x^2 +44x - 189$$

Calculate coefficients of depressed quartic:

Notice that coefficient $$B = 0.$$

Calculate coefficients of resolvent cubic:

Notice that coefficient $$S = 0.$$

Calculate roots of cubic function: $$y = g(x) = x^3 - 1092x^2 + 605376x + 0.$$

Roots are $$0, 546 \pm 554.3103823671355j.$$

Value $$0$$ cannot be used because it will cause error at statement.

Calculate roots of $$f(x):$$

Values of $$x$$ are: $$-3.7883225218763052, 4.788322521876306, 0.5 \pm 1.795283650280614j$$ $$$$$$$$

Depressed quartic as quadratic
In this example coefficient $$B$$ of depressed quartic $$= 0.$$

Therefore, resolvent cubic can be ignored and depressed quartic processed as quadratic in $$T = t^2.$$

$$t^4 - 2184t^2 + (0)t - 1229040$$

$$T^2 - 2184T - 1229040$$ where $$T = t^2.$$

Solutions of this quadratic are: $$T_1, T_2 = 2648.1182474349434, -464.11824743494344$$

or

With precision of 15, values of $$x$$ are same as those shown above.

When roots of quartic function are of form coefficient $$B$$ of depressed function $$= 0.$$

Four complex roots
Calculate roots of: $$y = f(x) = x^4 - 20x^3 + 408x^2 + 2296x + 18020$$

Calculate coefficients of depressed quartic:

Calculate coefficients of resolvent cubic:

Calculate one root of cubic function: $$y = g(x) = 64x^3 + 132096x^2 - 86769664x - 118380036096.$$

There are 3 real roots: $$-2304, -784, 1024.$$ Choose $$U = -784.$$

Negative $$U$$ is chosen here to show that any 1 of the roots produces the correct result.

Calculate roots of $$f(x):$$

=Quartic formula= The substitutions made above can be used to produce a formula for the solution of the quartic equation.

See main articles "The general case" or "General formula for roots."

Both links above point to formula for equation $$x^4 + ax^3 + bx^2 + cx + d = 0.$$

Given quartic equation: $$ax^4 + bx^3 + cx^2 + dx + e = 0,$$ calculate the 4 values of $$x.$$

$$x = \frac{-b + t}{4a}$$ where:

Coefficients of depressed quartic:

$$A = 16ac - 6b^2$$

$$B = 64a^2 d - 32abc + 8b^3$$

$$C = 256a^3e - 64a^2 bd + 16ab^2 c - 3 b^4$$

Coefficients of resolvent cubic:

$$a_1 = P = 64$$

$$b_1 = Q = 32A$$

$$c_1 = R = 4A^2 - 16C$$

$$d_1 = S = -B^2$$

Coefficients of depressed cubic:

$$A_1 = 9a_1 c_1 - 3b_1^2$$

$$B_1 = 27a_1^2d_1 - 9a_1b_1c_1 + 2b_1^3$$

One root of resolvent cubic:

$$C_1 = \frac{-A_1}{3} = b_1^2 - 3a_1 c_1$$

$$\Delta = B_1^2 - 4C_1^3\ \dots\dots\ \Delta$$ may be negative.

$$\delta = \sqrt{\Delta}$$

$$W = \frac{-B_1 + \delta}{2}$$

$$w = \sqrt[3]{W}$$

$$t_1 = w + \frac{C_1}{w}$$

$$U = \frac{-b_1 + t_1}{3a_1}$$

One root of quartic:

$$u = \sqrt{U}\ \dots\dots\ u$$ may be positive or negative.

$$V = -(\frac{A}{2} + U) - \frac{B}{4u}$$

$$v = \sqrt{V}\ \dots\dots\ v$$ may be positive or negative.

$$t = u + v$$

Formula above produces one value of $$x.$$ Python code below utilizes $$\pm \sqrt{U}$$ and $$\pm \sqrt{V}$$ to produce 4 values of $$t$$ and then, four values of $$x.$$

An example:
Calculate roots of $$f(x) = 4x^4 + 4x^3 - 75x^2 - 776x - 1869.$$

Because $$f(t)$$ is a depressed quartic function, sum of four  $$= 116 - 44 - 36(2) = 0.$$

In python the imaginary part of a complex number is shown with $$j$$ instead of $$i.$$

If $$A == B == C == 0,\ f(x)$$ contains 4 equal roots and $$x = \frac{-b}{4a}.$$

If $$f(x)$$ contains 3 or more equal roots, statement  fails with divisor $$w = 0.$$

Before using this formula, check for equal roots as in "Exactly 3 equal roots" above.

Values displayed above have been edited slightly. Actual calculated values were:

In practice
The following Python code implements the quartic formula. However, under statement there is code that processes the depressed quartic as a quadratic in $$T = t^2.$$ This ensures that execution of formula does not fail with error at statement

For function  see  Cubic_function: In_practice.

Examples
Python function  below implements   as presented under Equal roots above. When description contains note $$B4 = 0,$$ depressed quartic was processed as quadratic in $$t^2.$$

=Two Conic Sections=

Examples of conic sections include: ellipse, circle, parabola and hyperbola.

This section presents examples of two conic sections, circle and ellipse, and how to calculate the coordinates of the point/s of intersection, if any, of the two sections.

Let one section with name $$ABCDEF$$ have equation $$Ax^2 + By^2 + Cxy + Dx + Ey + F = 0.$$

Let other section with name $$abcdef$$ have equation $$ax^2 + by^2 + cxy + dx + ey + f = 0.$$

Because there can be as many as 4 points of intersection, a special "resolvent" quartic function is used to calculate the $$x$$ coordinates of the point/s of intersection.

Coefficients of associated "resolvent" quartic are calculated as follows:

With no common point


Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 6.8x - 17.6y + 80 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = -x^4 - 16.4x^3 - 432.98x^2 + 6850.532x - 22836.7009.$$

$$f(x)$$ has no real roots. Therefore, there is no point of intersection.

With one common point
Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 6.8x - 17.6y + 73 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = -x^4 - 16.4x^3 - 432.84x^2 + 7456.48x - 24355.36.$$

Roots of $$f(x)$$ are: $$(-14-22.978250586152114j), (-14+22.978250586152114j), 5.8, 5.8.$$

$$f(x)$$ has 2 equal, real roots at $$x = 5.8,$$ effectively 1 real root where $$x = 5.8$$

Therefore, there is one point of intersection where $$x = 5.8.$$

Example 1
Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 6.8x - 17.6y + 64 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = -x^4 - 16.4x^3 - 432.66x^2 + 8235.556x - 26681.1841.$$

Roots of $$f(x)$$ are: $$(-14.361578825892241-23.341853011785357j),$$ $$(-14.361578825892241+23.341853011785357j),$$ $$4.59885619413921, 7.72430145764527.$$

$$f(x)$$ has 2 unique, real roots at $$x = 4.59885619413921, 7.72430145764527.$$

Therefore, there are two points of intersections where $$x = 4.59885619413921, 7.72430145764527.$$

Example 2
Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 18.8x - 1.6y + 53 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = -x^4 + 37.6x^3 - 504.24x^2 + 2835.04x - 5685.16.$$

Roots of $$f(x)$$ are:$$5.8, 5.8, 13, 13.$$

$$f(x)$$ has 2 pairs of equal roots at $$x = 5.8, 13,$$ effectively 2 real roots.

Therefore, there are two points of intersection where $$x = 5.8, 13.$$

With 3 common points
Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 17.6x - 3.2y + 55 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = x^4 - 32.2x^3 + 366.69x^2 - 1784.428x + 3165.1876.$$

Roots of $$f(x)$$ are:$$5.8, 5.8, 6.83589838486224, 13.7641016151377 .$$

$$f(x)$$ has 1 pair of equal roots at $$x = 5.8$$ and 2 unique, real roots at $$x = 6.83589838486224, 13.7641016151377,$$ effectively 3 real roots.

Therefore, there are three points of intersection where $$x = 5.8, 6.83589838486224, 13.7641016151377.$$

With 4 common points
Let ellipse (red curve) have equation:$$1.89x^2 + 1.61y^2 + 0.96xy - 36.3x - 11.6y + 130.25 = 0.$$

Let circle (blue curve) have equation:$$x^2 + y^2 - 18.8x - 1.6y + 62.99 = 0.$$

Then, resolvent quartic function (black curve) has equation:

$$y = f(x) = -x^4 + 37.6x^3 - 504.4398x^2 + 2838.79624x - 5544.61147921.$$

Roots of $$f(x)$$ are:$$4.36661032156283, 8.77936456353008, 10.0206354364699, 14.4333896784371.$$

$$f(x)$$ has 4 real roots as shown above.

Therefore, there are four points of intersection where $$x = 4.36661032156283, 8.77936456353008, 10.0206354364699, 14.4333896784371.$$

=Links to related topics=

"Cubic formula"

"Complex square root"