Completing the Square – solve or sketch a quadratic

What is Completing the Square?

Completing the Square is when either:

  • we write x^2+ax+b in the form (x+\alpha)^2+\beta
  • or we write ax^2+bx+c in the form \alpha(x+\beta)^2+\gamma

For the simpler case where the coefficient of x^2 is 1:

  1. Firstly, set \alpha as half of a.
  2. Secondly, expand (x+\alpha)^2.
  3. Finally, choose \beta so as to adjust the constant so that the original quadratic expression is obtained.

See Example 1. In contrast, if the coefficient of x^2 is not 1, first of all, remove a factor of a from the original quadratic. Then perform the above on the inside of the brackets before expanding again in the final step. See Example 2.

Why is it called Completing the Square?

Sketching Quadratics

Sketching the graph of a quadratic can be easy if you think about the transformations that have been applied to the graph of y=x^2:

  • Firstly, consider the graph of y=x^2. See the Board Example.
  • Secondly, sketch the graph of say y=(x+1)^2 by shifting the graph of y=x^2 to the left by 1. See x-transformations on the Transformations page.
  • Thirdly, sketch the graph of y=4(x+1)^2 by stretching the graph of y=(x+1)^2 in the y-direction by a factor of 4. See y-transformations on the Transformations page.
  • Finally, sketching the graph of y=4(x+1)^2-1 is done by shifting the graph of y=4(x+1)^2 down by 1. See y-transformations again on the Transformations page.

Examples

Write x^2+4x+9 in form (x+\alpha)^2+\beta

Solution:

First of all, halve the coefficient of x in the original quadratic (this is 4). See what happens when you set this as alpha and expand (x+\alpha)^2:

(x+2)^2=(x+2)(x+2)=x^2+4x+4

Now we can see why we should halve the number as you end up with two lots of it in the expansion. The result is x^2+4x+4 but we want x^2+4x+9. Hence, we must add 5 to this to get x^2+4x+9, i.e. choose beta to be 5. We now have:

x^2+4x+9\equiv(x+2)^2+5.

Write 2x^2+8x-5 in the form p(x+q)^2+r

Solution:

Students often get confused with this more complicated example. It can be made simpler by first taking out a factor of 2 and then completing the square of what’s inside the brackets:

2x^2+8x-5\equiv 2\left(x^2+4x-2.5\right)\equiv 2\left((x+2)^2-6.5\right)

It follows that, when expanding the final expression, we obtain the result as required:

2x^2+8x-5=2(x+2)^2-13

Hence, we can see from this that p=q=2 and r=-13.

Videos

https://youtu.be/wTG2qv8iRQY

Completing the square with unknowns in the coefficients.