complete the square (with steps)
x^2+2x
\(x^2 + 2x\)
\(\mbox{note that }(x+a)^2 = x^2 + 2a x + a^2\)
\(\mbox{so we must have that }2a=2 \Rightarrow a=1\)
\(\mbox{and so we get } \\ x^2+2x = x^2+2x + 1 -1 = (x+1)^2 - 1\)