# Problems with an exact differential eqution

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.$$

The differential is indeed exact $$\left(\frac{1}{x}-\frac{y^2}{(x-y)^2}\right)dx-\left(\frac{1}{y}-\frac{x^2}{(x-y)^2}\right)dy=0$$

Note that

$$\frac {dx}x=d\ln (x)$$ $$\frac {dy}y=d\ln (y)$$ And also that \begin{align} E=&-\frac{y^2}{(x-y)^2}dx+\frac{x^2}{(x-y)^2}dy \\ E=&\frac{-y^2dx+x^2dy}{(x-y)^2}\\ E=&\frac{-y^2dx+x^2dy}{x^2y^2}\frac {(xy)^2}{(x-y)^2}\\ E=&(d(\frac 1x- \frac 1y))\frac {(xy)^2}{(x-y)^2}\\ E=&(\frac {xy}{y-x})^2d(\frac {y-x}{xy}) \\ \end{align}

$$\text {Since we have } \frac {dv}{v^2}=-d\left(\frac 1v \right ) \implies E=-d(\frac {xy}{y-x})$$ Therefore we have $$d \ln x -d \ln y +d(\frac {xy}{x-y})=0$$ $$\boxed{\ln (\frac xy)+\frac {xy}{x-y}=K}$$

• Nice solution!!! – Gödel Oct 16 '18 at 3:31
• @Gödel Thank you ...so much – Isham Oct 16 '18 at 3:32