Solve a simple differential equation This is an equation I met while solving a probability theory problem:
$ dy = 2(m/x-y) \cdot dx/x $
m is a constant 
Also it is known that $y(m) =1$.
I have the function which satisfies the equation and I verified that it works. But I haven't solved a single differential equation in many years so... I just got curious how one can derive this solution. 
Is this equation of some particular type which is solvable through a well-known procedure? Any reference? 
Sorry... I am typing on my phone... I will try to improve the equation outlook now. 
 A: We have $$\\ \\ \frac { dy }{ dx } =\frac { 2\left( \frac { m }{ x } -y \right)  }{ x } =\frac { 2m-2xy }{ { x }^{ 2 } } \\ { y'x }^{ 2 }+2xy=2m\\ d\left( { yx }^{ 2 } \right) =2m\\ y{ x }^{ 2 }=2mx+C\\ y\left( x \right) =\frac { 2mx+C }{ { x }^{ 2 } } \\ \\ \\ \\  $$
and the fact  $y\left( m \right) =1$ gives us
$$y\left( m \right) =\frac { 2{ m }^{ 2 }+C }{ { m }^{ 2 } } =1\Rightarrow C=-{ m }^{ 2 }$$

$$y\left( x \right) =\frac { 2mx-{ m }^{ 2 } }{ { x }^{ 2 } } $$

A: $$dy = 2(m/x-y) \cdot dx/x$$
$$xdy -2(\frac mx-y)dx=0$$
$$xdxy -(2m-xy)dx=0$$
I's separable
$$\int \frac {dxy}{(xy-2m)}=-\int \frac {dx}x$$
$$\ln(xy-2m)=-\ln(x)+K$$
$$(xy-2m)=\frac Kx$$
$$\implies y(x)=\frac {K+2mx}{x^2}$$

As @haqnatural has pointed out
$$xdy -2(m/x-y) dx=0$$
the differential is exact with integrating factor $\mu(x)=x$
$$x^2dy -2(m-xy) dx=0$$
$$\implies \partial_x(x^2)=\partial_y(2xy-2m)$$
A: $$\dfrac{dy}{dx}=\dfrac{2m}{x(x-y)}\\\dfrac{dx}{dy}=\dfrac{x^2-xy}{2m}\\ x'+\frac{y}{2m}x=\frac1{2m}x^2$$
It's Bernoulli form, make $z=x^{-1}$ then $\frac{dz}{dy}=-x^{-2}\frac{dx}{dy}$ isolate x' and substitute in the ode, it reduces into a Linear Form do integrating factor and some algebra and you get it in the form $x(y)= F(y) +C$
