How to Solve Quadratic Equations by Completing the Square

Completing the square rewrites a quadratic such as x² + 6x + 8 into the form (x + p)² + q, which lets you solve equations exactly and read a parabola’s vertex straight off the equation. This Edexcel IGCSE Maths guide works through the method step by step, for a = 1 and for a larger coefficient, then uses it to solve and to graph, with worked examples and free auto-marked practice questions below.

Prior Knowledge This page requires confidence with expanding double brackets and solving linear equations.

Core Ideas of Completing the Square

Start with the Quadratic
Begin with the standard form \( ax^2 + bx + c \).
Halve it
Take half of the x-coefficient \( \tfrac{b}{2} \).
Square it
Square that half to get \( \bigl(\tfrac{b}{2}\bigr)^2 \).
Take it away
Add and subtract the same square to form a perfect square bracket.

What does "Completing the Square" produce?

We aim to write a quadratic as \( a(x+p)^2 + q \). For solving, arrange to \( (x+p)^2 = q \). When \( a\ne1 \), factor \( a \) from the \( x^2 \) and \( x \) terms only and complete the square inside the bracket.

Completing the Square: Step by Step

Each step is shown applied to \(x^2 + 6x + 8\).

  1. Halve the x-coefficient. Divide the coefficient of \(x\) by 2.
    \(6 \div 2 = 3\)

    This gives the number that goes inside the bracket with \(x\).

  2. Write the squared bracket. Use the halved value inside \((x + \square)^2\). Expanding it shows the hidden constant.
    \((x + 3)^2 = x^2 + 6x + 9\)

    The bracket reproduces the \(x^2\) and \(6x\) terms, but it also creates a \(+9\).

  3. Subtract the square you added. \((x+3)^2\) contains a \(+9\) that wasn't in the original; subtract it straight away.
    \((x + 3)^2 - 9\)

    This keeps the expression equivalent to the original \(x^2 + 6x\).

  4. Bring in the original constant. Add the constant term from the original quadratic to finish.
    \((x + 3)^2 - 9 + 8 = (x + 3)^2 - 1\)

    Combine \(-9 + 8 = -1\) to get the final completed-square form.

General result (\(a = 1\)) \[x^2 + bx + c = \left(x + \tfrac{b}{2}\right)^2 - \left(\tfrac{b}{2}\right)^2 + c\]
When \(a \ne 1\): add one step before starting. Factor \(a\) out of the \(x^2\) and \(x\) terms only: \(ax^2 + bx + c = a\!\left(x^2 + \tfrac{b}{a}x\right) + c\). Then apply the four steps above to the expression inside the bracket, and finally multiply \(a\) back through the constants.

Worked Examples

💡 Example 1: Solve by completing the square

Solve \( x^2 + 6x + 5 = 0 \).

\[ \begin{aligned} x^2+6x+5&=0\\[4pt] x^2+6x&=-5\\[4pt] x^2+6x+9&=-5+9\\[4pt] (x+3)^2&=4\\[4pt] x+3&=\pm2\\[4pt] x&=-3\pm2\\[4pt] x&=-1,\,-5 \end{aligned} \]
What's happening?

Move the constant to the right-hand side.

Halve the x-coefficient: \(6 \div 2 = 3\). Square it: \(3^2 = 9\). Add 9 to both sides.

The left side is now a perfect square.

Square-root both sides (remember \(\pm\)).

Subtract 3 from each value to find the two solutions.

💡 Example 2: \( a\ne1 \), factor first

Solve \( 2x^2 + 8x + 6 = 0 \).

\[ \begin{aligned} 2x^2+8x+6&=0\\[4pt] 2(x^2+4x)+6&=0\\[4pt] 2\!\left((x+2)^2-4\right)+6&=0\\[4pt] 2(x+2)^2-8+6&=0\\[4pt] 2(x+2)^2-2&=0\\[4pt] (x+2)^2&=1\\[4pt] x+2&=\pm1\\[4pt] x&=-1,\,-3 \end{aligned} \]
What's happening?

Factor \(2\) from the \(x^2\) and \(x\) terms only; the \(+6\) stays outside.

Inside the bracket: halve \(4 \to 2\), square \(2 \to 4\). Write \((x+2)^2 - 4\).

Expand the \(2\) across the constants: \(2 \times (-4) = -8\).

Combine: \(-8 + 6 = -2\). Then isolate \((x+2)^2\).

Square-root both sides and solve.

Using Completing the Square for Graphing

Write \( ax^2+bx+c \) as \( a(x+p)^2+q \). The vertex is \((-p,\,q)\); axis of symmetry \( x=-p \). If \( a>0 \) the graph opens up; if \( a<0 \) it opens down.

x y -2 -1 1 2 3 4 5 5 4 3 2 1 -1 -2 -3 -4 0 x = 2 (2, -3) (0, 1) y = (x - 2)² - 3
The completed-square form y = (x - 2)² - 3 reveals the vertex at (2, -3) and the axis of symmetry x = 2 directly from the equation.

💡 Example 3: Rewrite for graphing

\[ \begin{aligned} y&=x^2-4x+1\\ &=(x^2-4x+4)-4+1\\ &=(x-2)^2-3 \end{aligned} \]

Vertex \((2,-3)\); axis \(x=2\); opens up since \(a=1>0\).

💡 Example 4: \( a\ne1 \)

\[ \begin{aligned} y&=-3x^2+12x+5\\ &=-3(x^2-4x)+5\\ &=-3\!\left((x-2)^2-4\right)+5\\ &=-3(x-2)^2+17 \end{aligned} \]

Vertex \((2,17)\); axis \(x=2\); opens down since \(a=-3<0\).

🔑 Key Points

  • Mantra: halve it, square it, take it away.
  • When \( a\ne1 \), factor \( a \) from \( x^2 \) and \( x \) first.
  • Solving: once \((x+p)^2=q\), write \( x=-p\pm\sqrt{q} \).
  • Graphing: \( a(x+p)^2+q \) gives vertex \((-p,q)\) and axis \(x=-p\).
  • Keep one equals per line for method marks.

⚠️ Ways it Can Appear in an Exam

  • Rewrite \( ax^2+bx+c \) in completed-square form.
  • Show that \( ax^2+bx+c \) can be written as \( a(x+p)^2+q \).
  • Solve a quadratic by completing the square.
  • Find vertex and axis by completing the square.
  • Choose a parameter so an equation has one, two, or no real roots.
  • Match equations to sketches by comparing \( a,p,q \).
⇩ Jump to Practice Questions ⇩

Build speed and accuracy on completing the square in both the solving and graphing forms.

Next: The Quadratic Formula

Completing the Square: Practice Rooms

Randomly generated, auto-marked practice in completing the square for Edexcel IGCSE Maths. Rooms 1 to 3 ask for the completed-square form \(a(x+p)^2+q\) (with a = 1, then a not equal to 1, then a fractional value of p); Room 4 asks you to solve a quadratic using that form. Every grid gives 16 fresh questions. Type a square with the x² button or by typing ^2; as you type, your answer is shown in the box as real maths with a raised index. Each correct answer adds to your global streak.

Correct 0
Re-attempts 0
🔥 Streak 0
🏆 Best 0

Rooms 1 to 3: write the completed-square form, for example (x+3)^2-1 or 2(x+2)^2-2. Room 4: give both solutions separated by a comma, for example -1,-5. Order does not matter.