<s>[INST] Solving $(x+1)^2-x^2=0$ two ways gives different results In mathematics, there are several method of finding the solution of a particular problem. But in this equation,
$$(x+1)^2-x^2=0$$
Method 1
Using, $(a+b)^2=a^2+2ab+b^2$,
$$x^2+2x+1-x^2=0$$
So, $x=-1/2$ is the solution.
Method 2
$$(x+1)^2-x^2=0$$
$$(x+1)^2=x^2$$
$$x+1=x$$
$$1=0$$
But it is not possible.

So, what am I missing in this question? Please explain to me.

 [/INST] Another way to see what went wrong is to use the factorization $a^2-b^2=(a+b)(a-b)$ like this:
$$(x+1)^2-x^2=0\\(x+1+x)(x+1-x)=0\\x+1+x=0~~~~\text{ or }~~~~x+1-x=0\\x=-\frac12~~~~\text{ or }~~~~1=0$$
Of the two resulting equations, only the first gives a valid solution for $x$. So in this case there is no $a-b=0$ solution, only an $a+b=0$ one. Using this factorization is of course completely equivalent to going from $a^2=b^2$ to $a=\pm b$ directly.
</s>