Cubic and quartic equations are polynomial equations of degree 3 and degree 4.
They can have real roots, complex roots, repeated roots, or a mixture of these.
The calculator uses rational-root testing when possible, then uses numerical complex root-finding to recover the full root set.
1. Standard forms
A cubic equation has the form:
\[
\begin{aligned}
a_3x^3+a_2x^2+a_1x+a_0&=0,
\qquad a_3\ne0.
\end{aligned}
\]
A quartic equation has the form:
\[
\begin{aligned}
a_4x^4+a_3x^3+a_2x^2+a_1x+a_0&=0,
\qquad a_4\ne0.
\end{aligned}
\]
A degree \(n\) polynomial has exactly \(n\) complex roots when multiplicity is counted.
Therefore, a cubic has 3 roots and a quartic has 4 roots in the complex plane.
2. Rational Root Theorem
When the polynomial has integer coefficients, the Rational Root Theorem gives a finite list of possible rational roots.
If a rational root exists, it must have the form \(p/q\), where \(p\) divides the constant term and \(q\) divides the leading coefficient.
\[
\begin{aligned}
p&\mid a_0,\\
q&\mid a_n,\\
x&=\frac{p}{q}.
\end{aligned}
\]
Each candidate is tested by substituting it into the polynomial. If \(P(r)=0\), then \(r\) is a root and \(x-r\) is a factor.
\[
\begin{aligned}
P(r)&=0
\quad\Longrightarrow\quad
P(x)=(x-r)Q(x).
\end{aligned}
\]
3. Example cubic
Solve:
\[
\begin{aligned}
x^3-6x^2+11x-6&=0.
\end{aligned}
\]
The possible rational roots are factors of 6:
\[
\begin{aligned}
\pm1,\quad \pm2,\quad \pm3,\quad \pm6.
\end{aligned}
\]
Testing \(x=1\), \(x=2\), and \(x=3\) gives zero:
\[
\begin{aligned}
P(1)&=1-6+11-6=0,\\
P(2)&=8-24+22-6=0,\\
P(3)&=27-54+33-6=0.
\end{aligned}
\]
Therefore:
\[
\begin{aligned}
x^3-6x^2+11x-6
&=(x-1)(x-2)(x-3).
\end{aligned}
\]
The roots are:
\[
\begin{aligned}
\boxed{x=1,\quad x=2,\quad x=3}.
\end{aligned}
\]
4. Depressed cubic
A general cubic can be simplified by shifting the variable to remove the quadratic term.
Start with:
\[
\begin{aligned}
ax^3+bx^2+cx+d&=0.
\end{aligned}
\]
Use the substitution:
\[
\begin{aligned}
x&=y-\frac{b}{3a}.
\end{aligned}
\]
This gives the depressed cubic:
\[
\begin{aligned}
y^3+py+q&=0,
\end{aligned}
\]
where:
\[
\begin{aligned}
p&=\frac{3ac-b^2}{3a^2},\\
q&=\frac{27a^2d-9abc+2b^3}{27a^3}.
\end{aligned}
\]
This form is useful because it removes the \(y^2\) term and makes analytic or numerical treatment easier.
5. Depressed quartic
A general quartic can also be shifted to remove the cubic term.
Start with:
\[
\begin{aligned}
ax^4+bx^3+cx^2+dx+e&=0.
\end{aligned}
\]
Use the substitution:
\[
\begin{aligned}
x&=y-\frac{b}{4a}.
\end{aligned}
\]
This gives the depressed quartic:
\[
\begin{aligned}
y^4+py^2+qy+r&=0,
\end{aligned}
\]
where:
\[
\begin{aligned}
p&=\frac{8ac-3b^2}{8a^2},\\
q&=\frac{b^3-4abc+8a^2d}{8a^3},\\
r&=\frac{-3b^4+16ab^2c-64a^2bd+256a^3e}{256a^4}.
\end{aligned}
\]
6. Numerical complex root-finding
Many cubic and quartic equations do not factor nicely over the rational numbers.
In those cases, numerical methods approximate the roots.
The calculator uses a simultaneous complex root method so it can return real roots and complex roots together.
\[
\begin{aligned}
z_k^{\text{new}}
&=
z_k-
\frac{P(z_k)}
{\prod_{j\ne k}(z_k-z_j)}.
\end{aligned}
\]
Here, \(z_k\) is one current complex root estimate. The method repeatedly improves all estimates until the values
of \(P(z_k)\) become very close to zero.
7. Real roots and the graph
A real root appears on the graph as an x-intercept. Complex roots do not appear as x-intercepts on the real
\(x\)-\(y\) graph, but they are still valid roots of the polynomial in the complex plane.
\[
\begin{aligned}
P(r)&=0
\quad\Longleftrightarrow\quad
(r,0)\text{ is an x-intercept, if }r\text{ is real.}
\end{aligned}
\]
Turning points come from the derivative:
\[
\begin{aligned}
P'(x)&=0.
\end{aligned}
\]
A cubic can have at most 2 turning points, while a quartic can have at most 3 turning points.
8. Repeated roots
If a factor appears more than once, the root has multiplicity greater than 1.
For example:
\[
\begin{aligned}
(x-2)^2(x+1)(x-4)&=0.
\end{aligned}
\]
The root \(x=2\) has multiplicity 2. Repeated roots often make the graph touch the x-axis or flatten near the root.
9. Formula summary
The table below uses plain text in formula cells to avoid raw LaTeX rendering problems in narrow layouts.
10. Common mistakes
- Forgetting to move all terms to one side before solving.
- Using the Rational Root Theorem when the coefficients are not integer coefficients.
- Assuming no rational roots means no roots at all. It only means there are no rational roots.
- Ignoring complex roots. Cubics and quartics always have all roots in the complex plane.
- Confusing real roots with turning points.
- Forgetting multiplicity when a root appears more than once.
Key idea: rational-root testing finds exact rational roots when available, while numerical complex root-finding completes the full root set.