When factoring a quadratic is awkward, completing the square is the method that always works. It rewrites a quadratic into a form like (xh)2+k(x - h)^2 + k, which makes the graph easier to read and gives a reliable way to solve quadratic equations by taking square roots.

The core identity, when the quadratic part starts with x2+bxx^2 + bx, is:

x2+bx=(x+b2)2(b2)2x^2 + bx = \left(x + \frac{b}{2}\right)^2 - \left(\frac{b}{2}\right)^2

You add the exact term needed to make a square, then subtract the same term so the value stays unchanged.

When To Reach For This Method

You will usually use completing the square when you need to:

  1. Solve a quadratic that does not factor nicely
  2. Rewrite a quadratic into vertex form
  3. Find the maximum or minimum value of a quadratic function
  4. Understand where the quadratic formula comes from

A perfect square trinomial comes from squaring a binomial:

(x+p)2=x2+2px+p2\left(x + p\right)^2 = x^2 + 2px + p^2

or

(xp)2=x22px+p2\left(x - p\right)^2 = x^2 - 2px + p^2

Completing the square means rewriting part of a quadratic so it matches one of those patterns exactly. The fast rule is: in x2+bxx^2 + bx, take half of bb, then square it. That gives the needed constant (b2)2\left(\frac{b}{2}\right)^2.

The Steps

1. Isolate the quadratic part

Keep the x2x^2 and xx terms together. If the quadratic starts as ax2+bx+cax^2 + bx + c with a1a \ne 1, factor aa out of the x2x^2 and xx terms first, because the half-then-square shortcut applies directly only after the quadratic part has leading coefficient 11.

2. Half the linear coefficient, then square

In x2+bxx^2 + bx, take b/2b/2 and square it. Adding (b2)2\left(\frac{b}{2}\right)^2 to x2+bxx^2 + bx gives

x2+bx+(b2)2=(x+b2)2x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2

3. Add and balance

Add that value and subtract the same amount so the expression stays equal:

x2+bx=(x+b2)2(b2)2x^2 + bx = \left(x + \frac{b}{2}\right)^2 - \left(\frac{b}{2}\right)^2

You are not changing the quantity, only the form.

4. Rewrite the square and simplify

Turn the trinomial into a square such as (x+3)2(x + 3)^2 and combine the constants.

A Full Worked Example: Rewrite And Solve x2+6x+5=0x^2 + 6x + 5 = 0

Start with

x2+6x+5x^2 + 6x + 5

Focus on x2+6xx^2 + 6x. Half of 66 is 33, and 32=93^2 = 9, so 99 is the term that completes the square. Add and subtract 99:

x2+6x+5=x2+6x+99+5x^2 + 6x + 5 = x^2 + 6x + 9 - 9 + 5

Group the square and simplify:

=(x+3)24= \left(x + 3\right)^2 - 4

Now the structure is clear. The vertex is (3,4)(-3, -4), so the graph reaches its minimum when x=3x = -3.

To solve x2+6x+5=0x^2 + 6x + 5 = 0, set the rewritten form equal to zero:

(x+3)24=0\left(x + 3\right)^2 - 4 = 0

Move 44 across:

(x+3)2=4\left(x + 3\right)^2 = 4

Take square roots:

x+3=±2x + 3 = \pm 2

Then solve:

x=1 or x=5x = -1 \text{ or } x = -5

One rewrite gave both the vertex and the solutions. That is the main practical reason this method is useful.

Where Students Get Stuck, And How To Check

The hardest single step is handling a leading coefficient. If the quadratic starts as ax2+bx+cax^2 + bx + c with a1a \ne 1, factor aa out of the quadratic part first. For example,

2x2+8x+12x^2 + 8x + 1

becomes

2(x2+4x)+12\left(x^2 + 4x\right) + 1

Inside the parentheses, half of 44 is 22, so you add 44 there:

2(x2+4x+4)+182\left(x^2 + 4x + 4\right) + 1 - 8

That simplifies to

2(x+2)272\left(x + 2\right)^2 - 7

The balancing term is 8-8, not 4-4, because the added 44 was inside parentheses multiplied by 22.

To self-check at the end, expand your answer and make sure you recover the original. If you claim

x2+6x+5=(x+3)24x^2 + 6x + 5 = \left(x + 3\right)^2 - 4

then expanding gives x2+6x+94=x2+6x+5x^2 + 6x + 9 - 4 = x^2 + 6x + 5, which confirms the rewrite.

Watch for these recurring slips:

  1. Squaring before halving. For x2+10xx^2 + 10x, the needed term is 2525, not 100100.
  2. Forgetting to balance. If you add a value to make a square, subtract the same total value.
  3. Skipping the leading coefficient step when the quadratic starts with 2x22x^2 or 3x23x^2.
  4. Losing the sign. (x4)2(x - 4)^2 expands to x28x+16x^2 - 8x + 16, not x2+8x+16x^2 + 8x + 16.

To rehearse the leading-coefficient-free case, work through x28x+1x^2 - 8x + 1: half of 8-8 is 4-4, so the square part involves (x4)2(x - 4)^2. Then solve the same quadratic with the quadratic formula and confirm both methods give the same roots.

Frequently Asked Questions

What is completing the square used for?
It rewrites a quadratic into a square form that makes the vertex easier to read and can turn a quadratic equation into something you can solve by taking square roots.
Do you factor out the leading coefficient first?
If the quadratic starts as $ax^2 + bx + c$ with $a \ne 1$, factor $a$ out of the $x^2$ and $x$ terms before completing the square inside the parentheses.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →