Sub topic 14
Completing the Square
Completing the square rewrites a quadratic as a squared binomial plus or minus a constant. This method is useful when factoring is difficult, when you need the vertex of a parabola, or when a GRE question asks for exact roots.
Assume you can solve linear equations and find square roots of perfect squares. You should also know the identity:
(a + h)^2 = a^2 + 2ah + h^2
The Basic Process
For an equation in the form
x^2 + bx + c = 0
first move the constant to the other side:
x^2 + bx = -c
Then add the square of half the coefficient of x to both sides:
x^2 + bx + (b/2)^2 = -c + (b/2)^2
The left side is now a perfect square.
Worked Example
Solve x² + 6x - 7 = 0.
Move the constant:
x² + 6x = 7
Half of 6 is 3, and 3² is 9. Add 9 to both sides:
x² + 6x + 9 = 16
The left side factors as (x + 3)²:
(x + 3)² = 16
Take both square roots:
x + 3 = 4 or x + 3 = -4
Therefore:
x = 1 or x = -7
The two solutions must both be included. Taking only the positive square root would lose one solution.
When the Leading Coefficient Is Not 1
For 2x² + 8x - 10 = 0, divide every term by 2 first:
x² + 4x - 5 = 0
Then complete the square:
x² + 4x = 5 x² + 4x + 4 = 9 (x + 2)² = 9 x + 2 = 3 or x + 2 = -3
Thus, x = 1 or x = -5.
GRE Strategy and Common Errors
Completing the square is often efficient when the x coefficient is even and the resulting square is obvious. If the quadratic factors immediately, factoring is usually faster. If the numbers are awkward, the quadratic formula may be safer.
Watch for these errors:
- Forgetting to divide by the leading coefficient first.
- Using b² instead of (b/2)².
- Taking only one square root.
- Losing a negative sign when moving the constant.
- Continuing when the resulting square equals a negative number. That equation has no real solution.
def complete_square_roots(b, c):
# Solve x**2 + b*x + c = 0 when the completed square is nonnegative.
value = (b / 2) ** 2 - c
if value < 0:
return []
root = value ** 0.5
return sorted([-b / 2 - root, -b / 2 + root])
print(complete_square_roots(6, -7)) # [-7.0, 1.0]Exercise
Solve x² - 10x + 21 = 0 by completing the square.
Show answer
x² - 10x = -21; add 25: (x - 5)² = 4; therefore x = 3 or x = 7.