ordinary differential equations ???

how do you solve this differential equation,
 
 
(x-y2 )dx + 2xy dy =0

let m(x,y) = x - y2 and n(x,y) = 2xy. then ∂m/∂y = -2y and ∂n/∂x = 2y. since ∂m/∂y ≠ ∂n/∂x, this differential equation is inexact. however, by multiplying the equation by an integrating factor, one may turn the inexact ode into an exact one. first compute
 
(∂m/∂y - ∂n/∂x)/n = -4y/(2xy) = -2/x.
 
then, the integrating factor is
 
e∫-(2/x) dx = e-2ln|x| = 1/x2. 
 
multiplying the differential equation by 1/x2 results in 
 
(1)  (1 - y2/x2) dx + 2y/x dy = 0.
 
since ∂/∂y(1 - y2/x2) = -2y/x2 and ∂/∂x(2y/x) = -2y/x2, (1) is indeed an exact differential equation. its solution will be of the form u(x,y) = c, where c is a general constant. so 
 
(2) ∂u/∂x = 1 - y2/x2 
(3) ∂u/∂y = 2y/x.
 
integrating (1) with respect to x yields 
 
(4) u(x,y) = x + y2/x + f(y),
 
for some function f depending on y. differentiating (4) with respect to y and comparing with (3), one obtains
 
(5) 2y/x = 1 + 2y/x + f;'(y).
 
from (5), 0 = 1 + f'(y), or -1 = f'(y). hence f(y) = -y + constant, and the general solution of (1) is
 
x + y2/x - y = c,
 
which is also the general solution of the original differential equation.