Complete the Square

We have seen the perfect square identity (A+B)2=A2+2AB+B2\left(A+B\right)^2=A^2+2AB+B^2and we have seen how we can use this to factorise an expression such as x2+4x+4x^2+4x+4 as (x+2)2\left(x+2\right)^2.

All quadratics of the form y=ax2+bx+cy=ax^2+bx+c can be transformed into the form y=a(x−h)2+ky=a\left(x-h\right)^2+k through the process of completing the square.

This form is very useful for us in graphing, solving and identifying key features of quadratics, for now we will just focus on the algebraic skills associated with completing the square.

So we can rewrite x2−4x+23=(x−2)2+19x^2-4x+23=\left(x-2\right)^2+19.

Algebraically the same example would look like this:

x2−4x+23=x2−4x+(−2)2+23−(−2)2x^2-4x+23=x^2-4x+\left(-2\right)^2+23-\left(-2\right)^2

(Add the square of half the coefficient of x, but also subtract that same value so the expression’s value is not altered.)

=(x−2)2+23−(−2)2=\left(x-2\right)^2+23-\left(-2\right)^2

(Identify the perfect square we created by adding the square of half the coefficient of xx.)

=(x−2)2+19=\left(x-2\right)^2+19

(Simplify the constant term.)


Factorise from Completed Square Form

We have met the difference of two squares identity: (A−B)(A+B)=A2−B2\left(A-B\right)\left(A+B\right)=A^2-B^2.

We can use this to factorise an expression such as x2−9x^2-9:

x2−9=(x−3)(x+3)x^2-9=\left(x-3\right)\left(x+3\right),

or an expression such as x2−5x^2-5:

x2−5=(x−5)(x+5)x^2-5=\left(x-\sqrt5\right)\left(x+\sqrt5\right).

If we have a completed square expression such as (x+2)2−25\left(x+2\right)^2-25, we can factorise as:

(x+2)2−25=((x+2)−5)((x+2)+5)\left(x+2\right)^2-25=\left(\left(x+2\right)-5\right)\left(\left(x+2\right)+5\right)

(Use difference of two squares)

=(x+2−5)(x+2+5)=\left(x+2-5\right)\left(x+2+5\right)

(Remove the brackets)

=(x−3)(x+7)=\left(x-3\right)\left(x+7\right)

(Simplify)