4.10.1.2 Example 2

Solve

\[ y^{\prime }x-y-2e^{x-\frac {y}{x}}=0 \]

The first step is to see if the above can be written as

\begin{equation} y^{\prime }=\frac {y}{x}+g\left ( x\right ) f\left ( b\frac {y}{x}\right ) ^{\frac {n}{m}} \tag {1}\end{equation}

Or

\begin{align} y^{\prime }x-y-2e^{x\frac {-y}{x}} & =0\nonumber \\ y^{\prime } & =\frac {y}{x}-\frac {2}{x}e^{x}e^{\frac {-y}{x}} \tag {2}\end{align}

Comparing (2) to (1) shows that

\begin{align*} n & =1\\ m & =1\\ g\left ( x\right ) & =-\frac {2}{x}e^{x}\\ b & =-1\\ f\left ( b\frac {y}{x}\right ) & =e^{-\frac {y}{x}}\end{align*}

Hence the solution is

\begin{equation} y=ux \tag {A}\end{equation}

Where \(u\) is the solution to

\begin{equation} u^{\prime }=\frac {1}{x}g\left ( x\right ) f\left ( u\right ) \tag {3}\end{equation}

Therefore \(f\left ( u\right ) =e^{-u}\) and \(\left ( 3\right ) \) becomes

\[ u^{\prime }=-\frac {2}{x^{2}}e^{x}e^{-u}\]

This is separable.

\begin{align*} e^{u}du & =-\frac {2}{x^{2}}e^{x}dx\\ \int e^{u}du & =-2\int \frac {e^{x}}{x^{2}}dx\\ e^{u} & =-2\left ( -\frac {e^{x}}{x}+\operatorname {Ei}\left ( x\right ) \right ) +c_{1}\end{align*}

Where \(\operatorname {Ei}\left ( x\right ) \) is the exponential integral \(\operatorname {Ei}\left ( x\right ) =\int _{-x}^{\infty }\frac {e^{-t}}{t}dt\).  Hence

\[ u=\ln \left ( c_{1}-2\left ( -\frac {e^{x}}{x}+\operatorname {Ei}\left ( x\right ) \right ) \right ) \]

And (A) becomes

\[ y=x\ln \left ( c_{1}-2\left ( -\frac {e^{x}}{x}+\operatorname {Ei}\left ( x\right ) \right ) \right ) \]