To complete the square for an expression in the form x2+bx, the term c=(2b)2 must be added. To maintain equivalence with the original expression, c should also be subtracted.
x2+bx⇕x2+bx+(2b)2−(2b)2
Putting the subtracted c aside temporarily, the expression can be rewritten as a perfect square.
x2+bx+(2b)2−(2b)2⇕(x+2b)2−(2b)2
To complete the square for an expression in the form x2−bx, the method is similar.
x2−bx⇕x2−bx+(2b)2−(2b)2
Putting the subtracted c aside temporarily, the expression can be rewritten as a perfect square.