Learn
Lesson · Quadratics and Complex Numbers · Solving quadratics

Completing the Square

Adding the square of half the coefficient of x turns x² + bx into a perfect square. That one move converts any quadratic into a form the square root property can finish, and carried out on ax² + bx + c = 0 with letters instead of numbers it is the proof of the quadratic formula.

x² + bx + (b/2)² = (x + b/2)² halve b, then square it x² + 6x = 7 add (6/2)² = 9 to BOTH sides x² + 6x + 9 = 16 the left side is now a square (x + 3)² = 16 → x + 3 = ±4 → x = 1 or x = -7
The constant, and what it buys

Core ideas

What this lesson establishes

One number does all the work: half the coefficient of x, squared. The rest of the lesson is bookkeeping about where that number is allowed to go.

1

Half, then square, in that order

(x + p)² = x² + 2px + p², so the coefficient of x is 2p and the constant is p². Given a coefficient b, the number p is b/2 and the constant is (b/2)² = b²/4. Squaring first and halving afterwards gives b²/2, which is a different number for every b except 0.

2

Adding to both sides is legal; adding to one side is not

In an equation you may add 9 to both sides, and that is exactly what this method does. In an expression there are no sides, so you add 9 and subtract 9 in the same place, for a net change of nothing. The two versions look different on the page and are the same idea.

3

It always works

Factoring needs cooperative coefficients. This does not. Every quadratic completes, including the ones whose answers are irrational and the ones with no real solution at all — those end at a negative number on the right, and the square root property reports that honestly.

The material

Manufacturing a perfect square

Where the constant comes from, the procedure on an equation, the extra step when a is not 1, and the difference between an equation and an expression.

“The Square Root Property” solves (x - h)² = k in two lines. Completing the square is the process that puts an arbitrary quadratic into that shape, so that those two lines are always available.

The constant that completes the square

(x + p)² = x² + 2px + p² so if the coefficient of x is b = 2p, then p = b/2 and the constant needed is p² = (b/2)²

In words: halve the coefficient of x, then square it. For x² + 6x the coefficient is 6, half of it is 3, and 3² = 9, so x² + 6x + 9 is a perfect square and equals (x + 3)². The sign looks after itself: for x² - 5x half of -5 is -5/2, its square is 25/4, which is positive, and the minus survives inside the bracket as (x - 5/2)². The constant added is always non-negative, because it is a square; it is 0 only when the linear coefficient is already 0.

Solving an equation

x² + 6x - 7 = 0 x² + 6x = 7 move the constant to the right x² + 6x + 9 = 7 + 9 add 9 to BOTH sides (x + 3)² = 16 the left side is now a square x + 3 = ±4 square root property, “The Square Root Property” x = 1 or x = -7

The + 9 on the right is what keeps the equation true. Adding 9 to the left alone would produce a different equation with different solutions, and the fact that its left side factors more nicely would be no consolation at all.

When the leading coefficient is not 1

The identity (x + p)² = x² + 2px + p² has a leading coefficient of 1 in it, and says nothing about 2x² + 8x. So a has to go first. In an equation, divide every term by a — always legal, because a ≠ 0 is part of the definition.

2x² + 8x - 10 = 0 x² + 4x - 5 = 0 divide every term by 2 x² + 4x = 5 x² + 4x + 4 = 5 + 4 half of 4 is 2, and 2² = 4 (x + 2)² = 9 x + 2 = ±3 x = 1 or x = -5 check 2(1) + 8(1) - 10 = 0 2(25) - 40 - 10 = 0

Fractions are normal

x² - 5x + 3 = 0 x² - 5x = -3 x² - 5x + 25/4 = -3 + 25/4 half of -5 is -5/2, and (-5/2)² = 25/4 (x - 5/2)² = 13/4 -3 + 25/4 = -12/4 + 25/4 = 13/4 x - 5/2 = ±√13 / 2 √(13/4) = √13 / 2 x = (5 ± √13) / 2

Nothing guarantees that b is even, and fractions arriving here are not a sign that something has gone wrong. They are what the method produces whenever b is odd, and (5 ± √13)/2 is the exact answer. A quadratic that completes to a negative number on the right, such as (x - 1)² = -2/3, has no real solution, and that is a finished answer too.

An expression has no sides

Completing the square on x² + 6x + 1, where there is no equals sign, cannot be done by adding 9 to both sides — there is only one side. Instead add 9 and subtract 9 in the same expression, which changes its value nowhere:

x² + 6x + 1 = (x² + 6x + 9) - 9 + 1 add 9 and subtract 9 = (x + 3)² - 8 check at x = 0: 0 + 0 + 1 = 1 and (0 + 3)² - 8 = 9 - 8 = 1 check at x = 1: 1 + 6 + 1 = 8 and (1 + 3)² - 8 = 16 - 8 = 8

Interactive

Completing the square

Every step, on the quadratic you chose

Quadratic
the curverootsvertex

Method

Completing the square on an equation

Four steps, and the order is not negotiable: step 1 always precedes step 3.

1

Divide every term by a, if a is not 1

The identity being used assumes a leading coefficient of 1. Dividing is legal because a ≠ 0, and any fractions it produces should be carried exactly rather than rounded.

2

Move the constant to the other side

You want x² + bx alone on the left, with nothing added to it, so that there is room for the constant that completes it.

3

Add (b/2)² to both sides

Halve the coefficient of x, square it, and write it on both sides in the same line. Then write the left side as (x + b/2)² immediately, before the arithmetic on the right has a chance to distract you.

4

Finish with the square root property, then check

(x + b/2)² = k gives x + b/2 = ±√k. A negative k means no real solution, and the work is over. Otherwise simplify the radical, solve, and substitute both answers into the original equation.

Completing the square

Score 0 / 0

Four completions, one of each kind

An even b, an odd b, a leading coefficient to clear, and one that ends negative.

A. x² + 6x - 7 = 0 x² + 6x = 7 x² + 6x + 9 = 7 + 9 half of 6 is 3; 3² = 9 (x + 3)² = 16 x + 3 = ±4 x = 1 or x = -7 check 1 + 6 - 7 = 0 49 - 42 - 7 = 0 B. x² - 5x + 3 = 0 x² - 5x = -3 x² - 5x + 25/4 = -3 + 25/4 half of -5 is -5/2; (-5/2)² = 25/4 (x - 5/2)² = 13/4 -12/4 + 25/4 = 13/4 x - 5/2 = ±√13 / 2 x = (5 ± √13) / 2 C. 2x² + 8x - 10 = 0 x² + 4x - 5 = 0 divide every term by 2 x² + 4x = 5 x² + 4x + 4 = 5 + 4 half of 4 is 2; 2² = 4 (x + 2)² = 9 x = -2 ± 3 → x = 1 or x = -5 check 2(1) + 8(1) - 10 = 0 2(25) - 40 - 10 = 0 D. 3x² - 6x + 5 = 0 x² - 2x + 5/3 = 0 divide every term by 3 x² - 2x = -5/3 x² - 2x + 1 = -5/3 + 1 half of -2 is -1; (-1)² = 1 (x - 1)² = -2/3 -5/3 + 3/3 = -2/3 no real solution

B is the general case and A is the lucky one. Half of an odd number is a fraction, its square has a 4 underneath, and the right-hand side then needs a common denominator. None of that is a mistake; it is what the method does. “The Quadratic Formula” performs exactly this arithmetic once, with letters, so that it never has to be performed again.

D stopped at (x - 1)² = -2/3, and that was the complete answer. No real number squares to a negative, so there is nothing further to try. The method reported the absence of a real solution; it did not fail to find one.

For a faded non-monic completion, solve 3x² + 6x - 1 = 0. The supplied first move is to divide every term by 3; after moving the constant, decide what completes x² + 2x. Finish in exact form and check the completed square. Compare with x = -1 ± 2√3/3; adding 9 instead of 1 means the coefficient was completed before the division by a.

Common mistakes

1
Adding the constant to one side of an equation onlyx² + 6x = 7 becomes x² + 6x + 9 = 16, not x² + 6x + 9 = 7. The second is a different equation, with solutions -3 ± √7, and they are not the ones you were asked for.
2
Completing before dividing by aFor 3x² + 12x - 2 = 0 the coefficient to halve is 4, not 12. The identity x² + bx + (b/2)² = (x + b/2)² describes a monic quadratic, and using it on 3x² + 12x applies a theorem outside its hypotheses.
3
Losing the subtracted constant when rewriting an expressionx² + 6x + 1 is (x + 3)² - 8, not (x + 3)² + 1. Adding 9 inside the square has to be paid for outside it, and one substitution settles it: at x = 0 the original is 1, the correct form gives 1, and the version without the -9 gives 10.

Check your understanding

✓
Finish when an odd b does not slow you down.

Take a quadratic with a ≠ 1 and an odd b, complete the square in exact fractions, and finish with the square root property. If you can do that reliably you can also derive the quadratic formula, which is the subject of “The Quadratic Formula” and is this procedure carried out once on ax² + bx + c = 0.

Note: This is the most valuable procedure in the course, and it pays twice. Run it on ax² + bx + c = 0 and it produces the quadratic formula, in “The Quadratic Formula”. Run it on y = ax² + bx + c, using the add-and-subtract form so that the left side stays as y, and it produces the vertex, in “Vertex Form and the Axis of Symmetry”.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.