CSEC Mathematics · algebra
Completing the Square
Before you start
You already know how to expand perfect squares like (x+3)2=x2+6x+9 and factorise expressions by grouping or taking out a common factor.
Builds on: Factorising Algebraic Expressions
1. Completing the Square when a=1
A quadratic expression in standard form looks like x2+bx+c. When we expand the perfect square (x+h)2, we get x2+2hx+h2. Notice that the middle term has a coefficient of 2h, which means h=2b.
To write x2+bx+c as a square:
- Take half of the coefficient of x, giving h=2b.
- Form the bracket (x+h)2.
- Because expanding (x+h)2 produces an unwanted extra term +h2, you must subtract h2 to keep the expression balanced.
- Finally, add your original constant c.
In short:
Worked example
Write x2+8x+5 in the form (x+h)2+k, where h and k are integers.
- Identify b=8 and find half of it: h=28=4.
- Set up the square: (x+4)2. Expanding this gives x2+8x+16, which introduces +16.
- Subtract 16 and bring down the original constant: (x+4)2−16+5.
- Combine the constant terms: −16+5=−11.
Answer: (x+4)2−11
Quick check
When x2−10x+14 is written in the form (x+h)2+k, what is the value of the constant k?
2. Completing the Square when a=1
When the coefficient of x2 is not 1, we cannot simply halve the middle term straight away. Instead, factor out a from the first two terms before completing the square.
Here is the step-by-step method:
- Factorise a out of the x2 and x terms only: a(x2+abx)+c.
- Complete the square inside the bracket: (x+2ab)2−(2ab)2.
- Multiply through by a to remove the outer square bracket.
- Simplify the numerical constants at the end to find k.
Alternatively, you can use the standard formulas h=2ab and k=c−ah2=c−4ab2. Both methods earn full marks in CSEC examinations.
Worked example
Express 3x2+12x−5 in the form a(x+h)2+k, stating the values of a, h, and k.
- Factor out a=3 from the first two terms: 3(x2+4x)−5.
- Complete the square for the expression inside the bracket: half of 4 is 2, so x2+4x=(x+2)2−22=(x+2)2−4.
- Substitute back into the expression: 3[(x+2)2−4]−5.
- Expand the outer bracket by multiplying by 3: 3(x+2)2−12−5.
- Simplify the constants: 3(x+2)2−17.
Answer: 3(x+2)2−17, where a=3, h=2, and k=−17.
Quick check
Express 2x2−12x+7 in the completed-square form a(x+h)2+k.
3. Comparing Coefficients and Working Backwards
Some CSEC questions provide the completed-square form and ask you to find coefficients in the expanded expression, such as x2+px+q=(x+h)2+k.
To solve these:
- Expand the completed square: (x+h)2+k=x2+2hx+(h2+k).
- If there is a number a outside, distribute it: a(x+h)2+k=ax2+2ahx+(ah2+k).
- Equate coefficients: match the coefficient of x on both sides, and match the constant terms.
This comparison technique is also a powerful way to check your work on any completing-the-square problem.
Worked example
Given that x2+px+q=(x−5)2−7, determine the values of the constants p and q.
- Expand (x−5)2: (x−5)(x−5)=x2−10x+25.
- Subtract the constant 7: x2−10x+25−7=x2−10x+18.
- Compare x2−10x+18 directly with x2+px+q.
- Match the coefficient of x: p=−10. Match the constant term: q=18.
Answer: p=−10 and q=18
Quick check
If 2x2+bx+c=2(x+3)2−10, what are the values of b and c?
Common mistakes
- Forgetting to multiply the subtracted term by a: in 2(x2+4x)−1=2[(x+2)2−4]−1, students often write −4−1=−5 instead of 2(−4)−1=−9. Always distribute a to the subtracted square before combining constants.
- Sign errors when halving negative coefficients: for x2−6x+2, the bracket is (x−3)2, not (x+3)2. The sign inside the bracket must match the sign of the x term.
- Squaring a negative incorrectly: (−3)2=+9. Remember that you always subtract this positive square outside the bracket, regardless of whether h is positive or negative.
In the exam
- CSEC awards method marks for factorising out a and identifying h=2ab. Always write out these intermediate steps rather than jumping straight to the final line.
- Check your answer by expanding your completed square form (a(x+h)2+k) back into standard form; it should match the original question exactly.
- Pay attention to the signs in the question. If the question asks for a(x+h)2+k and your answer is 3(x−2)2−5, state clearly that a=3, h=−2, and k=−5.
Key terms
- Completing the square
- An algebraic technique to rewrite a quadratic expression from ax2+bx+c into the vertex form a(x+h)2+k.
- Perfect square
- An algebraic expression that results from squaring a binomial, such as (x+3)2=x2+6x+9.
- Equating coefficients
- Setting the coefficients of matching powers of x equal to each other on both sides of an algebraic identity.
Practice
Easier to harder. Use paper for your working.
Practice 1
Write x2+6x−4 in the form (x+h)2+k.
Practice 2
The quadratic expression 2x2+8x+1 is written in the form a(x+h)2+k. What is the value of k?
Practice 3
Which of the following represents −2x2+12x−10 written in the form a(x+h)2+k?
Now try real past-paper questions
3 Paper 2 questions on this topic. Quelpr marks your working point by point, like an examiner.
- Mathematics Q8 8(b)(i) · 3 marksThe function f is defined as f(x) = 4x^2 - 8x - 2. Express f(x) in the form a(x + h)^2 + k, where a, h and k are constants.
- Mathematics Q2 2(e) · 2 marksGiven that x² + ax + b = (x + 2)² – 3, work out the values of a and b.
- Mathematics Q9 9(b)(iii) · 3 marksA diagram shows the graph of the function f(x) = x² - 6x + 8 for values of x from 0 to 6. Write x² - 6x + 8 in the form a(x + h)² + k where a, h and k are constants.
Finished the lesson?
0 of 6 checks right on this device.
Read more
- Collins - Concise Revision Course for CSEC Mathematics, p. 171
- Mathematics for CSEC, p. 217
- CSEC Maths Study Guide - Maths Crash Course, pp. 151, 152, 154
- CXC Study Guide - Mathematics for CSEC, p. 95