topic badge
Middle Years

2.04 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 solve and factorise quadratics that previous methods could not, leading us to the quadratic formula in our next lesson. This method will also be very useful in Chapter 2 and Chapter 3 to help us identify key features in graphs such as the turning point of a quadratic or centre of a circle.

 

Visual method - drawing a box

Consider the following quadratic expression:

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

To complete the square the steps involved are:

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

As this is a visual method, it's best to learn by watching the process in action, so here is an example.

Worked example

example 1

(a) Write $x^2+4x-5$x2+4x5 in the form $\left(x+m\right)^2+n$(x+m)2+n by completing the square.

Think: Here is a visual of the method:

Do: From the video we can see that  $x^2+4x-5=\left(x+2\right)^2-9$x2+4x5=(x+2)29.

(b) Hence, solve the equation $x^2+4x-5=0$x2+4x5=0 after completing the square.

Think: We can now solve the equation with algebraic manipulation.

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

Completed square from (a)

$\left(x+2\right)^2$(x+2)2 $=$= $9$9

Take the constant to the RHS

$x+2=3$x+2=3 or $x+2=-3$x+2=3

Take square root both sides

$x=1$x=1 or $x=-5$x=5

Solve for the $x$x values

Algebraic method

Let's now look at how we can complete the square using algebraic steps.

Completing the square algebraically:

  • Factor out the coefficient of the $x^2$x2 term, unless it is $1$1
  • Halve the coefficient of $x$x and square it, add and subtract this value
  • Factorise the terms that now form a perfect square
  • Combine the constant and term left over from completing the square

 

Worked examples

Example 2

Write the expression $x^2-6x+5$x26x+5 in the form $\left(x-m\right)^2+n$(xm)2+n by completing the square.

Think: check that the coefficient of $x^2$x2 is $1$1 so no factorisation is required. Halve the coefficient of the $x$x term, add and subtract the coefficient squared.

Do: 

$x^2-6x+5$x26x+5 $=$= $x^2-6x+\left(-3\right)^2-\left(-3\right)^2+5$x26x+(3)2(3)2+5

Half of $-6$6 is $-3$3. Add and subtract this number squared

  $=$= $x^2-6x+9-9+5$x26x+99+5  
  $=$= $\left(x^2-6x+9\right)-4$(x26x+9)4

Put the first three terms in a bracket and add the constants on the end

  $=$= $\left(x-3\right)^2-4$(x3)24

Factorise the bracket as perfect square

Example 3

Solve the equation $3x^2+6x-8=0$3x2+6x8=0 using the completion of the square method.

Think: Check the coefficient of $x^2$x2. It is not $1$1, therefore factor out the $3$3 so that $x^2$x2 has a coefficient of $1$1 when inside the bracket. 

Do: 

$0$0 $=$= $3x^2+6x-8$3x2+6x8  
$0$0 $=$= $3\left(x^2+2x-\frac{8}{3}\right)$3(x2+2x83)

Take the coefficient of $x^2$x2 out as factor

 

$0$0 $=$= $3\left(x^2+2x+1^2-1^2-\frac{8}{3}\right)$3(x2+2x+121283)

Add and subtract the square of half the coefficient of $x$x

$0$0 $=$= $3\left[\left(x+1\right)^2-1-\frac{8}{3}\right]$3[(x+1)2183]

Factorise the first three terms as a perfect square

$0$0 $=$= $3\left[\left(x+1\right)^2-\frac{11}{3}\right]$3[(x+1)2113]

Combine the constant terms

$0$0 $=$= $\left(x+1\right)^2-\frac{11}{3}$(x+1)2113

Divide both sides by $3$3

$\frac{11}{3}$113 $=$= $\left(x+1\right)^2$(x+1)2

Take constant to the other side

$\pm\sqrt{\frac{11}{3}}$±113 $=$= $x+1$x+1

Take the square root of both sides

$x$x $=$= $\sqrt{\frac{11}{3}}-1$1131 or $-\sqrt{\frac{11}{3}}-1$1131

Subtract $1$1 from both answers leaving answer in exact form

Reflect: We could have simplified the working for this question if we divided both sides by $3$3 earlier.

Watch this video for an interactive that will help you to visualise the process. .


 

Practice questions

Question 1

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 2

Solve $x^2-6x-16=0$x26x16=0 by completing the square:

Question 3

Solve for $x$x by first completing the square. Express your solutions in simplest fraction form.

$x^2-9x+2=0$x29x+2=0

Question 4

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.

Question 5

Factorise the quadratic using the method of completing the square to get it into the form $y=\left(x+a+\sqrt{b}\right)\left(x+a-\sqrt{b}\right)$y=(x+a+b)(x+ab).

$y=x^2+8x+14$y=x2+8x+14

What is Mathspace

About Mathspace