Completing the Square
This page is a pilot. More topics and features coming shortly.
How to write a quadratic as a squared bracket plus a number, and how to use that form to find turning points, greatest and least values, and exact solutions.
What completing the square means
Completing the square means rewriting a quadratic such as x^2 + 6x + 2 as a squared bracket plus or minus a number: (x + 3)^2 - 7
The new form is useful because a squared bracket can never be negative. That one fact lets you find the turning point of the graph, the smallest or largest value the quadratic can take, and exact solutions of equations that will not factorise.
In the exam, the usual question is "Write 2x^2 - 12x + 7 in the form a(x + b)^2 + c". It is typically worth 3 marks. Harder questions give an identity with unknown constants on both sides, or ask for a maximum or minimum value.
Why it works
Start with x^2 + 6x and picture it as an area: a square of side x, and a rectangle of area 6x cut into two strips of 3x.
Placed round the square, the two strips almost make a bigger square of side x + 3. Only the corner is missing: a square of side 3, with area 9.
So x^2 + 6x is the big square with the corner taken away:
x^2 + 6x = (x + 3)^2 - 9
The number in the bracket is always half the coefficient of x, and the number taken away is always its square.
The method
For a quadratic that starts x^2:
- Halve the coefficient of x. That number goes in the bracket.
- Subtract its square.
- Put the constant back and tidy up.
x^2 + bx + c = \left(x + \frac{b}{2}\right)^2 - \left(\frac{b}{2}\right)^2 + c
Worked example 1
Write x^2 + 6x + 2 in the form (x + a)^2 + b
- Half of 6 is 3, so the bracket is (x + 3)^2
- (x + 3)^2 expands to x^2 + 6x + 9, which is 9 too many, so subtract 9: x^2 + 6x = (x + 3)^2 - 9
- Put the +2 back: x^2 + 6x + 2 = (x + 3)^2 - 9 + 2
- Answer: (x + 3)^2 - 7
- Check by expanding: (x + 3)^2 - 7 = x^2 + 6x + 9 - 7 = x^2 + 6x + 2
Worked example 2
Write x^2 - 5x + 1 in the form (x + a)^2 + b
- Half of -5 is -\frac{5}{2}, so the bracket is \left(x - \frac{5}{2}\right)^2
-
Your turn. What number has to be subtracted? Work out \left(\frac{5}{2}\right)^2 as a fraction.
\left(\frac{5}{2}\right)^2 = \frac{25}{4}, so x^2 - 5x = \left(x - \frac{5}{2}\right)^2 - \frac{25}{4}
- Put the +1 back: \left(x - \frac{5}{2}\right)^2 - \frac{25}{4} + 1
-
Your turn. Work out -\frac{25}{4} + 1 as a fraction.
-\frac{25}{4} + \frac{4}{4} = -\frac{21}{4}
- Answer: \left(x - \frac{5}{2}\right)^2 - \frac{21}{4}
When there is a number in front of x²
Most exam questions have a number in front of x^2, as in 2x^2 - 12x + 7. Take that number out of the first two terms, complete the square inside the bracket, then multiply back out.
- Factorise the number out of the x^2 and x terms only. Leave the constant alone.
- Complete the square inside the bracket.
- Multiply out the outer bracket. The number you subtracted is multiplied too.
- Tidy up the constants.
Worked example 3
Write 2x^2 - 12x + 7 in the form a(x + b)^2 + c where a, b and c are integers.
- Take 2 out of the first two terms: 2(x^2 - 6x) + 7
-
Your turn. Complete the square for the part inside the bracket, x^2 - 6x
x^2 - 6x = (x - 3)^2 - 9
- Put that back inside the outer bracket: 2\left[(x - 3)^2 - 9\right] + 7
- Multiply out the outer bracket. The -9 is multiplied by 2 as well: 2(x - 3)^2 - 18 + 7
- Answer: 2(x - 3)^2 - 11, so a = 2, b = -3 and c = -11
Identities with unknown constants
Some questions give an identity with unknown constants on both sides. Expand the completed square form, then compare the x^2 terms, the x terms and the constants, one at a time.
Worked example 4
4x^2 + 24x + n \equiv c(x + d)^2 + 5 where c, d and n are constants.
Work out the values of c, d and n.
- Expand the right-hand side: c(x + d)^2 + 5 = cx^2 + 2cdx + cd^2 + 5
- Compare the x^2 terms: c = 4
-
Your turn. Compare the x terms: 2cd = 24 and c = 4. Work out the value of d.
2 \times 4 \times d = 24, so d = 3
- Compare the constants: n = cd^2 + 5 = 4 \times 3^2 + 5
- Answer: c = 4, d = 3 and n = 41
Turning points and least values
A squared bracket is never negative: (x - 3)^2 \geqslant 0 for every value of x, and it equals 0 only when x = 3.
So y = (x - 3)^2 - 4 can never be less than -4, and it equals -4 when x = 3. Its graph has a minimum point at (3, -4).
In general, y = a(x + b)^2 + c has its turning point at (-b, c). Watch the sign: the bracket (x + 2)^2 is zero when x = -2, not 2.
Changing b slides the curve left or right, the opposite way to its sign. Changing c slides it up or down. Changing a makes the curve steeper or shallower.
If a is positive, the turning point is a minimum. If a is negative, the curve is the other way up and the turning point is a maximum.
The same idea shows that a quadratic is always positive. For example, x^2 - 10x + 28 = (x - 5)^2 + 3, which is at least 3 for every value of x.
Worked example 5
A = 20x - 2x^2
Work out the maximum value of A as x varies.
- Write the x^2 term first, then take out -2: -2x^2 + 20x = -2(x^2 - 10x)
- Complete the square inside the bracket: -2\left[(x - 5)^2 - 25\right]
-
Your turn. Multiply out the outer bracket, to give A in the form a(x + b)^2 + c
-2 \times -25 = +50, so A = -2(x - 5)^2 + 50
- -2(x - 5)^2 is never more than 0, and equals 0 when x = 5
- Answer: the maximum value of A is 50 (when x = 5)
Solving equations
Completing the square solves any quadratic equation, and gives exact answers in surd form. Get the squared bracket on its own, then take the square root of both sides. Remember that there are two roots.
Exam tip. If a quadratic factorises, factorising is quicker and safer. Keep completing the square for when the question asks for it, wants exact answers with surds, or the quadratic will not factorise.
Worked example 6
Solve x^2 + 4x - 3 = 0
Give your answers in the form a \pm \sqrt{b}
-
Your turn. Complete the square for x^2 + 4x
x^2 + 4x = (x + 2)^2 - 4, so the equation is (x + 2)^2 - 4 - 3 = 0
- Get the bracket on its own: (x + 2)^2 = 7
- Take the square root of both sides, keeping both roots: x + 2 = \pm\sqrt{7}
- Answer: x = -2 \pm \sqrt{7}
Common mistakes
- Forgetting to multiply the subtracted number by the number outside. In 2\left[(x - 3)^2 - 9\right] + 7 the -9 becomes -18
- Taking the number out of the constant as well. Factorise the x^2 and x terms only.
- Reading the turning point with the wrong sign. (x + 2)^2 gives x = -2
- Squaring only the top of a fraction: \left(\frac{5}{2}\right)^2 is \frac{25}{4}, not \frac{25}{2}
- Losing a root when solving. (x + 2)^2 = 7 gives x + 2 = \pm\sqrt{7}
Now try it: Completing the Square practice questions
More on this topic: Completing the Square worksheet with full solutions
Unofficial revision notes written by Teach Me Maths. Not produced or endorsed by AQA.