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.

  • 1
    $\begingroup$ but in b i have the conditions $y=2$ and $x=0$ if i put $y=x$ i got $2= 0$ that´s imposible $\endgroup$ – Rachel Jun 20 '14 at 14:48
  • 1
    $\begingroup$ a) a solution is $y = \alpha x$ where $\alpha\mathrm{e}^{-\alpha} = 1$. Well its the only one I have found so far. $\endgroup$ – Chinny84 Jun 20 '14 at 14:54
  • 4
    $\begingroup$ 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. $\endgroup$ – Winther Jun 20 '14 at 14:55
  • 1
    $\begingroup$ I agree with Winther, can't go anywhere else except that ugly integral. $\endgroup$ – Mark Fantini Jun 20 '14 at 14:59
  • 2
    $\begingroup$ @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$). $\endgroup$ – Winther Dec 7 '14 at 22:35


Approach $1$:

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

Then $y=xu$


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




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


Approach $2$:



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

Then $x=yu$


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




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












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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.