Completing the Square

The algebraic manipulation of “completing the square” of a quadratic is a special procedure that can be very useful in solving and dealing with quadratic equations and functions. When we complete the square, we are just putting a quadratic into a different form that is useful to us for a variety of reasons (which we’ll look at later in the section). The general idea of “completing the square” means to change the form of a quadratic expression or equation so that part or all of it is a squared binomial.

The Square of a Binomial

First, we’re going to expand a squared binomial:$$
\left( {x + a} \right)^2
$$

Since this is squared, this is the same as: $$
\left( {x + a} \right)\left( {x + a} \right)
$$

Then, using the distributive property (in this case, you may know it as FOIL), we get:

$$
x^2  + ax + ax + a^2  = x^2  + 2ax + a^2
$$

So, by doing this, we are able to see how a squared binomial “works” with its terms. Thus, if we have a quadratic of this form, we can immediately change its form and turn it into a squared binomial.

Example 1

Rewrite as a squared binomial:

$$
x^2  + 8x + 16
$$

We can see that this is in the form above, if we rewrite it as: $$
x^2  + (2 \cdot 4)x + 4^2
$$. In this case, our a term is 4. Thus, we can immediately rewrite it as a squared binomial:

$$
\left( {x + 4} \right)^2
$$

Completing the Square: Part 1

When we “complete the square”, we take the $$x^2 $$ and x terms and determine the constant we need to add to them to have a perfect square binomial, like the one above.

Example 2

Complete the square to rewrite with a squared binomial.

$$
x^2  + 18x
$$

As we can see from above, the final form of the squared binomial should be:

$$
\left( {x + k} \right)^2  = x^2  + 2kx + k^2
$$

Therefore, dividing 18 by 2, we can rewrite this as:

$$
x^2  + 18x = x^2  + \left( {2 \cdot 9} \right)x
$$

So, to complete the square, and to have the form we need to rewrite as a squared binomial, we need to take the k term (the term multiplied by 2 and x), in this case, 9, and square it. Then, add it on to the end of the expression:

$$
x^2  + \left( {2 \cdot 9} \right)x + 9^2
$$

BUT WAIT!!! Can we just add $$9^2 $$ to the expression?? No, of course not – we will change the value of the expression if we add $$9^2 $$. However, we can add 0 to the expression without hurting anything. So, let’s add 0 to the expression by adding $$9^2 $$ AND ALSO subtracting $$9^2 $$. Then, we don’t change the value of the expression. Doing this allows us to rewrite the expression in the way we needed:

$$
x^2  + 18x = x^2  + \left( {2 \cdot 9} \right)x + 9^2  - 9^2
$$

Thus, we see that we have the form we need at the beginning of the expression to rewrite part of this as a squared binomial, and then we just have to remember to add the $$ - 9^2 $$ term. So, we have, as our final answer:

$$
x^2  + 18x = \left[ {x^2  + \left( {2 \cdot 9} \right)x + 9^2 } \right] - 9^2  = \left( {x + 9} \right)^2  - 9^2
$$

Or:

$$
x^2  + 18x = \left( {x + 9} \right)^2  - 81
$$

Completing the Square: Part 2

So, what if the $$x^2 $$ term has a coefficient that is not 1? And what if there is already a constant added onto the end of the quadratic in the original expression. In other words, we start with a quadratic expression such as:

$$
3x^2  - 7x + 5
$$

The first thing that will be convenient is to have an expression where the coefficient of the $$
x^2
$$ term is 1. We can do this by dividing the expression by 3. But, just as above, we CANNOT just divide an expression without also multiplying it back in. We do this by factoring the 3 out of the expression. In other words, we divide each term by 3 and bring the 3 outside a set of parentheses, so that it is still multiplied in. When we do this, we get:

$$
3\left( {x^2  -{\Large \frac{7}{3}}x +{\Large \frac{5}{3}}} \right)
$$

Now, we can “complete the square” of $$x^2  -{\Large \frac{7}{3}}x$$, and then add and subtract the term which completes this square inside the parentheses.

From above, we know that

$$
\left( {x + k} \right)^2  = x^2  + 2kx + k^2
$$

Thus, the term we want to add in is “$$k{}^2$$”. So, in this case, we have: $$
x^2  - {\Large\frac{7}{3}}x$$, and thus, $$2k =  - {\Large\frac{7}{3}}$$, and so, $$k =  - {\Large\frac{7}{{2\left( 3 \right)}}}$$. Therefore, if we add in (and of course, also subtract) the square of k in our expression, we have completed the square and can rewrite that part of the expression as a squared binomial.

So, now, our original expression, rewritten in the above form is:

$$
3\left( {x^2  - {\Large\frac{7}{3}}x + \left( { - {\Large\frac{7}{{2\left( 3 \right)}}}} \right)^2  +{\Large\frac{5}{3}} - \left( { - {\Large\frac{7}{{2\left( 3 \right)}}}} \right)^2 } \right)
$$

So, rewriting the beginning of the expression in the parentheses as a squared binomial, we have:

$$
3\left( {\left[ {x^2  - {\Large\frac{7}{3}}x + \left( { - {\Large\frac{7}{{2\left( 3 \right)}}}} \right)^2 } \right] +{\Large \frac{5}{3}} - \left( { - {\Large\frac{7}{{2\left( 3 \right)}}}} \right)^2 } \right)
$$

$$
 = 3\left( {\left[ {x - {\Large\frac{7}{{2\left( 3 \right)}}}} \right]^2  +{\Large \frac{5}{3}} - \left( { -{\Large \frac{7}{{2\left( 3 \right)}}}} \right)^2 } \right)
$$

Simplifying:

$$
 = 3\left( {\left[ {x - {\Large\frac{7}{6}}} \right]^2  + {\Large\frac{5}{3}} - \left( {{\Large\frac{{49}}{{36}}}} \right)} \right)
$$

$$
\eqalign{
  &  = 3\left( {\left[ {x -\frac{7}{6}} \right]^2  + \frac{{60}}{{36}} - \left( {\frac{{49}}{{36}}} \right)} \right)  \cr
  &  = 3\left( {\left[ {x - \frac{7}{6}} \right]^2  +\frac{{11}}{{36}}}\right) \cr}
$$

Finally, distributing the3 back in, we have:

$$
 = 3\left( {x -{\Large \frac{7}{6}}} \right)^2  + {\Large\frac{{11}}{{12}}}
$$

Some practice problems to check your skills:

Complete the square to rewrite with a squared binomial:

1. $$
x^2  + 12x
$$

Think about it for a moment and then access this link choose this link to see the answers to view answer.

2. $$
x^2  - x
$$

Think about it for a moment and then access this link choose this link to see the answers to view answer.

3. $$
x^2  + 10x - 9
$$

Think about it for a moment and then access this link choose this link to see the answers to view answer.

4. $$
2x^2  - 6x + 16
$$

Think about it for a moment and then access this link choose this link to see the answers to view answer.

5. $$
{\Large\frac{1}{2}}x^2  +{\Large \frac{1}{4}}x + {\Large\frac{1}{2}}
$$

Think about it for a moment and then access this link choose this link to see the answers to view answer.