Solve the following equation:

$$
(x+y)^{2}=(x+1)(y-1)
$$
Solve the following equation:

$$
(x+y)^{2}=(x+1)(y-1)
$$

Solution. According to (1), $(x+1)(y-1) \geq 0$, since it is equal to the square of a number. Since $x+y=(x+1)+(y-1)$, we have

$$
(x+y)^{2}=(x+1)^{2}+(y-1)^{2}+2(x+1)(y-1)
$$

from which, according to (1),

$$
(x+1)^{2}+(y-1)^{2}+(x+1)(y-1)=0
$$

None of the terms in the above sum is negative, so

$$
(x+1)^{2}=(y-1)^{2}=(x+1)(y-1)=0
$$

from which $x=-1$ and $y=1$.

By substitution, it can be seen that the obtained values are indeed solutions to (1).