solution of $y' = \exp \left(-\frac yx\right) + \frac yx$

Could you help me to solve equation $$y' = \exp \left(-\frac yx\right) + \frac yx;\quad y(e) = 0$$

I know how to solve 1st order linear de like $y' = \exp \bigl(-\frac 1x\bigr) + \frac yx$ but here I have the dependent variable in the part that usually (in my practice) was free of it.


This can be written in the form $y'=F(\frac{y}{x})$, so this is a homogeneous ODE.

Let $z=\frac{y}{x}$, so that we obtain $y' = e^{-z} + z$.

Observe that $z=\frac{y}{x} \implies y=zx \implies y'=z'x+z$ by the product rule.

Therefore,

$$ \begin{align} y' &= e^{-z} + z \\ z'x+z &=e^{-z}+z \\ z'x &=e^{-z} \\ z'&= \frac{e^{-z}}{x} \\ \frac{dz}{dx} &= \frac{e^{-z}}{x} \\ e^z dz &= \frac{dx}{x} \\ \int e^z dz &= \int \frac{dx}{x} \\ e^z &=\ln|x| + C \\ z &= \ln\left(\ln|x| + C \right). \\ \end{align} $$

Recall, form above, that $y=zx$. So the general solution is $y=x\ln(\ln|x|+C)$. Now we must solve for $C$ using the initial condition,

$$ \begin{align} y(e) &= 0\\ e \ln(\ln|e|+C) &= 0\\ e \ln(1 + C) &= 0\\ \ln(1+C) &= 0\\ 1+C &= e^0\\ 1+C &= 1\\ C &= 0 \\ \end{align} $$

So the solution is,

$$y=x\ln \left(\ln|x| \right).$$

$ \ $

You may find these resources helpful:

  1. Paul's Online Notes - Substitutions
  2. PatrickJMT Video Examples