What is the tip for this exact differential equation? $$ xdx + ydy = \frac{xdy - ydx}{x^2 + y^2} $$
I have multiplied the left part $x^2+y^2$ for $x dx + y dy$ getting 
$$(x^3+xy^2+y)dx+(x^2y+y^3-x)dy=0$$ 
And the derivative test give me: 
$\frac{dM}{dy}= 0+2xy+1$ and $\frac{dN}{dx} = 2xy+0-1$. 
Where´s my mistake?
 A: $\frac{1}{2}d(x^2+y^2) = xdx+ydy$
$d(y/x) = \frac{xdy-ydx}{x^2}$
Let $u = x^2+y^2$ and $v = \frac{y}{x}$ 
$LHS = \frac{1}{2}d(x^2+y^2) = \frac{1}{2}du$
$RHS = \frac{xdy-ydx}{x^2+y^2} = x^2 \frac{dv}{u} = \frac{u}{1+v^2}\frac{dv}{u} = \frac{dv}{1+v^2}$
Thus,
$$
\frac{du}{dv} = \frac{1}{1+v^2}\
$$
Now integrate and substitute for $u,v$
A: In terms of polar coordinate $(x,y) = (r\cos\theta,r\sin\theta)$, we have
$$\begin{align}
xdx + ydy 
&= 
r\cos\theta(\cos\theta dr - r\sin\theta d\theta) + 
r\sin\theta(\sin\theta dr + r\cos\theta d\theta) = r dr\\
\frac{xdy - ydx}{x^2+y^2} 
&=
\frac{r\cos\theta(\sin\theta dr + r\cos\theta d\theta) - r\sin\theta(\cos\theta dr - r\sin\theta d\theta)}{r^2} = d\theta
\end{align}$$
This leads to
$$dr^2 = 2rdr = 2d\theta
\;\;\implies\;\;
r^2 = 2\theta + C
\;\;\iff\;\;
x^2 + y^2 = 2\tan^{-1}\left(\frac{y}{x}\right) + C
$$
for suitably chosen constant $C$.
A: your differential equation $$Mdx + Ndy = (x^3 + xy^2 + y)\, dx +(y^3 + yx^2 - x)\, dy  = 0.$$ then we have $$M_y = 2xy + 1, N_x = 2xy - 1 $$ therefore is not exact. we can make it exact by multiplying by $a$ and demanding that $$(aM)_y = (aN)_x \to a_y M + aM_y = a_x N + aN_x \to a_xN- a_y M = a(M_y - N_x) = 2a $$  that is $$a_x(y^3 + yx^2 -x) -a_y(x^3 + xy^2 +y) = 2a\tag 1$$ now choose $$a = a(r), r^2 = x^2 + y^2$$  so that $$ a_x = \frac x r a', a_y = \frac x y a'$$ subbing this in $(1),$  we get $$\frac x r a'\left(yr^2 - x\right) - \frac y r a'\left(xr^2+y\right)  = 2a \to -r\frac{da}{dr} = 2a \to a = \frac1{r^2} = \frac1{x^2 + y^2} $$
now that we have an integration factor, we get $$ \frac1{x^2 + y^2}(x^3 + xy^2 + y)\, dx +\frac 1{x^2 + y^2}(y^3 + yx^2 - x)\, dy  = 0 \to x\,dx + y\, dy +\frac{ydx - xdy}{x^2 + y^2} = 0 .$$  we have  $$ F_x = M  = x + \frac y{x^2 + y^2}, F_y = N = y -\frac x{x^2 + y^2} \to \\
 F_{xy} = \frac1{x^2+y^2} - \frac{2y^2}{(x^2+y^2)^2} = \frac{x^2 - y^2}{(x^2 + y^2)^2},\\ F_{yx} = -\frac 1{x^2 + y^2} + \frac{2x^2}{(x(2 + y^2)^2} =  \frac{x^2 - y^2}{(x^2 + y^2)^2}$$
integrating $F_x$ i get $$F = \frac 12 x^2 + \tan^{-1}\left(\frac x y\right) + C(y) \to F_y = \frac 1{1 + (x/y)^2}( -\frac x{y^2}) + \frac{dC}{dy} \to F_y = -\frac x{x^2 + y^2} +\frac{dC}{dy}   $$
 this gives $$ \frac{dC}{dy} = y \to C = \frac 1{2}y^2 + const$$
this has the integral $$\frac 12(x^2 + y^2) + \tan^{-1}\left(\frac xy\right) = const. $$
A: When you multiplied by $x^2 + y^2$, you transformed an exact differential equation to an inexact one. 
If we rearrange the original equation, we get
$$\tag{*}\left(x + \frac{y}{x^2 + y^2}\right)\, dx + \left(y - \frac{x}{x^2 + y^2}\right)\, dy = 0$$
Now
$$\frac{\partial}{\partial y}\left(x + \frac{y}{x^2 + y^2}\right) = 0 +\frac{x^2 - y^2}{(x^2 + y^2)^2} = \frac{x^2 - y^2}{(x^2 + y^2)^2}$$
and
$$\frac{\partial}{\partial x}\left(y - \frac{x}{x^2 + y^2}\right) = 0-\frac{y^2 - x^2}{(x^2 + y^2)^2} = \frac{x^2 - y^2}{(x^2 + y^2)^2},$$
so $(*)$ is exact and there is an $F$ such that $F_x = x + \frac{y}{x^2 + y^2}$ and $F_y = y - \frac{x}{x^2 + y^2}$. Integrating the equation $F_x = x + \frac{y}{x^2 + y^2}$ with respect to $x$, we get $F(x,y) = \frac{x^2}{2} + \arctan(x/y) + \phi(y)$ for some function $\phi(y)$ depending only on $y$. Differentiating the latter equation with respect to $y$ yields
$$F_y = -\frac{x}{x^2 + y^2} + \phi'(y) = y - \frac{x}{x^2 + y^2}.$$
Thus $\phi'(y) = y$ $\implies$ $\phi(y) = \frac{y^2}{2} + c$, where $c$ is a constant. Hence $F(x,y) = \frac{x^2+y^2}{2} + \arctan(x/y) + c$, and the general solution is
$$\frac{x^2 + y^2}{2} + \arctan(x/y) = C.$$
