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=0
Step 2 — Move constant
Move the constant: subtract 5 to get -5.
x2+6x=-5
Step 3 — Halve b
Take half of b: 6 / 2 = 3.
6/2=3
Step 4 — Square half
Square that half: 3^2 = 9.
32=9
Step 5 — Add to both sides
Add 9 to both sides; the right side becomes 4.
x2+6x+9=4
Step 6 — Completed square
Write the completed square: x + 3, squared, equals 4.
(x+3)2=4
Step 7 — Square roots
Take square roots: x + 3 = plus or minus 2.
x+3=±2
Step 8 — Roots
Read the roots: x = -1 or x = -5.
x=-1orx=-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.