Skip to main content

Section A.1 Completing the Square

An important algebraic technique is known as completing the square. For example, when trying to identify the shape of the curve satisfying

\begin{equation} x^2 - 6x + y^2 = 16\tag{A.1.1} \end{equation}

we can start by noticing the terms \(x^2+y^2\text{,}\) which suggests that this implicit equation might describe a circle. The equation for a circle involves the sum of squares, so we need to find a way to convert the terms \(x^2-6x\) into a perfect square. That is, we'd like to replace these terms by something of the form \((x-h)^2\text{.}\) Expanding, we have

\begin{equation} (x-h)^2 = x^2 - 2hx + h^2\tag{A.1.2} \end{equation}

so it is clear that we should set \(h=3\text{.}\) What about the missing term \(h^2=9\text{?}\) Take it from the constant term \(16\text{!}\) Explicitly, since

\begin{equation} (x-3)^2 = x^2 - 6x + 9\tag{A.1.3} \end{equation}

we have

\begin{equation} 16 = x^2 - 6x + y^2 = \bigl((x-3)^2 - 9\bigr) + y^2\tag{A.1.4} \end{equation}

or in other words

\begin{equation} (x-3)^2 + y^2 = 25\tag{A.1.5} \end{equation}

which is the equation of a circle of radius \(5\) centered at the point \((3,0)\text{.}\)

This example demonstrates the technique known as completing the square. Given an expression of the form

\begin{equation} Q = ax^2 + bx\tag{A.1.6} \end{equation}

we'd like to eliminate the linear term. Reasoning along similar lines as above, we have

\begin{align} Q \amp= a \left(x^2 + \frac{b}{a}x \right) = a \left( x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} - \frac{b^2}{4a^2} \right)\notag\\ \amp= a \left(x+\frac{b}{2a}\right)^2 - \frac{b^2}{4a}\tag{A.1.7} \end{align}

Completing the square is the technique used to prove the quadratic formula, as we can now verify. Starting from

\begin{equation} ax^2 + bx + c = 0\tag{A.1.8} \end{equation}

we immediately have

\begin{equation} a \left(x+\frac{b}{2a}\right)^2 - \frac{b^2}{4a} + c = 0\tag{A.1.9} \end{equation}

so that

\begin{equation} \left(x+\frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a} = \frac{b^2-4ac}{4a^2} .\tag{A.1.10} \end{equation}

Taking the square root of both sides and rearranging terms yields the quadratic formula in its standard form.