%====================================================================
% This is a LaTeX-2e document
%====================================================================

%\documentclass[12pt]{amsart}
\documentclass[12pt]{article}
\parindent=0pt \parskip=8pt

\usepackage{verbatim}
\usepackage{fullpage}

\usepackage{amssymb,amsmath,amsthm}
\usepackage[mathscr]{eucal}

\usepackage{makeidx}
\input{../tex/isomath}
\input{../tex/mathenv}

\makeindex

%--------------------------------------------------------------------
\begin{document}
\title{The cubic formula}
%\author{John Kerl $\cdot$ Math 110, section 10 $\cdot$ Fall 2005}
\author{John Kerl}
\date{January, 2006}
\maketitle

In college algebra we make frequent use of the quadratic formula.  Namely, if
$$
	f(x) = ax^2 + bx + c,
$$
then the zeroes of $f(x)$ are
$$
	x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}.
$$
This formula can be derived by completing the square.  Note that if $b^2-4ac$
(what we call the \emph{discriminant}) is negative, then the quadratic
polynomial $f(x)$ has two complex roots.  Otherwise, you get two real roots,
and in this case you don't need to know anything about complex numbers.

It is shown in upper-division math that any degree-$n$ polynomial with rational
(or real, or complex) coefficients has $n$ complex roots.  (This fact is called
the \emph{fundamental theorem of algebra}.)  So, if we have a quadratic formula
for finding both (possibly complex) roots of a quadratic (degree-2) polynomial,
then it's natural to ask for a formula for all three roots of a cubic.
Likewise, we would like a formula for all four roots of a quartic, and so on.
It can be proved (the terms are \emph{Galois theory} and \emph{solvable
groups}), that there \emph{cannot} exist a general formula for degree 5 and
above.

Here is a presentation of the cubic formula, adapted from Grove's
\emph{Algebra}.  Note the following:

\begin{itemize}
\item It turns out that deriving this formula takes a bit more work.
	Details are on pages 278-279 of the reference provided below.
\item The formula uses complex numbers.  Even if the cubic polynomial has three
	real roots, some intermediate numbers in the formula are complex.
\item To use the quadratic formula, you just plug in your coefficients.
	The cubic formula, by contrast, comes in separate steps.
\item These days, it's probably easier to just do graphical root-finding using
	your calculator.  However, it's interesting to see what people did in the
	old days.  (The cubic formula was discovered in Renaissance Italy --- for
	example, search Wikipedia for Nicolo Tartaglia or Scipio del Ferro).
\end{itemize}

This formula works for any cubic.  At each step of the general procedure, I'll
also do that step for a particular example cubic polynomial.

\textbf{Step 1.}  Divide the cubic polynomial by its leading coefficient.
For example, if you have
$$
	2x^3 + 18x^2 + 36x - 56,
$$
then divide by the leading 2 to obtain
$$
	x^3 + 9x^2 + 18x - 28.
$$
Now you have something of the form
$$
	f(x) = x^3 + ax^2 + bx + c.
$$

\textbf{Step 2.}  It turns out that it is desirable to get rid of one of the
coefficients.  To accomplish this, substitute
$$
	x = y - a/3
$$
into $f(x)$ and call the result $g(y)$.  For example, using $f(x)$ as above,
$a=9$ so $a/3=3$.
\begin{eqnarray*}
	f(x) &=& x^3 + 9x^2 + 18x - 28 \\
	g(y) = f(y-3) &=& (y-3)^3 + 9(y-3)^2 + 18(y-3) - 28 \\
	&=& y^3 - 9y^2 + 27y - 27 + 9(y^2-6y + 9) + 18y-54 - 28 \\
	&=& y^3 - 9y^2 + 27y - 27 + 9y^2 - 54y + 81 + 18y-54 - 28 \\
	&=& y^3 - 9y^2 + 9y^2 + 27y - 54y + 18y - 27 + 81 - 54 - 28 \\
	&=& y^3 - 9y - 28.
\end{eqnarray*}

\textbf{Step 3.}  Now that we've eliminated the quadratic term, we have
something of the form
$$
	g(y) = x^3 + py + q.
$$
The next step is computing the discriminant of $g(y)$.  All polynomials have
discriminants, but it's particularly easy to compute now that we have only two
coefficients, $p$ and $q$.  This is
$$
	D = -4p^3 - 27q^2.
$$
In our example, since we have $g(y) = x^3-9y-28$, we have $p=-9$ and $q=-28$.
So
\begin{eqnarray*}
	D &=& -4p^3 - 27q^2 \\
	&=& -4(-9)^3 - 27(-28)^2 \\
	&=& -18252.
\end{eqnarray*}

\textbf{Step 4.}  Below we'll need the numbers
$$
	-q/2 \qquad \textrm{and} \qquad \sqrt{\frac{-D}{108}}\,,
$$
so let's go ahead and compute them now.  In our example, these are
$$
	-q/2 = 14
	\qquad \textrm{and} \qquad
	\sqrt{\frac{-D}{108}} =
	\sqrt{\frac{18252}{108}} =
	\sqrt{169} =
	13.
$$

\textbf{Step 5.}  Here is the formula for the three roots of the cubic $g(y)$:
\begin{eqnarray*}
	y_1 &=& u_1 + v_1 \\
	y_2 &=& \omega u_1 + \omega^2 v_1 \\
	y_3 &=& \omega^2 u_1 + \omega v_1.
\end{eqnarray*}
We need to know what $u_1$, $v_1$, $\omega$, and $\omega^2$ are.  First,
$\omega$ and $\omega^2$ are constants:
\begin{eqnarray*}
	\omega &=& \frac{-1+i\sqrt3}{2}\\
	\omega^2 &=& \frac{-1-i\sqrt3}{2}\\
\end{eqnarray*}
(Side note:  $\omega$, $\omega^2$, and $1$ are the three complex numbers whose
cube is 1.  Try FOILing out the product $\omega \cdot \omega^2$.)  Also,
\begin{eqnarray*}
	u_1 &=& \sqrt[3]{-q/2 + \sqrt{-D/108}},\\
	v_1 &=& \sqrt[3]{-q/2 - \sqrt{-D/108}}.
\end{eqnarray*}

In our example, we have
\begin{eqnarray*}
	u_1 &=& \sqrt[3]{14 + 13}
	= \sqrt[3]{27}
	= 3; \\
	v_1 &=& \sqrt[3]{14 - 13}
	= \sqrt[3]{1}
	= 1.
\end{eqnarray*}
So the first root is
\begin{eqnarray*}
	y_1 &=& 3+1 = 4.
\end{eqnarray*}
The second root is
\begin{eqnarray*}
	y_2 &=& 3 \left(\frac{-1+i\sqrt3}{2}\right) +
		\left(\frac{-1-i\sqrt3}{2}\right) \\
	&=& \left(\frac{-3+3i\sqrt3}{2}\right) +
		\left(\frac{-1-i\sqrt3}{2}\right) \\
	&=& \frac{1}{2} \left(-3+3i\sqrt3 - 1 - i\sqrt3\right) \\
	&=& \frac{1}{2} \left(-3-1 +3i\sqrt3 - i\sqrt3\right) \\
	&=& \frac{1}{2} \left(-4 +2i\sqrt3 \right) \\
	&=& -2 +i\sqrt3.
\end{eqnarray*}
The third root is
\begin{eqnarray*}
	y_3 &=& 3 \left(\frac{-1-i\sqrt3}{2}\right) +
		\left(\frac{-1+i\sqrt3}{2}\right) \\
	&=& \left(\frac{-3-3i\sqrt3}{2}\right) +
		\left(\frac{-1+i\sqrt3}{2}\right) \\
	&=& \frac{1}{2} \left(-3-3i\sqrt3 - 1 + i\sqrt3\right) \\
	&=& \frac{1}{2} \left(-3-1 -3i\sqrt3 + i\sqrt3\right) \\
	&=& \frac{1}{2} \left(-4 -2i\sqrt3 \right) \\
	&=& -2 -i\sqrt3.
\end{eqnarray*}

\textbf{Step 6.}  We just found the roots of $g(y)$.  To finish up, we need to
undo the change of variable
$$
	x = y - a/3.
$$

In our example, we found
$$
	y = 4, \quad -2+i\sqrt3, \quad\textrm{and}\quad -2-i\sqrt3.
$$
Since $a/3$ was 3, we have, for the original polynomial
$$
	2x^3 + 18x^2 + 36x - 56,
$$
the three roots
$$
	x = 1, \quad -5+i\sqrt3, \quad\textrm{and}\quad -5-i\sqrt3.
$$

%% ----------------------------------------------------------------
\textbf{Reference}

L.C.~Grove, \emph{Algebra}, Dover, 2004.

\end{document}
