 # Completing the Square

by | Aug 25, 2016 | Blog, Math Learning

# Completing the Square

by: HT Goodwill

### What Is Completing the Square?

Completing the Square is a technique in algebra that allows us to rewrite a quadratic expression that was in standard form:

$$ax^2 + bx + c$$

into vertex form:

$$a(x-h)^2 + k$$

### Why Do We Complete the Square?

It should be noted that many times, students think (are taught?) that completing the square is just a way to solve a quadratic equation that has the form:

$$ax^2 + bx + c = 0$$.

However, in other areas of mathematics, we sometimes need to express a quadratic in the vertex form.

### Leading up to How To

Suppose we have a perfect square binomial that we expand using FOIL:

\begin{align*} (x + B)^2 & = (x + B)(x + B)\\ & = x^2 + Bx + Bx + B^2\\ & = x^2 + 2Bx + B^2 \end{align*}

If we reverse this string of equations, we see that any quadratic that has this pattern: $$x^2 + 2Bx + B^2$$ which is a perfect square and we can factor it as $$(x + B)^2$$.

To Complete the Square, we adjust a quadratic expression so that it exhibits the perfect-square pattern. Here are some examples:

### Introductory Examples

Example 1: Complete the square on $$x^2 + 14x + 40$$

Match up the quadratic expression with the perfect square pattern, starting with the $$x^2$$ term.

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad x^2 + 2Bx + B^2\\ \mbox{Our Quadratic:} & \quad x^2 + 14x + 40 \end{align*}

Step 1: Matching The Quadratic Terms

The quadratic terms match since they have the same coefficient.

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad x^2 + 2Bx + B^2\\ \mbox{Our Quadratic:} & \quad x^2 + 14x + 40\\ \mbox{Match?} & \quad \end{align*}

Step 2: Matching the Linear Terms

The value of $$2B$$ is assigned be us and is whatever we need it to be so we can match the perfect-square pattern. In this example, they match, if we assign $$2B = 14$$.

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad x^2 + { 2B}x + B^2\\ \mbox{Our Quadratic:} & \quad x^2 + {14}x + 40\\ \mbox{Match?} & \quad \quad\quad \end{align*}

Step 3: Matching the Constant Term

In order to match the perfect square pattern, the constant term has to be equal to $$B^2$$. Since we defined $$2B = 14$$ in Step 2, we know that $$B = 7$$ which implies $$B^2 = 7^2 = 49$$.

To adjust our constant term, we add zero (which won’t change the value of anything) and choose to rewrite the zero as $$B^2 – B^2$$.

\begin{align*} x^2 + 14x + 40 & = x^2 + 14x + 0 + 40 &&\mbox{Adding } 0.\\ & = x^2 + 14x + { (49 – 49)} + 40 &&\mbox{Since } B^2 – B^2 = 49-49 = 0\\ & = x^2 + 14x + 49 – 49 + 40\\ & = (x^2 + 14x + 49) – 49 + 40&&\mbox{Regrouping} \end{align*}

Matching up to the pattern:

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad x^2 + 2Bx + B^2\\ \mbox{Our Quadratic:} & \quad (x^2 + 14x + 49) – 49 + 40\\ \mbox{Match?} & \quad \quad\quad \quad\quad \end{align*}

Since the first three terms (the ones in the parentheses) match the perfect-square pattern, we know those three terms will factor into $$(x+B)^2$$.

\begin{align*} (x^2 + 14x + 49)- 49 + 40 & = (x+7)^2 – 49 + 40\\ & = (x+7)^2 – 9 \end{align*}

Answer: $$x^2 + 14x + 40 = (x+7)^2 – 9$$

Example 2: Complete the square on $$x^2 – 9x + 3$$.

As before, we match up our quadratic with the perfect-square pattern. We’ll do this one a bit more quickly.

Step 1: Quadratic and Linear Terms

Both quadratic terms have a coefficient of $$1$$ so they already match. The linear terms will match if we assign $$2B = -9$$. So without any real work or effort, we match the first two terms already.

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad x^2 + 2Bx + B^2\\ \mbox{Our Quadratic:} & \quad x^2-9x + 3\\ \mbox{Match?} & \quad \quad\,\, \end{align*}

Step 2: Constant Term

Since we assigned $$2B = -9$$, we divide by 2 to get $$B = -\frac{9}{2}$$. And we know our constant term needs to be $$B^2 = \left(-\frac{9}{2}\right)^2 = \frac{81}{4}$$. and we introduce it the same way we did before, by adding zero.

\begin{align*} x^2 – 9x + 3 & = x^2 – 9x + 0 + 3 && \mbox{Adding }0\\ & = x^2 – 9x + \left(\frac{81}{4} – \frac{81}{4}\right) + 3 && \mbox{Since } B^2 – B^2 = \frac{81}{4}-\frac{81}{4} = 0\\ & = x^2 – 9x + \frac{81}{4} – \frac{81}{4} + 3\\ & = \left(x^2 – 9x + \frac{81}{4}\right) – \frac{81}{4} + 3 && \mbox{Regrouping} \end{align*}

Making sure we match the pattern, we have

\begin{align*} \mbox{Perfect-Square Pattern:} & \quad\quad x^2 + 2Bx + B^2\\ \mbox{Our Quadratic:} & \quad \left(x^2 + 14x + \frac{81}{4}\right) – \frac{81}{4} + 40\\ \mbox{Match?} & \quad\,\,\,\quad\quad\quad\quad \end{align*}

Since the three terms in the parentheses match the perfect-square pattern, we know those three terms factor as a perfect square.

\begin{align*} \overbrace{\left(x^2 – 9x + \frac{81}{4}\right)}^{\mbox{Perfect Square}\frac{81}{4} + 3 & = \overbrace{\left(x – \frac 9 2\right)^2}^{\mbox{Factored}} – \frac{81}{4} + \frac{12}{4}\\ & = \left(x – \frac{9}{2}\right)^2 – \frac{69}{4} \end{align*}

Answer: $$x^2 – 9x + 3 = \left(x – \frac{9}{2}\right)^2 – \frac{69}{4}$$

Example 3: Dealing With Leading Coefficients. Complete the square on $$2x^2 + 12x – 5$$.

Solution In order to complete the square, we first need to reduce the leading coefficient to 1.

Step 1: Factor out the leading coefficient out of the first two terms.

$$2x^2 + 12x – 5 = 2[x^2 + 6x] – 5$$

Â

Step 2: Complete the Square \textit{Inside the Braces}\vskip 2mm

Â

Â

\qquad Linear Term: \textit{Inside} the braces, we set $${\color{blue} 2B = 6}$$.\vskip 2mm

Â

A quick check and we see that we are matching the perfect-square pattern \textit{inside the braces}.

Â

\begin{align*}
\mbox{Perfect-Square Pattern:} & \quad\,\,\,\, x^2 + {\color{blue}2B}x + B^2\\
\end{align*}

Â

Let’s move on to the constant term.\vskip 2mm

Â

\qquad Constant Term: \textit{Inside} the braces we have $${\color{blue} 2B = 6}$$ which means $$B = 3$$ and so $${\color{red} B^2 = 3^2 = 9}$$. As before, adjust our constant term by adding {\color{red} 0}, but now it is \textit{inside the braces}.

Â

\begin{align*}
2[x^2 + {\color{blue} 6}x] – 5
& = 2[x^2 + {\color{blue} 6}x + {\color{red} 0}] – 5 && \mbox{Adding } {\color{red} 0} \mbox{ \textit{inside} the braces}\\
& = 2[x^2 + {\color{blue} 6}x + {\color{red} (9 – 9)}] – 5 && \mbox{Since } B^2 – B^2 = {\color{red} 9 – 9 = 0}\\
& = 2[x^2 + 6x + 9 – 9] – 5\\
& = 2[(x^2 + 6x + 9) – 9] – 5 && \mbox{Regrouping \textit{inside} the braces}
\end{align*}
\vskip 2mm

Â

Still keeping our attention focused \textit{inside} the braces, we check to see if we match the perfect-square pattern.

Â

\begin{align*}
\mbox{Perfect-Square Pattern:} & \quad x^2 + 2Bx + B^2\\
\mbox{Our Quadratic (Inside Braces):} & \quad 2[(x^2 + 6x + 9) – 9] – 5\\
\end{align*}

Â

Since the three terms inside the parentheses match the pattern, we know those three terms form a perfect square, so they will easily factor into $$(x + B)^2$$.

Â

\begin{align*}
2\big[{\color{blue}\overbrace{\left(x^2 + 6x + 9\right)}^{\mbox{Perfect Square}}} – 9\big] – 5
& = 2\big[{\color{blue}\overbrace{\left(x + 3\right)^2}^{\mbox{Factored}}} – 9\big] – 5
\end{align*}
\vskip 5mm

Â

Step 3: Adjusting the Final Form\vskip 2mm

Â

Start by multiplying the leading coefficient \textit{through the square braces} (NOT the parentheses!), and simplify.

Â

\begin{align*}%
{\color{blue} 2}\big[\left(x + 3\right)^2 – 9\big] – 5
& = \big[{\color{blue} 2}(x+3)^2 – {\color{blue} (2)} 9\big] – 5 && \mbox{Multiply through braces}\\
& = \big[2(x + 3)^2 – 18\big] – 5\\
& = 2(x + 3)^2 – 18 – 5 && \mbox{Braces no longer needed}\\
& = 2(x+3)^2 – 23 && \mbox{Combine the constants}
\end{align*}
\vskip 5mm

Â

\textbf{Answer:} $$2x^2 + 12x – 5 = 2(x+3)^2 – 23$$
\vskip 1.5cm

Â

\textbf{\large Quick Example}\vskip 2mm

Â

\textbf{Example 4: A Quick Example}\vskip 2mm

Â

Complete the Square on $$3x^2 – 4x + 8$$.\vskip 5mm

Â

\textbf{Solution:}\vskip 2mm

Â

\begin{align*}%
3x^2 – 4x + 8 & = 3\left[x^2 – \frac 4 3 x\right] + 8 && \mbox{Factor out leading coefficient}\6pt] & = 3\left[x^2 {\color{blue}- \frac 4 3} x\right] + 8 && \mbox{Identify } {\color{blue} 2B = -\frac 4 3} \longrightarrow {\color{red} B^2 = \left(-\frac 2 3\right)^2 = \frac 4 9}\\[6pt] & = 3\left[x^2 {\color{blue}- \frac 4 3} x + {\color{red} \left(\frac 4 9 – \frac 4 9\right)}\right] + 8 && \mbox{Add } {\color{red} 0}\\[6pt] & = 3\left[\left(x^2 {\color{blue}- \frac 4 3} x + {\color{red}\frac 4 9}\right)\,\,{\color{red}- \frac 4 9}\right] + 8 && \mbox{Regrouping}\\[6pt] & = 3\left[\left(x – \frac 2 3\right)^2 – \frac 4 9\right] + 8 && \mbox{Factor}\\[6pt] & = 3\left(x – \frac 2 3\right)^2 – \frac 4 3 + 8 && \mbox{Distribute}\\[6pt] & = 3\left(x – \frac 2 3\right)^2 – \frac 4 3 + \frac{24} 3\\[6pt] & = 3\left(x – \frac 2 3\right)^2 + \frac{20} 3 && \mbox{Combine like terms} \end{align*} \vskip 5mm Â \textbf{Answer:} $$3x^2 – 4x + 8 = 3\left(x – \frac 2 3\right)^2 + \frac{20} 3$$ \vskip 1.5cm Â \textbf{\large The Quick Method}\vskip 2mm Â The method shown in the examples can be made more efficient if we recognize that the pattern is always the same. For a simple quadratic with a leading coefficient of $$1$$, the completed square form looks like this: Â \begin{center} \begin{tikzpicture} % Help Lines % \draw [step=0.25cm,help lines] (-2,-1) grid (2,1); % \draw (-2,-1) grid (2,1); % Equation \node {% $$% x^2 + {\color{blue} 2B}x + c = (x + {\color{blue} B})^2 – {\color{blue} B^2} + c$$}; % Arrows \node (linear) [inner sep=0pt] at (-1.625,-0.15){}; \node (BLow) [inner sep=0pt] at (0.75, -0.15){}; \node (BUp) [inner sep=0pt] at (0.75, 0.2){}; \node (B2) [inner sep=0pt] at (1.75,0.2){}; \draw [-latex] (linear.south) to [out=270,in=270] (BLow.south); \draw [-latex] (BUp.north) to [out=90,in=90] (B2.north); % Labels \node at (-0.375, -0.625) {$$\div 2$$}; \node at (1.5, 0.75) {\scriptsize Minus the Square}; \node at (3,-1) [anchor=east] {\tiny www.mathtutoringacademy.com}; \end{tikzpicture} \end{center} Â Inside the final parentheses we always end up with $$x + B$$, where $$B$$ is half of the coefficient of the original $$x$$ term.\vskip 2mm Â Next, we subtract $$B^2$$ \textit{outside} the parentheses. Let’s try it with one of our previous examples to see it in action.\vskip 5mm Â \textbf{Example 5: Simple Quick Method}\vskip 2mm Â Use the quick version of Completing the Square on $$x^2 + 14x + 40$$. Â \begin{center} \begin{tikzpicture} % Help Lines % \draw [step=0.25cm,help lines] (0,-1) grid (5,1); % \draw (0,-1) grid (5,1); % Equation \node at (1.2,-0.25){% $$% x^2 + {\color{blue} 14}x + 40 = (x + {\color{blue} 7})^2 \underbrace{- {\color{blue} 7^2} + 40}_{\mbox{\scriptsize Add Together}} = (x + 7)^2 – 9$$}; % Arrows \node (linear) [inner sep=0pt] at (-1.625,-0.15){}; \node (BLow) [inner sep=0pt] at (0.75, -0.15){}; \node (BUp) [inner sep=0pt] at (0.75, 0.2){}; \node (B2) [inner sep=0pt] at (1.75,0.2){}; \draw [-latex] (linear.south) to [out=270,in=270] (BLow.south); \draw [-latex] (BUp.north) to [out=90,in=90] (B2.north); \draw [-latex] (2.85,-0.575) .. controls (3,-0.625) and (5,-0.75)..(5,-0.25); % Labels \node at (-0.375, -0.625) {$$\div 2$$}; \node at (1.5, 0.75) {\scriptsize Minus the Square}; \node at (5,-1) [anchor=east] {\tiny www.mathtutoringacademy.com}; \end{tikzpicture} \end{center} \vskip 5mm Â \textbf{Answer:} $$x^2 + 14x + 40 = (x + 7)^2 – 9$$ Â Note: This is the same answer we got in Example 1.\vskip 1.5cm Â \textbf{Example 6: Quick Method with Leading Coefficient}\vskip 2mm Â The quick version can also be used when the leading coefficient isn’t $$1$$. Like before, we just factor out the leading coefficient first, and then work inside the braces.\vskip 2mm Â Let’s complete the square on $$5x^2 + 80x + 13$$. Â \noindent\textbf{Solution}\vskip 2mm Â Step 1) Factor out the leading coefficient. Â \[% 5x^2 + 80x + 13 = 5[x^2 + 16x] + 13

Â

Step 2) Now use the quick method to complete the square on the \textit{inside} of the braces.

Â

\begin{center}
\begin{tikzpicture}
% Help Lines
% \draw [step=0.25cm,help lines] (-2,-2) grid (4,2);
% \draw (-2,-1) grid (4,1);
% \draw [red, step = 2] (0,-1) grid (3,1);
% Equation
\node at (1.2,0){%
\begin{minipage}{\textwidth}
\begin{align*}%
5[x^2 + {\color{blue} 16}x] + 13
& = 5[x^2 + {\color{blue} 16}x] + 13\5mm] & = 5[(x + {\color{blue} 8})^2 – {\color{blue} 64}] + 13\\[6mm] & = 5(x + {\color{blue} 8})^2 – 320 + 13\\ & = 5(x + {\color{blue} 8})^2 – 307% \end{align*}% \end{minipage} }; % Arrows \node (linear) [inner sep=0pt] at (2.375,0.95){}; \node (BLow) [inner sep=0pt] at (2.23, -0.05){}; \node (BUp) [inner sep=0pt] at (2.23, 0.25){}; \node (B2) [inner sep=0pt] at (3.23,-0.05){}; \draw [-latex] (linear.south) to [out=270,in=90] (BUp.south); \draw [-latex] (BLow.south) to [out=270,in=270] (B2.south); % Labels \node at (2.625, 0.625) {\scriptsize $$\div 2$$}; \node at (3, -0.55) {\scriptsize Minus the Square}; \node at (4.5,-2) [anchor=east] {\tiny www.mathtutoringacademy.com}; \end{tikzpicture} \end{center} \vskip 5mm Â \textbf{Answer:} $$5x^2 + 80x + 13 = 5(x + 8)^2 – 307$$ Â \vskip 1.5cm Â \textbf{\large Solving Equations}\vskip 2mm Â When solving a quadratic equation, I find the technique of completing the square is not very efficient, except in the simple cases where the leading coefficient is $$1$$ and the linear coefficient is even.\vskip 2mm Â But that doesn’t mean we shouldn’t know \textit{how} to solve more complicated quadratic equations with this technique.\vskip 5mm Â \textbf{Two Approaches}\vskip 2mm Â When solving an equation through completing the square, there are two basic approaches: (1) Complete the square first, \textit{then} solve the equation, or (2) Solve the equation \textit{as} you complete the square.\vskip 5mm Â \textbf{Example 7: Solving a Quadratic Equation by Completing the Square}\vskip 2mm Â Use Completing the Square to solve $$4x^2 + 3x – 10 = 0$$.\vskip 5mm Â \textbf{Solution (Method 1)}\vskip 2mm Â For this approach, we’ll first complete the square, then solve the equation.\vskip 2mm Â Step 1) Complete the Square on $$4x^2 + 3x – 10$$.\vskip 2mm Â Using the techniques we’ve discussed above, we get the following. Â \[% 4x^2 + 3x – 10 = 4\left(x + \frac 3 8\right)^2 – \frac{169}{16}
\vskip 5mm

Â

Step 2) Solve the equation.

Â

\begin{align*}
4x^2 + 3x – 10 & = 0\6pt] 4\left(x + \frac 3 8\right)^2 – \frac{169}{16} & = 0 && \mbox{Complete the Square}\\[6pt] 4\left(x + \frac 3 8\right)^2 & = \frac{169}{16} && \mbox{Add the constant}\\[6pt] \left(x + \frac 3 8\right)^2 & = \frac{169}{64} && \mbox{Divide by $$4$$}\\[6pt] x + \frac 3 8 & = \pm\sqrt{\frac{169}{64}} && \mbox{Take the square root}\\[6pt] x + \frac 3 8 & = \pm\frac{13} 8 && \mbox{Simplify}\\[6pt] x & = – \frac 3 8 \pm\frac{13} 8 && \mbox{Subtract} \end{align*} Â The two solutions are Â \[% \begin{array}{rl} x & = \displaystyle – \frac 3 8 + \frac {13} 8 = \frac{10} 8 = \frac 5 4\\[12pt] x & = \displaystyle – \frac 3 8 – \frac{13} 8 = – \frac{16} 8 = – 2 \end{array}
\vskip 5mm

Â

\textbf{Solution (Method 2)}\vskip 2mm

Â

This time, we’ll complete the square as we solve the equation. It should be noted that this approach is what many students think \textit{is} Completing the Square.\vskip 2mm

Â

\begin{align*}
4x^2 + 3x – 10 & = 0\\[6pt]
4x^2 + 3x & = 10 && \mbox{Add the constant}\\[6pt]
x^2 + \frac 3 4 x & = \frac{10} 4 && \mbox{Divide by 4}\\[6pt]
x^2 + \frac 3 4 x + \frac 9 {64} & = \frac{10} 4 + \frac 9 {64} && \mbox{Add $$B^2$$}\\[6pt]
\left(x + \frac 3 8\right)^2 & = \frac{160}{64} + \frac 9 {64} && \mbox{Factor the left side}\\[6pt]
x + \frac 3 8 & = \pm \sqrt{\frac{169}{64}} && \mbox{Take square root}\\[6pt]
x & = -\frac 3 8 \pm \frac{13} 8 && \mbox{Subtract}
\end{align*}

Â

Again, we see the two answers are $$x =-\frac 3 8 + \frac{13} 8 = \frac 5 4$$ and $$x = -\frac 3 8 – \frac{13} 8 = -2$$.
\vskip 5mm

Â

\textbf{Answer:} $$x = \frac 5 4$$ or $$x = -2$$
\vskip 1.5cm

Â

\textbf{Conclusion}\vskip 2mm

Â

Admittedly, most high school student will Complete the Square in the context of solving quadratic equations. However, it is important that they understand that the technique is more than just an equation-solving technique. Outside of high school math, much of its use is in changing the form of a quadratic function so that it can be used in higher mathematical techniques.

Get Private, One on One Online Tutoring for High school, college, Graduate, Test prep & beyond.

Local: (718) 412-1958

Toll Free:

Fax:

###### info@mathacademytutoring.com

Find us on:

We Accept:     