Solving Cubic Equations

Previously, we concluded the previous post with a simple question: how do we solve the cubic equation below?

ax^3 + bx^2 + cx + d = 0

Definition 1. Given real number constants a,b,c,d with a \neq 0, we call the graph y = ax^3 + bx^2 + cx + d a cubic graph.

Using ideas in undergraduate mathematics, we can show that every cubic graph must have at least one real root.

Lemma 1. Given constants a,b,c,d with a \neq 0, suppose for any x we have

ax^3 + bx^2 + cx + d = 0.

Then a=b=c=d=0.

Proof. To illustrate the proof, observe that setting x = 0 yields d = 0, so that

ax^3 + bx^2 + cx = 0.

For nonzero x, we must have ax^2 + bx + c = 0. Since this equation holds for any x except 0, using the notion of limits in calculus, we are allowed to set x = 0 to deduce c = 0. Repeat the procedure to deduce that a = b = 0 as well.

A more complete proof uses some linear algebra; namely the standard basis of polynomial space.

Now consider the cubic graph y = ax^3 + bx^2 + cx + d. We observe that for any r,

s := ar^3 + br^2 + cr + d

is a uniquely defined real number. Since can write s purely in terms of r, we make the notation s = f(r), where

f(x) = ax^3 + bx^2 + cx + d.

We call f a polynomial function, properly defined using discrete mathematics. In the case above, we say that f is a cubic function. In fact, the analogous function

f(x) = ax^2 + bx + c

is called the quadratic function. The function f(x) = ax+b is called a linear function, since f(x) grows linearly in the following sense:

\begin{aligned} f(x+k) &= a(x+k) + b \\ &= ax + b + ak \\ &= f(x) + ak. \end{aligned}

Similarly the function f(x) = a is called a constant function, since no matter what input number x we plug in, the output is a constant number a.

Lemma 2. For any real number k and n = 2, 3, (x - k) is a factor of (x^n - k^n).

Proof. For the case n = 2, we use the difference of squares property:

x^2 - k^2 = (x-k)(x+k).

Thus, (x-k) is a factor of (x^2 - k^2). For the case n = 3, we seek constants p, q such that

x^3 - k^3 = (x-k)(x^2 + px + q).

On the right-hand side,

\begin{aligned} (x-k)(x^2 + px + q) &= x(x^2 + px + q) - k(x^2 + px + q) \\ &= (x^3 + px^2 + qx) - (kx^2 + kpx + kq) \\ &= x^3 + (p-k)x^2 + (q-kp)x - kq \end{aligned}

In order for the right-hand side to equal (x^3 - k^3), we must stipulate p-k = 0 \iff p = k and

q - kp = 0 \quad \iff \quad q = kp = k^2.

Using these stipulations,

\begin{aligned} (x-k)(x^2 + kx + k^2) &= x^3 + (k-k)x^2 + (k^2-k \cdot k)x - k \cdot k^2 \\ &= x^3 - k^3, \end{aligned}

as required.

Theorem 1. For any cubic function, (x-k) is a factor of f(x) - f(k).

Proof. Expanding f(x) - f(k) yields

\begin{aligned} f(x) - f(k) &= (ax^3 + bx^2 + cx + d) - (ak^3 + bk^2 + ck + d) \\ &= a(x^3 - k^3) + b(x^2 - k^2) + c(x-k). \end{aligned}

By Lemma 2, since (x-k) is a factor of both (x^2 - k^2) and (x^3 - k^3), there exist polynomials g(x), h(x) such that

\begin{aligned} f(x) - f(k) &= a  \cdot (x-k) \cdot g(x)+ b\cdot (x-k)  \cdot h(x) + c(x-k) \\ &= (x-k) \cdot (a \cdot g(x)+ b \cdot h(x)  + c). \end{aligned}

Since a \cdot g(x) + b \cdot h(x) + c is a polynomial, we have that (x-k) is a factor of (f(x) - f(k)).

Remark 1. The result of Theorem 1 still holds for polynomials whose highest power is larger than 3. Details here.

Lemma 3. Given any linear, quadratic, or cubic function f and real number k, there exists a unique polynomial g and a unique real number r such that

f(x) = (x-k) \cdot g(x) + r.

We call r the remainder of f after dividing by (x-k).

Proof. See Problem 3 in this post.

Theorem 2. Given any linear, quadratic, or cubic function f, the remainder of f after dividing by (x-k) is f(k). Furthermore, k is a root of f if and only if (x-k) is a factor of f(x).

Proof. By Theorem 1, (x-k) is a factor of f(x) - f(k). Hence, there exists a polynomial g such that

f(x) - f(k) = (x-k) \cdot g(x)\quad \iff \quad f(x) = (x-k) \cdot g(x) + f(k).

By Lemma 3, since g and f(k) are unique, f(k) is the remainder of f after dividing by (x-k) is f(k). Furthermore, (x-k) is a factor of f(x) if and only if f(k) = 0, which holds if and only if k is a root of f.

Remark 2. The first result is called the remainder theorem, while the second result is called the factor theorem. Furthermore, this result holds for polynomials whose highest power of x (i.e. degree) is larger than 3.

Example 1. Show that the equation x^3 - 6x^2 + 11x - 6 = 0 has one solution given by x = 1. Hence, solve the equation completely.

Solution. Define the function f(x) = x^3 - 6x^2 + 11x - 6. We first observe that

\begin{aligned} f(1) &= 1^3 - 6 \cdot 1^2 + 11 \cdot 1 - 6  \\ &= 1 - 6 + 11 - 6 \\ &= 0. \end{aligned}

Therefore, 1 is a root of f. By the factor theorem, (x-1) is a factor of f(x). Therefore, there exist real numbers p, q such that

x^3 - 6x^2 + 11x - 6 = (x-1)(x^2 + px + q).

Expanding the right-hand side,

\begin{aligned} x^3 - 6x^2 + 11x - 6 &= (x-1)(x^2 + px + q) \\ &= (x^3 + px^2 + qx) - (x^2 + px + q) \\ &= x^3 + (p-1)x^2 + (q-p)x - q.  \end{aligned}

Comparing the coefficients of x^2 and 1 respectively,

p-1 = -6 \quad \Rightarrow \quad p = -5,

and q = 6. Therefore,

x^3 - 6x^2 + 11x - 6 = (x-1)(x^2 - 5x + 6).

To solve the equation, we set the left-hand side equal to 0:

(x-1)(x^2 - 5x + 6) = 0.

Therefore, x-1 = 0 or x^2 - 5x + 6 = 0. In the former, x = 1. In the latter, we use the quadratic equation:

\displaystyle x = \frac{ -(-5) \pm \sqrt{(-5)^2 - 4 \cdot 1 \cdot 6} }{ 2 \cdot 1} = \frac{5 \pm 1}{2}.

Therefore, x = 2 or x = 3. Therefore, the equation

x^3 - 6x^2 + 11x - 6 = 0

has three solutions, namely: x = 1, 2, 3.

In particular, we can, somewhat reasonably, solve all cubic equations.

Theorem 3. Given real constants a,b,c,d and a \neq 0, there exists real constants x_0, p, q such that equation

ax^3 + bx^2 + cx + d = (x - x_0)(ax^2 + px + q).

Proof. Define f(x) = ax^3 + bx^2 + cx + d. Using the intermediate value theorem in calculus and real analysis, we can show that x_0 must be a root of f. By the factor theorem, (x-x_0) is a factor of f. Hence, the factorisation holds.

Remark 3. For a more systematic approach to solve cubic equations, i.e. some kind of cubic formula, we need to use complex numbers.

Corollary 1. Every cubic equation has either one real solution, two real solutions, or three real solutions.

Example 2. Determine the (possibly complex) 3rd roots of unity—the solutions to the equation z^3 = 1.

Solution. Rather obviously, z = 1 is a solution of the equation z^3 - 1 = 0. By the factor theorem, (z-1) is a factor of (z^3 - 1). Hence, there exist real constants p, q such that

\begin{aligned} z^3 - 1 &= (z-1)(z^2 + pz + q) \\ &= z^3 + (p-1)z^2 + (q-1)z - q. \end{aligned}

Comparing coefficients, p = q = 1, so that

z^3 - 1 = (z-1)(z^2 + z + 1).

To solve the equation z^2 + z + 1 = 0, we use the quadratic formula:

\displaystyle z = \frac{ -1 \pm \sqrt{1^2 - 4 \cdot 1 \cdot 1} }{ 2 \cdot 1 } = \frac{ - 1 \pm \sqrt {-3} }{ 2 } = \textstyle \frac 12 (-1 \pm i\sqrt 3).

Therefore, z = 1, \frac 12 (-1 + i\sqrt 3), \frac 12 (-1 - i\sqrt 3).

Remark 4. Defining the primitive cube root of 1 by \zeta_3 := \frac 12 (-1 + i\sqrt 3), we can show that

\zeta_3^2 = \frac 12 (-1 - i\sqrt 3),\quad  \zeta_3^3 = 1.

This idea is leveraged in the mathematical study called Galois theory, and more broadly, abstract algebra. We call the set \{ 1, \zeta_3 , \zeta_3^2 \} a cyclic group under multiplication, and thus Abelian, since

\{ 1, \zeta_3 , \zeta_3^2 \} = \{ \zeta_3^n : n \in \mathbb Z \}.

We can establish this connection using some basic divisibility ideas in introductory number theory.

We could experiment with polynomials of higher degrees, but it turns out that we can’t do better than a degree-four polynomial, by an advanced result known as the Abel–Ruffini theorem.

What is for sure is that for any degree-n polynomial, we must have n complex roots—this is called the fundamental theorem of algebra. By the intermediate value theorem again, if n is odd, we are guaranteed at least one real root.

All’s to say this: making sense of polynomials with higher powers is really, really hard. We won’t be able to do it much justice in our current discussion, but that’s okay. Let’s start small.

We leave it as an exercise to verify the following algebraic expansions are correct:

\begin{aligned} (1+x)^1 &= 1+x, \\ (1+x)^2 &= 1 + 2x + x^2, \\ (1+x)^3 &= 1 + 3x + 3x^2 + x^3, \\ (1+x)^4 &= 1 + 4x + 6x^2 + 4x^3 + x^4. \end{aligned}

How do we expand the binomial (1+x)^5? We explore the answer to this question when discussing the binomial theorem.

—Joel Kindiak, 27 Oct 25, 1214H

Published by


Leave a comment