# Solve analytically a nonlinear first order ODE

How can one possibly find the general solution to the following nonlinear ODE?

$$\frac{dy(x)}{dx}=e^{y(x)/2}$$

I tried Mathematica, which gives the solution

$$y(x)=-2\ln \left[ \frac{1}{2 (-x - c)} \right]$$

However I think that this is not the only one solution. Any ideas to treat the problem analytically?

What happens if $\dfrac{dy}{dx}=\sqrt{e^y+c}$?

• That looks like a $1$-parameter family of solutions to me. – Travis Feb 7 '16 at 14:03
• It seems to be separable. – Claude Leibovici Feb 7 '16 at 14:13
• That is an ODE of separtable kind. The arbitrary constant $C$ appears at integration. $y=-2\ln|\frac{C-x}{2}|$ – JJacquelin Feb 7 '16 at 14:18
• Thanks for the help, but what happens if the expression is a little bit modified e.g. $\frac{dy}{dx}=\sqrt{e^y+c}$. Then one finds $-((2 arctanh[\sqrt{c + e^y}/\sqrt{c}])/\sqrt{c})=x+c_2$... how is possible to invert? – DK13 Feb 7 '16 at 14:32

\begin{align*} \frac{dy}{dx} &= e^{\frac{y}{2}} \\ \frac{dx}{dy} &= e^{-\frac{y}{2}} \\ x &= -2e^{-\frac{y}{2}}+k \\ \frac{k-x}{2} &= e^{-\frac{y}{2}} \\ y &= 2\ln \left( \frac{2}{k-x} \right) \end{align*}

• Thanks for the help, but what happens if the expression is a little bit modified e.g. $\frac{dy}{dx}=\sqrt{e^y+c}$. Then one finds $-((2 arctanh[\sqrt{c + e^y}/\sqrt{c}])/\sqrt{c})=x+c_2$... how is possible to invert? – DK13 Feb 7 '16 at 14:25
• Try $2\tanh^{-1} u=\ln \left( \frac{1+u}{1-u} \right)$ – Ng Chung Tak Feb 7 '16 at 14:38

This is a separable ODE. A mnemonic way of doing this is to group all functions of y with dy on the left and all functions of x with dx on the right of then equation, then integrating both sides.

Remember to add the arbitrary constant when integrating. This arbitrary constant will give rise to an entire family of solutions and is denoted in the solution presented by you as c. Changing the value of c gives you different particular solutions.

To sum up, the answer provided is NOT the only solution. It is the general solution for this separable ODE.

A more precise proof and explanation of solving separable ODEs can be found here

• Thanks for the help, but what happens if the expression is a little bit modified e.g. $\frac{dy}{dx}=\sqrt{e^y+c}$. Then one finds $-((2 arctanh[\sqrt{c + e^y}/\sqrt{c}])/\sqrt{c})=x+c_2$... how is possible to invert? – DK13 Feb 7 '16 at 14:33