Completing the square rewrites a quadratic into a form like (xh)2+k(x - h)^2 + k. That makes the graph easier to read, and it gives you a reliable way to solve quadratic equations when factoring is not convenient.

If the quadratic part starts with x2+bxx^2 + bx, the key identity 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.

What Completing The Square Means

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

Why Half Then Square Works

Start with

x2+bxx^2 + bx

Add (b2)2\left(\frac{b}{2}\right)^2:

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

Now the trinomial factors as

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

So the original expression can be rewritten as

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. You are only changing the form.

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 clearer. The vertex is (3,4)(-3, -4), so the graph reaches its minimum when x=3x = -3.

To solve the equation 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 to the other side:

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

Take square roots:

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

Then solve for xx:

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.

When The Coefficient Of x2x^2 Is Not 11

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. The half-then-square shortcut applies directly only after the quadratic part has leading coefficient 11.

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.

Common Mistakes

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

When Students Use Completing The Square

You will usually see this method 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 Quick Check

After you complete the square, expand your answer and make sure you recover the original expression exactly.

For example, 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. That confirms the rewrite.

Try A Similar Problem

Try x28x+1x^2 - 8x + 1. Half of 8-8 is 4-4, so the square part should involve (x4)2(x - 4)^2.

If you want a useful next comparison, solve the same quadratic with the quadratic formula and check that both methods lead to the same roots.

Need help with a problem?

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

Open GPAI Solver →