Solving a weird differential equation with y in the exponent I have this equation
$$
xy'=y-4xe^{2y/x}
$$
I can't clasify it to any of the differential equation types. I am new in differential equations, how can I solve this ?
 A: Make life easier writing first $$e^{\frac{2y}x}=z\implies y=\frac{1}{2} x \log (z)\implies y'=\frac{x z'}{2 z}+\frac{1}{2} \log (z)$$ So, the differential equation becomes $$\frac{x^2 z'}{2 z}+4 x z=0\implies \frac{x z'}{2 z}+4 z=0 $$ which is separable.
A: Notice 
$$ y' = \frac{y}{x} - 4 e^{2y/x} $$
$x \neq 0$. Put $u = \frac{y}{x}$, then $y' = u'x + u $ and thus 
$$ u'x + u = u - 4 e^{2u} \implies u' x = - e^{2u}$$
This equation is $\mathbf{separable}$ and you should be able to solve it!
A: When $\text{k}_1$ and $\text{k}_2$ are two constants:
$$xy'(x)=y(x)-\text{k}_1x\exp\left(\frac{\text{k}_2y(x)}{x}\right)$$
Let $y(x)=xr(x)$, which gives $y'(x)=r(x)+xr'(x)$:
$$x\left(r(x)+xr'(x)\right)=xr(x)-\text{k}_1x\exp\left(\frac{\text{k}_2xr(x)}{x}\right)$$
Simplify and solve for $r'(x)$:
$$x\left(r(x)+xr'(x)\right)=x\left(r(x)-\text{k}_1\exp\left(\text{k}_2r(x)\right)\right)\Longleftrightarrow r'(x)=-\frac{\text{k}_1\exp\left(\text{k}_2r(x)\right)}{x}$$
Divide both sides by $\exp\left(\text{k}_2r(x)\right)$:
$$\frac{r'(x)}{\exp\left(\text{k}_2r(x)\right)}=-\frac{\text{k}_1}{x}$$
Integrate both sides with respect to $x$:
$$\int\frac{r'(x)}{\exp\left(\text{k}_2r(x)\right)}\space\text{d}x=\int-\frac{\text{k}_1}{x}\space\text{d}x$$
Now, use:


*

*Substitute $u=-\text{k}_2r(x)$ and $\text{d}u=-\text{k}_2r'(x)\space\text{d}x$:
$$\int\frac{r'(x)}{\exp\left(\text{k}_2r(x)\right)}\space\text{d}x=-\frac{1}{\text{k}_2}\int\exp\left(u\right)\space\text{d}u=-\frac{\exp\left(u\right)}{\text{k}_2}+\text{C}=\text{C}-\frac{1}{\text{k}_2\exp\left(\text{k}_2r(x)\right)}$$

*$$\int-\frac{\text{k}_1}{x}\space\text{d}x=-\text{k}_1\int\frac{1}{x}\space\text{d}x=\text{C}-\text{k}_1\ln\left|x\right|$$


So, we get:
$$-\frac{1}{\text{k}_2\exp\left(\text{k}_2r(x)\right)}=\text{C}-\text{k}_1\ln\left|x\right|$$
Now, set $r(x)=\frac{y(x)}{x}$ back:
$$-\frac{1}{\text{k}_2\exp\left(\frac{\text{k}_2y(x)}{x}\right)}=\text{C}-\text{k}_1\ln\left|x\right|$$
Solving $y(x)$ (when $x\in\mathbb{R}$):
$$y(x)=\frac{x}{\text{k}_2}\cdot\ln\left(\frac{1}{\text{C}+\text{k}_1\text{k}_2\ln\left|x\right|}\right)$$
