<s>[INST] Exact differential equation $\frac{y}{(y+x)^2}dx+ ( \frac{1}{y} - \frac{x}{(x+y)^2})dy=0$ I have to solve the differential equation $\dfrac{y}{(y+x)^2}dx+ ( \dfrac{1}{y} - \dfrac{x}{(x+y)^2})dy=0$
Let $ M= \dfrac{y}{(y+x)^2}$ and  $ N=\dfrac{1}{y} - \dfrac{x}{(x+y)^2}$
Since it is an exact differential equation, the solution is a function U(x,y)
However, I started from $U_x(x,y) = M$
When performing the procedure I obtained that the solution $U(x,y) =  - \dfrac{y}{x+y} + ln|y|+C$
On the other hand, if I start from $U_y(x,y) = N$
When performing the procedure I obtained that the solution $U(x,y) =  \dfrac{x}{x+y} + ln|y|+C$
So are these solutions different?
 [/INST] Both solutions are correct. They differ by a constant, which you can see by pulling out $-1$ from the general constant:
$$\frac x{x+y}+C=\frac x{x+y}-1+C=\frac{x-(x+y)}{x+y}+C=-\frac y{x+y}+C$$
</s>