Solving the differential equation $x(e^y-y')=2$. How do I solve this differential equation $x(e^y-y')=2$? I don't know where to start, as I have just learned about homogenous linear first-order DEs and interchanging x and y as the dependent and independent variables and solving for $dx/dy$ doesn't seem to help.
 A: Hint, let:
$$y = \ln\left(\dfrac{v}{x}\right)$$


*

*Find $y'$, substitute into original DE and work this problem.

*Substitute previous result to find final result.


Result should be:
$$y(x) = -\ln(x) - \ln(c_1 x + 1)$$
Note: Of course, some care has to be taken with $x > 0$ and for $x < 0$.
A: After working with DEs for a while, you'll recognise certain families and be able to solve them on sight. How should you go about tackling this one in particular?
$e^y$ is the first 'eyesore', so you should attempt to linearise the DE using the substitution  $y=\ln(z)$. This transforms the DE into,
$$xz - \frac{x}{z} (\frac{dz}{dx}) = 2$$
Rendering,
$$ \frac{dz}{dx} = z^2 - \frac{2z}{x} $$
Notice that this is almost a 1st order linear type DE. All it wants is linearization of the $z^2$ term. In order to do so, use the substitution $z=1/u$. This gives,
$$\frac{du}{dx} - \frac{2u}{x} = -1 $$
Solve this using the standard integrating factor method and transform the equation back from the variable $u$ to $x$ to arrive at your final solution,
$$ y = \ln \Bigg[\frac{1}{x(1+Cx)}\Bigg]$$ (where $C$ is a constant) 
Disclaimer: I've waffled over singularities here - we are making fragile moves when using transformations involving logarithms and reciprocals due to their restricted domains. 
A: You might reasonably start with $w = e^y$, since $e^y$ occurs in the equation, obtaining $$w'= - 2 w/x + w^2$$
That's a Bernoulli equation, and the transformation $u^{-1} = w$ gives you a linear equation (in general for $w' = g(x) w + h(x) w^a$ you would take 
$u^{1/(1-a)} = w$).
A: Arriving late at the party, I must confess being surprised by all these mysterious and clever changes of variables, guessing, linearization and the like, when the most standard method works:

First solve the equation with no constant term then solve for the constant of integration.

First step: solve $y'-\mathrm e^y=0$. 
This is $\mathrm e^{-y}y'=1$, that is, $(\mathrm e^{-y})'=-1$, solved by $\mathrm e^{-y}=z-x$ with $z$ constant, that is, $y=-\log(z-x)$.
Second step: solve the full equation $x(\mathrm e^y-y')=2$.
If $y=-\log(z-x)$, then $\mathrm e^y=1/(z-x)$ and $-y'=(z'-1)/(z-x)$, hence $\mathrm e^y-y'=z'/(z-x)$ and the equation to be solved becomes 
$$
xz'=2(z-x).
$$
This is equivalent to $(z/x^2)'=-2/x^2$, solved by $z=x^2(c+2/x)=cx^2+2x$ for some constant $c$ and, finally, 
$$
y=-\log(cx^2+x).
$$
Note that each function $y$ solves the differential equation only on an interval where $cx^2+x\gt0$, and in particular, never at $x=0$.
