Allday Education

Completing the Square

Completing the square rewrites a quadratic so one side becomes a perfect square trinomial — something that factors as (x+p)2(x + p)^2. Once it is a perfect square, you can solve by taking the square root of both sides.

The heart of the method is one number: to complete x2+bxx^2 + bx, you add (b2)2\left(\dfrac{b}{2}\right)^2. That is the value that makes the trinomial fold up into a perfect square.

The number that completes the square

Take half of the coefficient of xx, then square it. For x2+6xx^2 + 6x, half of 66 is 33, and 32=93^2 = 9.

Adding 99 makes x2+6x+9x^2 + 6x + 9, which factors as (x+3)2(x + 3)^2. That (b2)2\left(\dfrac{b}{2}\right)^2 is the number you always add.

Solving by completing the square

Move the constant to the other side, add (b2)2\left(\dfrac{b}{2}\right)^2 to both sides, and the left side becomes a perfect square. Then take the square root of both sides, remembering the plus-or-minus.

Keep the equation balanced — whatever you add on the left, add on the right too. Finish by solving the two resulting equations for xx.

Worked examples

Example 1: finding the number

What number completes the square for x2+8xx^2 + 8x?

Half the middle coefficient82=4\dfrac{8}{2} = 4
Square it42=164^2 = 16

Answer: 1616

Example 2: solving a quadratic

Solve x2+6x=7x^2 + 6x = 7 by completing the square.

Add (b/2) squared to both sidesx2+6x+9=7+9x^2 + 6x + 9 = 7 + 9
Factor the perfect square(x+3)2=16(x + 3)^2 = 16
Take the square rootx+3=±4x + 3 = \pm 4
Solve bothx=1 or x=7x = 1 \text{ or } x = -7

Answer: x=1x = 1 or x=7x = -7

Example 3: a coefficient on x squared

Solve 2x2+8x=102x^2 + 8x = 10 by completing the square.

Divide every term by 2 so x squared stands alonex2+4x=5x^2 + 4x = 5
Add (b/2) squared to both sidesx2+4x+4=5+4x^2 + 4x + 4 = 5 + 4
Factor the perfect square(x+2)2=9(x + 2)^2 = 9
Take the square rootx+2=±3x + 2 = \pm 3
Solve bothx=1 or x=5x = 1 \text{ or } x = -5

Answer: x=1x = 1 or x=5x = -5

Try one yourself

Common questions

What number do I add to complete the square?

Half of the x-coefficient, squared: (b2)2\left(\dfrac{b}{2}\right)^2. For x2+6xx^2 + 6x that is 32=93^2 = 9.

Why do I add it to both sides?

To keep the equation balanced. Adding the number only to the left would change the equation; adding it to both sides preserves equality while making the left a perfect square.

What if there is a coefficient on x squared?

Divide every term by that coefficient first so the x2x^2 term stands alone, then complete the square on the result.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1