Sub topic 15
Completing the Square
This chapter assumes you can recognize and factor perfect square trinomials, solve equations with the square root method, and do fraction arithmetic. It builds directly on those three skills.
What completing the square does
The square root method solves equations like (x + 3)² = 16. Most quadratics are not written that way. Completing the square rewrites any quadratic into that form without changing its solutions.
The key fact comes from the perfect square identity:
(x + h)² = x² + 2hx + h²
Compare x² + bx with the first two terms. Here b = 2h, so h = b/2. The missing third term is h² = (b/2)². Adding (b/2)² turns x² + bx into the perfect square (x + b/2)².
The procedure
For an equation ax² + bx + c = 0:
- Divide every term by a so the x² coefficient is 1.
- Move the constant to the right side.
- Take half of the x coefficient, square it, and add the result to both sides.
- Factor the left side as (x + b/2)² and simplify the right side.
- Apply the square root method, remembering both signs.
Worked examples
Leading coefficient 1
Solve x² + 6x − 7 = 0.
- Move the constant: x² + 6x = 7.
- Half of 6 is 3, and 3² = 9. Add 9 to both sides: x² + 6x + 9 = 16.
- Factor: (x + 3)² = 16.
- Take roots: x + 3 = ±4, so x = 1 or x = −7.
Check x = 1: 1 + 6 − 7 = 0. Check x = −7: 49 − 42 − 7 = 0.
Leading coefficient other than 1
Solve 2x² − 8x − 10 = 0.
- Divide by 2: x² − 4x − 5 = 0.
- Move the constant: x² − 4x = 5.
- Half of −4 is −2, and (−2)² = 4. Add 4 to both sides: x² − 4x + 4 = 9.
- Factor: (x − 2)² = 9, so x − 2 = ±3.
- The solutions are x = 5 or x = −1.
Odd coefficient and irrational roots
Solve x² + 3x − 1 = 0.
- Move the constant: x² + 3x = 1.
- Half of 3 is 3/2, and its square is 9/4. Add 9/4 to both sides: x² + 3x + 9/4 = 13/4.
- Factor: (x + 3/2)² = 13/4.
- Take roots: x + 3/2 = ±√13/2, so x = (−3 ± √13)/2.
This equation does not factor over the integers, which is when completing the square is most useful.
Vertex form and minimum values
Completing the square also rewrites an expression, not just an equation. This version has no right side, so you add and subtract the same amount instead.
x² − 6x + 11 = (x² − 6x + 9) + 11 − 9 = (x − 3)² + 2
Since (x − 3)² is never negative, the expression is at least 2. It reaches 2 only at x = 3. In general, a(x − h)² + k has its extreme value k at x = h. The extreme is a minimum when a > 0 and a maximum when a < 0.
This is the fastest way to settle a quantitative comparison question. Suppose Quantity A is x² − 6x + 11 and Quantity B is 1, for any real x. Quantity A is always at least 2, so Quantity A is greater.
Checking with code
The function below computes h and k for a(x − h)² + k exactly, using fractions to avoid rounding.
from fractions import Fraction
def complete_square(a, b, c):
# Rewrite a*x**2 + b*x + c as a*(x - h)**2 + k.
a, b, c = Fraction(a), Fraction(b), Fraction(c)
h = -b / (2 * a)
k = c - b * b / (4 * a)
return h, k
for a, b, c in [(1, -6, 11), (2, -8, -10), (1, 3, -1)]:
h, k = complete_square(a, b, c)
for x in [-3, 0, 2, 5]:
assert a * x ** 2 + b * x + c == a * (x - h) ** 2 + k
print((a, b, c), "-> h =", h, "k =", k)The outputs are h = 3, k = 2 for the first case, h = 2, k = −18 for the second, and h = −3/2, k = −13/4 for the third. Each agrees with the hand work above. For example, 2(x − 2)² − 18 = 0 gives (x − 2)² = 9.
Where the quadratic formula comes from
Apply the same steps to ax² + bx + c = 0 with letters in place of numbers. Dividing by a gives x² + (b/a)x = −c/a. Adding (b/2a)² to both sides gives
(x + b/2a)² = (b² − 4ac) / (4a²)
Taking roots and solving for x gives x = (−b ± √(b² − 4ac)) / 2a. The next chapter uses this result, so you do not need to memorize a separate derivation. The quantity under the root, b² − 4ac, is the discriminant. It tells you whether the right side is positive, zero, or negative.
Common errors
| Error | Example | Correction |
|---|---|---|
| Adding to one side only | x² + 6x = 7 becomes x² + 6x + 9 = 7 | Add 9 to both sides, giving 16 on the right |
| Squaring b instead of b/2 | Adding 36 for x² + 6x | Half first (3), then square (9) |
| Skipping the division by a | Completing 2x² − 8x with 4 | Divide by 2 first, then complete x² − 4x |
| Losing the minus sign | (x − 2)² written as (x + 2)² | The sign inside matches the sign of b |
| Dropping the ± | x + 3 = 4 only | Also solve x + 3 = −4 |
Exercises
Exercise
Solve x² − 10x + 3 = 0 by completing the square. Give exact answers.
Show answer
Move the constant: x² − 10x = −3. Half of −10 is −5, and its square is 25. Add 25 to both sides: (x − 5)² = 22. So x = 5 ± √22.
Exercise
For all real x, what is the minimum value of 3x² + 12x + 20, and at what x does it occur?
Show answer
Factor 3 from the x terms: 3(x² + 4x) + 20. Add 4 inside the parentheses, which adds 12, so subtract 12: 3(x + 2)² + 20 − 12 = 3(x + 2)² + 8. The minimum value is 8, at x = −2.
Exercise
Quantity A is x² + 8x + 20. Quantity B is 4. Both are evaluated for any real x. Which quantity is greater?
Show answer
Complete the square: x² + 8x + 20 = (x + 4)² + 4. Since (x + 4)² is at least 0, Quantity A is at least 4. It equals 4 when x = −4, so the quantities can be equal, and Quantity A is never smaller. The answer is that the quantities are not always related the same way only if the question allows other values. Here, Quantity A is greater than or equal to Quantity B for every real x, with equality at x = −4, so the relationship cannot be determined as "A greater" in all cases. The correct GRE choice is that the two quantities are not always equal and not always unequal in one direction, so choose "cannot be determined".