topic badge

2.09 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 an actual 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.

Completing the square visually

Let's use the applet below to visualize how to complete the square.

Exploration

This interactive will help you to visualize the process. Watch this video for an explanation of how to use the applett. Then use it to complete the square for the quadratic above..

  1. Drag the blue slider to the right until the number $23$23 is shown in blue.
  2. Drag the red slider to the right to create the largest square possible without any missing pieces. Notice the factored form $\left(x+d\right)^2$(x+d)2.
  3. Notice that some small blue squares are left out. Count them and use this number to complete the square.
  4. Rewrite the original quadratic in the form $\left(x+d\right)^2+f$(x+d)2+f.
  5. Check the "Complete the square" box to check your work.
  6. Repeat the process by changing the value of the blue slider to $12$12.
  7. Now repeat the process by changing the value of the blue slider to any number of your choice.
  8. What patterns do you notice?

When we complete the square for a quadratic $ax^2+bx+c$ax2+bx+c, we get a quadratic in the form $\left(x+d\right)^2+f$(x+d)2+f. Notice the value of $d$d is $\frac{1}{2}$12 the value of $b$b and the value of $f$f is equal to $c-d^2$cd2. Let's use these patterns in some examples.

 

Worked examples

Question 1

What coefficient of $x$x would make the following a perfect square?

$x^2+\editable{}x+36$x2+x+36

Think:  Consider the relationship between the second and third terms in the equation $\left(x+a\right)^2=x^2+2ax+a^2$(x+a)2=x2+2ax+a2.

Do: We know that we can find half of the coefficient of $x$x and then square it to get to the third term.

That means we can take the square root of the third term and double it to get to the $x$x coefficient.

$2\times\sqrt{36}$2×36 $=$= $2\times6$2×6
  $=$= $12$12

The coefficient must be $12$12.

Question 2

Complete the square by finding $j$j and $k$k:

$x^2-14x+j=\left(x+k\right)^2$x214x+j=(x+k)2

Think: Consider how $k$k is related to the coefficient of $x$x.

Do:

$j$j $=$= $\left(\frac{-14}{2}\right)^2$(142)2
  $=$= $\left(-7\right)^2$(7)2
  $=$= $49$49

$k$k is half the $x$x coefficient which is $-14$14, therefore $k=-7$k=7.

 

Completing the square algebraically

Let's imagine we want to factor a quadratic, but without taking the time to create an actual square. Let's think back to the patterns we noticed from the applet above. 

The steps involved are:

  • If the coefficient on $x^2$x2 is not equal to $1$1 then divide it out of every term
  • Move the constant term to the end
  • Add half the coefficient of $x$x and square it
  • Keep the expression balanced
  • Complete the square

 

Worked example

Question 3

Factor the quadratic using the method of completing the square to get it into the form $\left(x+d\right)^2+f$(x+d)2+f

$x^2-10x+98$x210x+98

Think: The coefficient on $x^2$x2 is already equal to $1$1 and the constant term is already at the end where it should be so let's focus on the middle term.

Do: We need to make $x^2-10x+k$x210x+k a perfect square, so we will find half of $-10$10 and then square it.

$k$k $=$= $\left(\frac{-10}{2}\right)^2$(102)2
  $=$= $\left(-5\right)^2$(5)2
  $=$= $25$25

Then we add $25$25 to the right side of the equation, but to keep it balanced we must also subtract $25$25 from the right side.

$x^2-10x+98$x210x+98 $=$= $\left(x^2-10x+25\right)+98-25$(x210x+25)+9825
  $=$= $\left(x-5\right)^2+98-25$(x5)2+9825
  $=$= $\left(x-5\right)^2+73$(x5)2+73

We can factor the perfect square trinomial in the parentheses and simplify $98-25$9825

$x^2-10x+98$x210x+98 $=$=

$\left(x-5\right)^2+98-25$(x5)2+9825

  $=$= $\left(x-5\right)^2+73$(x5)2+73

So $x^2-10x+98$x210x+98 becomes $\left(x-5\right)^2+73$(x5)2+73 after completing the square.

 

Practice questions

Question 4

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 5

Solve the following quadratic equation by completing the square:

$x^2+18x+32=0$x2+18x+32=0

Question 6

Solve for $x$x by first completing the square.

$x^2-2x-32=0$x22x32=0

Question 7

Solve the following quadratic equation by completing the square:

$4x^2+11x+7=0$4x2+11x+7=0

  1. Write all solutions on the same line, separated by commas.

    Enter each line of work as an equation.

 

Outcomes

II.A.SSE.3.b

Complete the square in a quadratic expression to reveal the maximum or minimum value of the function it defines.

What is Mathspace

About Mathspace