# Completing the Square

## 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:

- Firstly, set $\alpha$ as half of $a$.
- Secondly, expand $(x+\alpha)^2$.
- 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.

## 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$.

- 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=3(x+1)^2$ by stretching the graph of $y=(x+1)^2$ about the x-axis by a factor of 3. See y-transformations on the Transformations page.
- Finally, sketching the graph of $y=3(x+1)^2-4$ is done by shifting the graph of $y=3(x+1)^2$ down by 4. See y-transformations again on the Transformations page.

## Completing the Square Examples

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

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.

It follows that the result is $x^2+4x+4$ but we want $x^2+4x+9$ and so 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=(x+2)^2+5$

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

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=2\left(x^2+4x-2.5\right)=2\left((x+2)^2-6.5\right)$

It follows that, when expanding the final term, 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 for Completing the Square

## What Next?

- Go back to PURE MATHS
- See QUESTIONS BY TOPIC
- Go to PAST and PRACTICE PAPERS