How to solve and classify this first order differential equation? The equation is:
$$
e^x(1+x)dx = (xe^x-ye^y)dy
$$
I've tried solving this as a non-exact differential equation but it's definitely incorrect. Not sure if this can be classified as an Bernoulli/Linear Differential equation either.
Any help is greatly appreciated! Thanks!
 A: $$e^x(1+x)dx+(ye^y-xe^x)dy=0\\
e^xdx+xe^xdx+ye^ydy-xe^xdy=0\\
e^xdx+xe^x(dx-dy)+ye^ydy=0\\
e^{x-y}dx+xe^{x-y}d(x-y)+ydy=0\\
d(xe^{x-y})+ydy=0\\
xe^{x-y}+y^2/2=c$$
A: Let $u=x e^x$
$$du=e^x(x+1)dx=(u-y e^y)dy$$
$$\frac{du}{dy}-u=-y e^y$$
The solving of this linear ODE leads to :
$$u=c\: e^y -\frac{1}{2}y^2e^y$$
The solution on implicite form is :
$$x e^x=c\: e^y -\frac{1}{2}y^2e^y$$
it is possible to express the inverse function $x(y)$ thanks to the Lambert-W function :
$$x=W \left(c\: e^y -\frac{1}{2}y^2e^y \right)$$
There is no closed form for the direct function $y(x)$
A: $$\frac{dy}{dx}= \frac{e^x(1+x)}{xe^x - ye^y}$$  we can break up this into 
$$\frac{dt}{dx} = e^x + xe^x, \frac{dy}{dt} = \frac{1}{xe^x - ye^y}$$  we can solve the first one $$ xe^x = t + C \tag 1$$ and we need to solve $$\frac{dy}{dt} =\frac{1}{t+C-ye^y}$$ this one  is a linear equation for $$ \frac{dt}{dy} = t+C - ye^y$$ a particular solution of the form 
$$t = A + By^2e^y, \frac{dt}{dy} =  2Bye^y + By^2e^y= A + By^2e^y + C -ye^y $$ which gives you a particular solution $$ t = -\frac 12 y^2e^y - C.$$  adding the homogeneous solution we get $$ t = -\frac 12 y^2e^y - C + De^y \tag 2$$ eliminating $t$ and $C$ from $(1)$ and $(2)$, we find $$xe^x = e^y(D-\frac 12y^2) $$
