# How to solve a differential equation $(e^x+2\ln y)ydx+xdy=0$

Solve the following differential equation: $$(e^x+2\ln y)ydx+xdy=0$$

It is clear that the equation is not exact. So, I tried to express $$y'$$: \begin{aligned} e^xy+2y\ln y+xy'=0\iff \begin{cases} \left[ \begin{aligned} &y\equiv0\\ &y\equiv e^{-{1/2}} \end{aligned} \right. \ \ \text{if}\ \ x=0\\ y'=-\frac{e^x}{x}\cdot y-\frac{1}{x}\cdot2y\ln y\ \ \ \text{otherwise} \end{cases} \end{aligned} The problem is that the differential equation seems to be non-linear, and I don't know the ways of solving those. Maybe there's an easier way of solving the initial differential equation?

• This equation is exact if you mutliply by integrating factor $\mu (x,y)=\dfrac x y$ Feb 21, 2020 at 18:30

Maybe there's an easier way of solving the initial differential equation? Yes. This equation becomes exact if you mutliply by integrating factor $$\mu (x,y)=\dfrac x y$$
$$(e^x+2\ln y)ydx+xdy=0$$ Divide by $$y$$ note that $$d(\ln y )=\dfrac {dy}{y}$$ $$(e^x+2\ln y)dx+xd \ln y=0$$ Substitute $$u= \ln y$$ $$(e^x+2u)dx+xdu=0$$ Multiply by $$x$$: $$xe^xdx+2uxdx+x^2du=0$$ $$xe^xdx+d(ux^2)=0$$ Integrate. $$xe^x-e^x+x^2 \ln y =C$$
• In particular, multiplication by $g:=x$ is mandated by requiring$$0=[ge^x+2gu]_u-(xg)_x=g_u(e^x+2u)+g-xg_x,$$so it helps to take $g_u=0$ and $g_x=g/x$, i.e. $g\propto x$.