Consider the following differential equation
$$ \left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)dx=\left(\frac{1}{y}-\frac{x^2}{(x-y)^2}\right)dy $$ I want to find its general solution. I get that this equation is exact but, I trying to solve it for this method and it seems not work. Can someone give me a hit?
We have an exact differential equation in the form $Mdx +Ndy = 0$, with $$M \equiv \frac{1}{x} - \left(\frac{y}{x-y}\right)^2, N \equiv \left(\frac{x}{x-y}\right)^2 - \frac{1}{y}.$$
If we let the implicit solution be $F(x, y) = c$, since the equation is exact, it is known that $F_x = M, F_y = N.$
$$F_x = M \Rightarrow, F = \int \left ( \frac{1}{x} - \left(\frac{y}{x-y}\right)^2 \right )dx,$$ $$\Rightarrow F = \ln|x| + \frac{y^2}{x-y} + \phi(y),$$ where $\phi(y)$ is a function of y.
$F_y = N,$ $$\Rightarrow \frac{y(2x-y)}{(x-y)^2} +\phi'(y) = \frac{x^2}{(x-y)^2} - \frac{1}{y},$$ $$\Rightarrow \phi'(y) = \frac{x^2-2xy + y^2}{(x-y)^2} - \frac{1}{y},$$ $$\Rightarrow \phi'(y) = 1 - \frac{1}{y},$$ $$\phi(y) = y - \ln|y|+C.$$
Thus, the implicit solution is $$F(x, y) = \ln\left|\frac{x}{y}\right| + \frac{xy}{x-y} = c.$$