Quartic equation solution

This calculator produces quartic equation solution using resolvent cubic.

This page exists due to the efforts of the following people:

Anton

Timur

Timur

Created: 2018-02-13 14:43:18, Last updated: 2021-02-28 16:18:07
Creative Commons Attribution/Share-Alike License 3.0 (Unported)

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/7715/. Also, please do not modify any references to the original work (if any) contained in this content.

The calculator below solves quartic equations with a single variable. A quartic equation formula:  ax^4+bx^3+cx^2+dx+e=0, where a,b,c,d,e - coefficients, and x is unknown. The equation solution gives four real or complex roots. The formulas to solve a quartic equation follow the calculator.

PLANETCALC, Quartic equation

Quartic equation

Digits after the decimal point: 2
x1
 
x2
 
x3
 
x4
 

As a first step we divide all the quartic coefficients by a to obtain the equation:
x^4+a_3x^3+a_2x^2+a_1x+a_0=0
Next we solve the resolvent cubic:
u^3-a_2u^2+(a_1a_3-4a_0)u-(a_1^2+a_0a_3^2-4a_0a_2)=0
We can solve it with the method described here: Cubic equation.
A single real root u1 of this equation we'll use further for quadratic equation roots finding. If the cubic resolvent has more than one real roots, we must choose a single u1 root in the way that gives real p and q coefficients in the formulas:
p_{1,2}=\frac{a_3}{2}\pm\sqrt{\frac{a_3^2}{4}+u_1-a_2} 
q_{1,2}=\frac{u_1}{2}\pm\sqrt{\frac{u_1^2}{4}-a_0}
Then we substitute p1, p2,q1,q2, in quadratic equations in the right side of the following equation:
x^4+a_3x^3+a_2x^2+a_1x+a_0=(x^2+p_1x+q_1)(x^2+p_2x+q_2)1

Four roots of the two quadratic equations are the roots of original equation if the pi and qi signs are chosen to satisfy the following conditions:

# Condition
1 p_1+p_2=a_3
2 p_1p_2+q_1+q_2=a_2
3 p_1q_2+p_2q_1=a_1
4 q_1q_2=a_0

Actually, we may check only the third condition, and if it is not satisfied — swap q1 and q2.
The solution can be verified with the calculator: Complex polynomial value calculation


  1. M. Abramovitz and I. Stegun Handbook of Mathematical Functions With Formulas, Graphs and Mathematical Tables, 10th printing, Dec 1972, pp.17-18 

URL copied to clipboard
PLANETCALC, Quartic equation solution

Comments