Solve Quadratic by Completing the Square: Step-by-Step Guide
Completing the square is a way to rewrite a quadratic equation so it looks like (x + h)^2 = k. Then you can solve it by taking the square root of both sides. The trick is to add (b/2)^2 to both sides so that one side becomes a perfect square. This method works on every quadratic equation, and it is where the quadratic formula comes from.
Math Racer skill guide · Algebra 1 · Grade 9
How to solve it, step by step
- Make the number in front of x^2 equal 1. If a is not 1, divide every term by a. Then move the plain number to the right side.\[x^2 + \tfrac{b}{a}x = -\tfrac{c}{a}\]
- Add (b/2)^2 to both sides. Take half of the number in front of x, square it, and add that to both sides of the equation.\[x^2 + bx + \left(\tfrac{b}{2}\right)^2 = -c + \left(\tfrac{b}{2}\right)^2\]
- Write the left side as a square. The left side is now a perfect square. Write it as (x + b/2)^2.\[\left(x + \tfrac{b}{2}\right)^2 = k\]
- Take the square root of both sides. Take the square root of both sides. On the right side, put a plus-or-minus sign (+/-), because both a positive and a negative number work.\[x + \tfrac{b}{2} = \pm\sqrt{k}\]
- Solve for x. Subtract b/2 from both sides to get x alone. This gives you your two solutions.\[x = -\tfrac{b}{2} \pm \sqrt{k}\]
Worked example
Solve x^2 + 6x - 7 = 0 by completing the square.
Step 1: Move the 7 to the right: x^2 + 6x = 7. The number in front of x^2 is already 1.
Step 2: Half of 6 is 3, and 3^2 = 9. Add 9 to both sides: x^2 + 6x + 9 = 7 + 9 = 16.
Step 3: The left side is a perfect square: (x + 3)^2 = 16.
Step 4: Take the square root of both sides: x + 3 = +/- 4.
Step 5: Solve: x = -3 + 4 = 1, or x = -3 - 4 = -7.
Check: For x = 1: 1 + 6 - 7 = 0. For x = -7: 49 - 42 - 7 = 0. Both work.
Tips and common mistakes
- Get the x^2 and x terms on one side and the plain number on the other before you start.
- If a is not 1, divide the whole equation by a first. Do not divide only the x^2 term.
- Take half of b first, then square it. The half is the number that goes inside the parentheses.
- Whatever you add to one side, you must add to the other side.
- Do not forget the plus-or-minus when you take the square root. That is what gives you two answers.
- If the right side turns out negative, there are no real solutions, because you cannot take the square root of a negative number.
- Completing the square is also how you turn y = ax^2 + bx + c into vertex form, y = a(x - h)^2 + k.