Completing the square refers to the process of converting a quadratic polynomial of the form $\hspace{0.2em} ax^2 + bx + c \hspace{0.2em}$ to the form $\hspace{0.2em} a(x + h)^2 + k \hspace{0.2em}$.

For example,

Now, “completing the square” is very helpful when it comes to solving quadratic equations or graphing quadratic polynomials. There are other uses too but we’ll limit ourselves to these two only.

So, let’s see how we can complete the square and use it to our advantage.

A quadratic polynomial is any polynomial of degree two.

However, in this tutorial (as well as in common usage), the phrase "quadratic polynomial" is used to refer to a second–degree polynomial with only one variable.

The standard form of a quadratic polynomial is $\hspace{0.2em} ax^2 + bx + c, \hspace{0.4em} a \neq 0 \hspace{0.2em}$.

Basically, in the standard form, we have the $\hspace{0.2em} x^2$–term, then the $\hspace{0.2em} x$–term, and then the constant term term at the end.

$a \hspace{0.2em}$ cannot be $\hspace{0.2em} 0 \hspace{0.2em}$ because then the second–degree term ($\hspace{0.2em} x^2$–term) would vanish and our polynomial would no longer be a second–degree polynomial.

An example of a quadratic polynomial in its standard form would be $\hspace{0.2em} 4x^2 - 9x + 2 \hspace{0.2em}$.

Here a few more examples of quadratic polynomials and how they can be expressed in their standard forms even if they don't appear to be so.

Quadratic Polynomial | Standard Form |
---|---|

$\hspace{0.2em} -4x + 3x^2 - 1 \hspace{0.2em}$ | $\hspace{0.2em} {\color{Red} 3} x^2 {\color{Teal} \hspace{0.2em} - \hspace{0.2em} 4} x {\color{Orchid} \hspace{0.2em} - \hspace{0.2em} 1} \hspace{0.2em}$ |

$\hspace{0.2em} 7x - 5x^2 \hspace{0.2em}$ | $\hspace{0.2em} {\color{Red} -5} x^2 {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 7} x {\color{Orchid} \hspace{0.2em} + \hspace{0.2em} 0} \hspace{0.2em}$ |

$\hspace{0.2em} 2x^2 - 16 \hspace{0.2em}$ | $\hspace{0.2em} {\color{Red} 2} x^2 {\color{Teal} \hspace{0.2em} + \hspace{0.2em} 0} x {\color{Orchid} \hspace{0.2em} - \hspace{0.2em} 16} \hspace{0.2em}$ |

Alright, having covered the basics, in the following section we'll see how the method of completing the square works.

Depending on whether the leading coefficient is $\hspace{0.2em} 1 \hspace{0.2em}$, our method varies slightly and so we'll look at the two types of polynomials separately.

In a quadratic polynomial, the leading coefficient is the coefficient in the second–degree term (the coefficient of $\hspace{0.2em} x^2 \hspace{0.2em}$).

Example

Complete the square for the quadratic polynomial $\hspace{0.2em} x^2 - 2x - 2 \hspace{0.2em}$.

Solution

Step 1. Make sure the leading coefficient is $\hspace{0.2em} 1 \hspace{0.2em}$. And arrange the terms in the standard order ($\hspace{0.2em} x^2 \hspace{0.2em}$ followed by $\hspace{0.2em} x \hspace{0.2em}$ and then the constant), if they are not already.

It is in our case here, so we can move to the next step.

Remember, if a term's coefficient isn't explicitly mentioned, it is $\hspace{0.2em} 1 \hspace{0.2em}$ or $\hspace{0.2em} -1 \hspace{0.2em}$ depending on the sign of the term.

Step 2. Take half of the coefficient of $\hspace{0.2em} x \hspace{0.2em}$ (or whatever the variable is). Then add and subtract its square from the polynomial.

Here, the coefficient of $\hspace{0.2em} x \hspace{0.2em}$ is $\hspace{0.2em} -2 \hspace{0.2em}$.

- Dividing it by $\hspace{0.2em} 2 \hspace{0.2em}$ we get $\hspace{0.2em} {\color{Teal} -1} \hspace{0.2em}$. We'll call it $\hspace{0.2em} {\color{Teal} h} \hspace{0.2em}$.
- And then taking the square, we get $\hspace{0.2em} {\color{Red} 1} \hspace{0.2em}$.

So we add and subtract $\hspace{0.2em} {\color{Red} 1} \hspace{0.2em}$ from the polynomial.

$x^2 - 2x - 2 \hspace{0.4em} = \hspace{0.4em} x^2 - 2x + {\color{Red} 1} - {\color{Red} 1} - 2$

Note — Place the new terms (shown in red) after the $\hspace{0.2em} x$–term and before the constant term. That way, the part upto the first new term would be a perfect square.

Step 3. As I just mentioned, everything upto the first additional term makes a perfect square. Replace it with $\hspace{0.2em} (x + {\color{Teal} h} )^2 \hspace{0.2em}$. Remember $\hspace{0.2em} {\color{Teal} h} \hspace{0.2em}$ from the last step?

Also, simplify the rest of the polynomial.

In our case here, $\hspace{0.2em} {\color{Teal} h} \hspace{0.2em}$ is $\hspace{0.2em} {\color{Teal} -1} \hspace{0.2em}$. That means $\hspace{0.2em} x + {\color{Teal} h} \hspace{0.2em}$ would be $\hspace{0.2em} x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} \hspace{0.2em}$. So,

$\begin{align*} \underline{x^2 - 2x + {\color{Red} 1} } - {\color{Red} 1} - 2 \hspace{0.25em} &= \hspace{0.25em} \underline{(x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} )^2} - {\color{Red} 1} - 2 \\[1em] &= \hspace{0.25em} (x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} )^2 - 3 \end{align*}$

And that’s it. We have succesfully completed the square.

Example

Complete the square for the quadratic polynomial $\hspace{0.2em} x^2 + 3x \hspace{0.2em}$.

Solution

Step 1. We start by confirming the leading coefficient is $\hspace{0.2em} 1 \hspace{0.2em}$. And that the terms are in the standard order.

All's good, so we can move to the next step.

Step 2. The coefficient of $\hspace{0.2em} x \hspace{0.2em}$ is $\hspace{0.2em} 3 \hspace{0.2em}$.

- Dividing it by $\hspace{0.2em} 2 \hspace{0.2em}$ we get $\hspace{0.2em} {\color{Teal} 3/2} \hspace{0.2em}$. We'll call it $\hspace{0.2em} {\color{Teal} h} \hspace{0.2em}$.
- And then taking the square, we get $\hspace{0.2em} {\color{Red} 9/4} \hspace{0.2em}$.

So we add and subtract $\hspace{0.2em} {\color{Red} 9/4} \hspace{0.2em}$ from the polynomial.

$x^2 + 3x \hspace{0.4em} = \hspace{0.4em} x^2 + 3x + {\color{Red} \frac{9}{4}} - {\color{Red} \frac{9}{4}}$

Again, we place the new terms after the $\hspace{0.2em} x$–term. There was no constant term, so we don't need to worry about that.

Step 3. The first three terms make a perfect square. We replace them with $\hspace{0.2em} (x + {\color{Teal} h} )^2 \hspace{0.2em}$ or $\hspace{0.2em} (x {\color{Teal} \hspace{0.25em} + \hspace{0.25em} 3/2} )^2 \hspace{0.2em}$.

$\underline{x^2 + 3x + {\color{Red} \frac{9}{4}} } - {\color{Red} \frac{9}{4}} \hspace{0.25em} = \hspace{0.25em} \underline{\left ( x {\color{Teal} \hspace{0.25em} + \hspace{0.25em} \frac{3}{2}} \right )^2} - {\color{Red} \frac{9}{4}}$

Done.

Example

Complete the square for the quadratic polynomial $\hspace{0.2em} 2x^2 - 4x - 1 \hspace{0.2em}$.

Solution

In the previous examples, the leading coefficient was alread $\hspace{0.2em} 1 \hspace{0.2em}$, so we could skip the first step and go straight to the second.

Step 1. As shown below, multiply and divide the given polynomial by the leading coefficient so the leading coefficient becomes $\hspace{0.2em} 1 \hspace{0.2em}$.

Here, the leading coefficient is $\hspace{0.2em} {\color{Orchid} 2} \hspace{0.2em}$. So —

$\begin{align*} 2x^2 - 4x - 1 \hspace{0.25em} &= \hspace{0.25em} {\color{Orchid} 2} \left ( \frac{2x^2 - 4x - 1}{ {\color{Orchid} 2} } \right ) \\[1.5em] &= \hspace{0.25em} {\color{Orchid} 2} \left ( x^2 - 2x - \frac{1}{2} \right ) \end{align*}$

Note — What we have inside parentheses is a quadratic polynomial with $\hspace{0.2em} 1 \hspace{0.2em}$ as the leading coefficient. And we already learned how to complete the square for such polynomials.

So, for steps 2 and 3, we'll ignore the factor outside the parentheses, $\hspace{0.2em} {\color{Orchid} 2} \hspace{0.2em}$.

Step 2. The coefficient of $\hspace{0.2em} x \hspace{0.2em}$ is $\hspace{0.2em} -2 \hspace{0.2em}$.

- Dividing it by $\hspace{0.2em} 2 \hspace{0.2em}$ gives us $\hspace{0.2em} {\color{Teal} -1} \hspace{0.2em}$. Again, let's label it $\hspace{0.2em} {\color{Teal} h} \hspace{0.2em}$.
- And then taking the square, we get $\hspace{0.2em} {\color{Red} 1} \hspace{0.2em}$.

So we add and subtract $\hspace{0.2em} {\color{Red} 1} \hspace{0.2em}$ from the polynomial.

$x^2 - 2x - \frac{1}{2} \hspace{0.4em} = \hspace{0.4em} x^2 - 2x + {\color{Red} 1} - {\color{Red} 1} - \frac{1}{2}$

Step 3. Again, the first three terms make a perfect square. We replace them with $\hspace{0.2em} (x + {\color{Teal} h} )^2 \hspace{0.2em}$ or $\hspace{0.2em} (x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} )^2 \hspace{0.2em}$.

$\begin{align*} \underline{x^2 - 2x + {\color{Red} 1} } - {\color{Red} 1} - \frac{1}{2} \hspace{0.25em} &= \hspace{0.25em} \underline{\left ( x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} \right )^2} - {\color{Red} 1} - \frac{1}{2} \\[1.5em] &= \hspace{0.25em} \underline{\left ( x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} \right )^2} - \frac{3}{2} \end{align*}$

We're not done yet.

Step 4. We need to bring back the factor we ignored for the last two steps.

That means our expression becomes —

${\color{Orchid} 2} \left ( \left ( x {\color{Teal} \hspace{0.25em} - \hspace{0.25em} 1} \right )^2 - \frac{3}{2} \right )$

That's it. Once you have become comfortable working with polynomial with leading coefficiients of $\hspace{0.2em} 1 \hspace{0.2em}$, this would be much simpler than it may appear now.

Here's an example of how we can solve quadratic equations by completing the square.

Example

Using the method of completing the square, solve the quadratic equation $\hspace{0.2em} 2x^2 - 4x -1 \hspace{0.2em}$.

Example

Complete the square for the quadratic polynomial $\hspace{0.2em} 2x^2 - 4x -1 \hspace{0.2em}$.

We use cookies to provide and improve our services. By using the site you agree to our use of cookies. Learn more