Algebra
Quadratic equations and functions
Completing the square
20 practice questions
2 video lessons
Theory + worked examples
Theory
Completing the square turns \(x^2+bx\) into a perfect square by adding \(\left(\dfrac{b}{2}\right)^2\):
\[x^2+bx+\left(\dfrac{b}{2}\right)^2=\left(x+\dfrac{b}{2}\right)^2.\]
This gives vertex form and lets you solve by square roots.
Add and subtract \((b/2)^2\) so the value stays the same.
Vertex form exposes the vertex \((-3,-4)\).
Completing the square.
The key step:
\[x^2+bx+\left(\dfrac{b}{2}\right)^2=\left(x+\dfrac{b}{2}\right)^2\]
Take \(\pm\) the root to solve after completing the square.
How to complete the square
- Move the constant to the right side.
- Add \((b/2)^2\) to both sides.
- Write the left side as a perfect square.
- Take the \(\pm\) square root and solve.
Example 1 — To vertex form
Write \(x^2+6x+5\) in vertex form.
Solution
Half of \(6\) is \(3\); add and subtract \(9\).
| \((x^2+6x+9)-9+5\) | \(=\) | \((x+3)^2-4\) |
Example 2 — Solve
Solve \(x^2+6x+5=0\) by completing the square.
Solution
Rewrite and take roots.
| \((x+3)^2\) | \(=\) | \(4\) |
| \(x+3\) | \(=\) | \(\pm2\) |
| \(x\) | \(=\) | \(-1\ \text{or}\ -5\) |
Example 3 — Odd b
Complete the square on \(x^2+4x\).
Solution
Add \((4/2)^2=4\).
| \(x^2+4x+4\) | \(=\) | \((x+2)^2\) |
Example 4 — Find the vertex
Find the vertex of \(y=x^2+6x+5\).
Solution
Vertex form is \((x+3)^2-4\).
| \(\text{vertex}\) | \(=\) | \((-3,-4)\) |
Common pitfalls
Add and subtract \((b/2)^2\) to keep the value.
Half of \(b\), then square — in that order.
Include \(\pm\) when taking the root.
Frequently asked questions
What is completing the square?
Adding \((b/2)^2\) to form a perfect square trinomial.
What form does it produce?
Vertex form, \(a(x-h)^2+k\).
Complete the square on \(x^2+8x\).
\((x+4)^2-16\).
How do you solve after completing the square?
Take the \(\pm\) square root.
← Previous subtopic
Solving quadratic equations by square roots
Next subtopic →
The quadratic formula
More in Quadratic equations and functions