# Completing the square - the easy way

-or-

### matching coefficients for fun and profit

I bluffed my way through completing the square at A-level. I guessed, dropped minus signs, and dropped marks all the way. It was only once I started teaching it that I figured out completing the square. Let me share it with you.

### Completing the square (easy version)

The version of completing the square you’ll see most often comes up in C1: you’ll be given a quadratic like this: $x^2 + 10x - 7$ and told either to complete the square, or to express it in the form $(x+q)^2 + r$, which means the same thing.

Here’s how you complete the square. First, expand the bracket and set the two things equivalent to each other:

$x^2 + 10x - 7 = x^2 + 2qx + q^2 + r$

Now you have to pick $q$ and $r$ so that on each side, you have the same number of $x^2$ (that’s already fine), the same number of $x$s and the same number of things-without-$x$s. That is to say: $x^2 = x^2$ $10x = 2qx$ $-7 = q^2 + r$

So, $10x = 2q$, which means $q = 5$; $q^2 + r = -7$, so $r = -32$.

That means the completed square is: $x^2 + 10x - 7 = (x + 5)^2 - 32$

Job done!

### Completing the square, harder version

But what if you have a number in front of the $x$? That’s where it normally goes pear-shaped - you get taught a monster of an expansion with multiple brackets and no ibuprofen. Frankly, you should be on the phone to a human rights lawyer.

You could, if you preferred, do it the easy way, which is to use the form $ p(x+q)^2 + r$ , which works just the same way as before. Let’s see how you’d complete the square for $4x^2 - 3x + 7$, which I wouldn’t attempt the normal way unless I knew Boots was going to be open for a while.

Instead, let’s go with: $ 4x^2 - 3x + 7 = p(x+q)^2 + r$

Expand the bracket to get $px^2 + 2pqx + pq^2 + r$, and match coefficients:

$4x^2 = px^2$, so $p = 4$. $- 3x = 2pqx = 8qx$, so $q = -\frac{3}{8}$. $7 = pq^2 + r = 4 * (-\frac{3}{8})^2 + r = \frac{9}{16} + r$, $so r = \frac{103}{16}$.

And that’s it: $4x^2 - 3x + 7 = 4(x - \frac{3}{8})^2 + \frac{103}{16}$

Hard numbers, sure - but no headache!

### Squaring the Circle

In C2, you sometimes get something that claims to be a circle, like this:

$x^2 + y^2 + 6x - 8y - 56 = 0$

You can use completing the square on this, but you need to do it in two steps: work with the $x$s and then with the $y$s. (I’d also move the 56 to the other side to start with).

So, I’ve got $x^2 + 6x = (x+q)^2 + r$ - I don’t need the $p$ because it’s obviously 1.

That gives me $q = 3$, $r = -9$ for the first one: $x^2 + 6x = (x+3)^2 - 9$

For the $y$s, $y^2 - 8y = (y+Q)^2 + R$, to give me $Q = -4$ and $R = -16$. I’ve used capitals so I don’t mix up the letters from the different expressions.

So, combining those on the left: $x^2 + y^2 + 6x - 8y = (x+3)^2 - 9 + (y-4)^2 - 16 = 56$, which tidies up into:

$(x+3)^2 + (y-4)^2 = 81 = 9^2$

You can say this is a circle, centre (-3,4), with radius 9.

### Why bother completing the square?

Because you’re told to. There are some cool applications to quadratics, which I’ll look at in another post - but this one’s quite long enough.

(Image adapted from a photo by quinnanya, used under a Creative Commons by-sa licence.)