In
Section 2.1 we used extraction of roots to solve equations of the form
\begin{equation*}
a( px + q)^2 + r = 0
\end{equation*}
where the left side of the equation includes the square of a binomial, or a perfect square. We can write any quadratic equation in this form by completing the square.
Consider the following squares of binomials.
In each case, the square of the binomial is a quadratic trinomial,
\begin{equation*}
(x + p)^2= x^2 + 2px + p^2
\end{equation*}
Note that the coefficient of the linear term, \(2p\text{,}\) is twice the constant in the binomial, and the constant term of the trinomial, \(p^2\text{,}\) is its square.
We would like to reverse the process and write a quadratic expression as the square of a binomial. For example, what constant term can we add to
\begin{equation*}
x^2 - 16x
\end{equation*}
to produce a perfect square trinomial? Compare the expression to the formula above:
\begin{equation*}
\begin{alignedat}{4}
x^2 \amp {}+{} \amp 2px \amp {}+{} \amp p^2 \amp {}={} \amp (x + p)^2 \\
x^2 \amp {}-{} \amp 16x \amp {}+{} \amp \text{?} \amp {}={} \amp (x + \text{?})^2 \\
\end{alignedat}
\end{equation*}
We see that
\begin{equation*}
2p = -16,~~\text{ so }~~p = \frac{1}{2}(-16) = \alert{-8}
\end{equation*}
and
\begin{equation*}
p^2 = (-8)^2 = \alert{64}
\end{equation*}
We substitute these values for \(p^2\) and \(p\) into the equation to find
\begin{equation*}
x^2 - 16x + \alert{64} = (x \alert{-8})^2
\end{equation*}
Notice that in the resulting trinomial, the constant term is equal to the square of one-half the coefficient of \(x\text{.}\) In other words, we can find the constant term by taking one-half the coefficient of \(x\) and then squaring the result. Adding a constant term obtained in this way is called completing the square.