# general solution of the equation $\frac{dy}{dx} =\exp(y/x)$

How can i get the general solution of the equation

a) $\frac{dy}{dx} = \exp(y/x)$

b) $\frac{dy}{dx} = \exp(x-y)$ and $y=2$ when $x = 0$

I tried b) first:

This is a first-order nonlinear ordinary differential equation, which is separable. General solution: $y(x) = \ln(C+e^x)$

Finding C , we have that:

$$2 = \ln(C + e^0)$$

$$2 = \ln(C + 1)$$ $$e^2 = C+1$$ $$C = e^2 - 1$$ Particular solution: $$y(x) = \ln(e^2 -1 + e^x)$$

Is that correct the solution for b)? , I stuck with a), some help please.

• but in b i have the conditions $y=2$ and $x=0$ if i put $y=x$ i got $2= 0$ that´s imposible – Rachel Jun 20 '14 at 14:48
• a) a solution is $y = \alpha x$ where $\alpha\mathrm{e}^{-\alpha} = 1$. Well its the only one I have found so far. – Chinny84 Jun 20 '14 at 14:54
• For a) I only can find an implicit solution: $\int_a^{y/x}\frac{dz}{e^z-z} = \log(x) + C$. Don't think the integral can be inverted though. – Winther Jun 20 '14 at 14:55
• I agree with Winther, can't go anywhere else except that ugly integral. – Mark Fantini Jun 20 '14 at 14:59
• @BCLC Rewrite the ODE as $\frac{y' - y/x}{e^{y/x}-y/x} = 1$ and use $x(y/x)' = (y'-y/x)$ to get $\frac{1}{e^{y/x}-y/x} \frac{d(y/x)}{dx} = \frac{1}{x}$. Now integrate both sides to get the solution (on the left hand side take $z=y/x$). – Winther Dec 7 '14 at 22:35

a)

Approach $1$:

Let $u=\dfrac{y}{x}$ ,

Then $y=xu$

$\dfrac{dy}{dx}=x\dfrac{du}{dx}+u$

$\therefore x\dfrac{du}{dx}+u=e^u$

$x\dfrac{du}{dx}=e^u-u$

$\dfrac{dx}{x}=\dfrac{du}{e^u-u}$

$\int\dfrac{dx}{x}=\int\dfrac{du}{e^u-u}$

$\ln x=\int^u\dfrac{dt}{e^t-t}+c$

$x=Ce^{\int^\frac{y}{x}\frac{dt}{e^t-t}}$

Approach $2$:

$\dfrac{dy}{dx}=e^\frac{y}{x}$

$\dfrac{dx}{dy}=e^{-\frac{y}{x}}$

Let $u=\dfrac{x}{y}$ ,

Then $x=yu$

$\dfrac{dx}{dy}=y\dfrac{du}{dy}+u$

$\therefore y\dfrac{du}{dy}+u=e^{-\frac{1}{u}}$

$y\dfrac{du}{dy}=e^{-\frac{1}{u}}-u$

$\dfrac{dy}{y}=\dfrac{du}{e^{-\frac{1}{u}}-u}$

$\int\dfrac{dy}{y}=\int\dfrac{du}{e^{-\frac{1}{u}}-u}$

$\ln y=\int^u\dfrac{dt}{e^{-\frac{1}{t}}-t}+c$

$y=Ce^{\int^\frac{x}{y}\frac{dt}{e^{-\frac{1}{t}}-t}}$

b)

$\dfrac{dy}{dx}=e^{x-y}$

$\dfrac{dy}{dx}=e^xe^{-y}$

$e^y~dy=e^x~dx$

$\int_2^ye^y~dy=\int_0^xe^x~dx$

$[e^y]_2^y=[e^x]_0^x$

$e^y-e^2=e^x-1$

$e^y=e^x+e^2-1$

$y=\ln(e^x+e^2-1)$

Set $y=xu$, then $y'=xu'+u$ and the equation a) transforms into $$xu'+u=e^u \qquad \Longrightarrow \qquad xu'=e^u-u.$$ This is obviously separable, hence the solution is implicitly given by quadratures $$\int^{y/x}\frac{du}{e^u-u}=\int\frac{dx}{x}=\ln x+\operatorname{const}.$$ However the integral on the left does not seem to be expressible in terms of elementary or classical special functions.