Solve x²+bx+c=0 by rewriting as (x+b/2)²=b²/4-c and taking the square root. The completed-square form is algebraically equivalent to the original; verify both roots satisfy it.

Example

Add the square of half the x coefficient, then solve with square roots.

highlighted = computed this step

Step 1 — Set up

Set up the expression.

x2+6x+5=0x^{2} + 6x + 5 = 0

Step 2 — Move constant

Move the constant: subtract 5 to get -5.

x2+6x=-5x^{2} + 6x = \hl{-5}

Step 3 — Halve b

Take half of b: 6 / 2 = 3.

6/2=36 / 2 = \hl{3}

Step 4 — Square half

Square that half: 3^2 = 9.

32=93 ^{ 2 }= \hl{9}

Step 5 — Add to both sides

Add 9 to both sides; the right side becomes 4.

x2+6x+9=4x^{2} + 6x + \hl{9} = \hl{4}

Step 6 — Completed square

Write the completed square: x + 3, squared, equals 4.

(x+3)2=4(x+ \hl{3} )^{ 2 }= \hl{4}

Step 7 — Square roots

Take square roots: x + 3 = plus or minus 2.

x+3=±2x+ 3 =\pm \hl{2}

Step 8 — Roots

Read the roots: x = -1 or x = -5.

x=-1orx=-5x= \hl{-1} \quad \text{or}\quad x= \hl{-5}
completing-the-square Add and subtract (b/2)² to create a perfect square trinomial. The resulting (x+h)²=k yields two roots x=-h±√k.