topic badge

12.09 Review: Completing the square

Lesson

Completing the square is the process of rewriting a quadratic expression from the expanded form $x^2+2bx+c$x2+2bx+c into the square form $\left(x+b\right)^2+c-b^2$(x+b)2+cb2. The name comes from how the method was first performed by ancient Greek mathematicians who were actually looking for numbers to complete a physical square.

There are two ways to think about the completing the square method: visually (using a square), and algebraically. We will see that we can use this method to find the solutions to the quadratic equation and to more easily graph the function.

Perfect square trinomials

The basis for completing the square relies on the factoring technique for perfect square trinomials.

Remember!

A perfect square trinomial is of the form $a^2+2ab+b^2$a2+2ab+b2 and factors to give $\left(a+b\right)^2$(a+b)2

For the most part, we will be using that:

 $x^2+2bx+b^2=\left(x+b\right)^2$x2+2bx+b2=(x+b)2

or

$x^2+bx+\left(\frac{b}{2}\right)^2=\left(x+\frac{b}{2}\right)^2$x2+bx+(b2)2=(x+b2)2

Let's practice factoring perfect square trinomials before we start completing the square.

Practice questions

Question 1

Complete the distribution of the perfect square: $\left(x-3\right)^2$(x3)2

  1. $\left(x-3\right)^2=x^2-\editable{}x+\editable{}$(x3)2=x2x+

Question 2

Factor $x^2-12x+36$x212x+36.

Question 3

Factor $x^2-16x+64$x216x+64.

 

Visually completing the square

Consider the following quadratics:

$x^2+4x-5$x2+4x5

$x^2+2x-3$x2+2x3

$x^2-8x-20$x28x20

Let's imagine we want to factor them using the complete the square method. Now, none of these are perfect square trinomials, but we are going to add or subtract a constant to make it a perfect square trinomial. 

The steps involved are:

  • Move the constant term to the end
  • Create a box and complete the square
  • Keep the expression balanced
  • Write the factoring

As this is a visual method, its best to learn by watching the process in action, so here are two examples.

Worked examples

Question 4

We wish to factor $x^2+4x-5$x2+4x5 by first completing the square.

Completing the square on $x^2+4x-5$x2+4x5:

Then can also show this algebraically.

$x^2+4x-5$x2+4x5 $=$= $x^2+4x+4-4-5$x2+4x+445
  $=$= $\left(x+2\right)^2-4-5$(x+2)245
  $=$= $\left(x+2\right)^2-9$(x+2)29

 

Question 5

We wish to factor $x^2-8x-20=0$x28x20=0 by first completing the square.

Completing the square on $x^2-8x-20$x28x20:

We can also factor this algebraically.  

$x^2-8x-20$x28x20 $=$= $x^2-8x+16-16-20$x28x+161620
  $=$= $\left(x-4\right)^2-16-20$(x4)21620
  $=$= $\left(x-4\right)^2-36$(x4)236

 

This interactive will help you to visualize the process. Watch this video for an explanation .

 

Completing the square algebraically

Let's imagine we want to factor the same quadratics as before, but this time using the algebraic version of the complete the square method.

Exploration

Suppose we wanted to complete the square for $x^2-8x+13$x28x+13. If we complete the square, we want to get it to the form $\left(x-h\right)^2+k$(xh)2+k

The first question is, what will the value of $h$h, the constant in the parentheses, be?

$x^2-8x+13=\left(x-h\right)^2+k$x28x+13=(xh)2+k

If we go back to the idea that $x^2+2bx+b^2=\left(x+b\right)^2$x2+2bx+b2=(x+b)2, we will notice that the constant in the parentheses is half of the coefficient of the linear term. The constant in the parentheses is therefore $\frac{-8}{2}$82, which is $-4$4.

$x^2-8x+13=\left(x-4\right)^2+k$x28x+13=(x4)2+k

Now we need to determine what the value of $k$k will be. To do that, let's consider what $\left(x-4\right)^2$(x4)2 distributes out to.

$\left(x-4\right)^2=x^2-8x+16$(x4)2=x28x+16

Notice that we already had the $x^2$x2 and the $-8x$8x terms, but we had $+13$+13, not $+16$+16 as our coefficient. To account for this, we will add and subtract $16$16, to get what we need, while keeping everything balanced. 

$x^2-8x+13=x^2-8x+16-16+13$x28x+13=x28x+1616+13

Now, by collecting like terms, we are all done!

$x^2-8x+13$x28x+13 $=$= $x^2-8x+16-16+13$x28x+1616+13

Adding and subtracting $\left(\frac{-8}{2}\right)^2=16$(82)2=16

  $=$= $\left(x^2-8x+16\right)-16+13$(x28x+16)16+13

Consider that we have now created a Perfect Square Trinomials

  $=$= $\left(x-4\right)^2-16+13$(x4)216+13

Factor the first three terms

  $=$= $\left(x-4\right)^2-3$(x4)23

Combine Like Terms

 

The steps involved are:

  1. Move the constant term to the end, leaving space for two numbers, $x^2+bx+c$x2+bx+c
  2. Add and subtract half the coefficient of $x$x squared, $x^2+bx+\left(\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2+c$x2+bx+(b2)2(b2)2+c
  3. Factor the first three terms
  4. Combine Like Terms

 

Worked Examples

Question 1

Determine the value of $c$c so that $x^2-x+c$x2x+c is a perfect square.

Question 2

Using the method of completing the square, rewrite $x^2+3x+6$x2+3x+6 in the form $\left(x+b\right)^2+c$(x+b)2+c.

Question 3

Using the method of completing the square, rewrite $x^2-7x+14$x27x+14 in the form $\left(x+b\right)^2+c$(x+b)2+c.

 

What is Mathspace

About Mathspace