Understanding Completing the Square
Completing the square rewrites a quadratic ax² + bx + c as a perfect-square expression, a(x − h)² + k. This "vertex form" instantly shows the parabola's turning point (h, k) and provides a clean, mechanical way to solve for the roots without memorizing the quadratic formula separately — in fact, completing the square is exactly how the quadratic formula is derived.
The general formula
For any quadratic ax² + bx + c with a ≠ 0:
- Factor out a from the x² and x terms: a(x² + (b/a)x) + c.
- Add and subtract the completing term (b/2a)² inside the parentheses to build a perfect-square trinomial.
- Rewrite in vertex form: a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a).
- Discriminant: b² − 4ac determines the roots — positive gives two real roots, zero gives one repeated root, negative gives two complex roots.
Worked example with the default values
For x² + 6x + 5 (a = 1, b = 6, c = 5): the completing term is (6/2)² = 9. Adding and subtracting 9 gives x² + 6x + 9 − 9 + 5 = (x + 3)² − 4. So h = −3, k = −4, and the vertex form is (x + 3)² − 4. Since the discriminant is 6² − 4(1)(5) = 16 (positive), setting (x + 3)² − 4 = 0 gives (x + 3)² = 4, so x + 3 = ±2, meaning x = −1 or x = −5.
Solving for the roots
Once in vertex form, set a(x − h)² + k = 0 and isolate the square: (x − h)² = −k/a. If −k/a is zero or positive, take the square root of both sides and solve for x = h ± √(−k/a). This is algebraically identical to the quadratic formula x = (−b ± √(b² − 4ac)) / (2a) — completing the square is simply the derivation of that formula written out with your specific numbers.