Solving the ODE $\;\;y'^2-yy'+e^x=0$

Solve,

$$y'^2-yy'+e^x=0$$

By seeing it as a quadratic equation in $y'$, we have $y'=\dfrac{y\pm\sqrt{y^2-4e^x}}{2}$. But from here I don't know how to continue since both $y^2$ and $e^x$ are under square root.

Another approach I've tried is using $y'=\frac1{x'}$, $$\frac1{x'^2}-\frac{y}{x'}+e^x=0\;\Rightarrow\; e^x x'^2-y\;x'+1=0$$ I'm not sure if it helps.


Solution 1:

Use the substitution $y = 2e^{x/2}v$

$$\begin{cases}y = 2e^{x/2}v \\ y' = 2e^{x/2}v' + e^{x/2}v\end{cases} \implies e^x(2v'+v)(2v'-v) + e^x = 0$$

or

$$4{v'}^2-v^2+1=0$$

which can be solved by integrating directly

$$\pm x/2 + C = \int\frac{dv}{\sqrt{v^2-1}} = \cosh^{-1}(v)$$

which means

$$v = \sqrt{1+C^2}\cosh\left(\frac{x}{2}\right)+C\sinh\left(\frac{x}{2}\right)$$

and finally

$$y = 2\sqrt{1+C^2}e^{x/2}\cosh\left(\frac{x}{2}\right)+2Ce^{x/2}\sinh\left(\frac{x}{2}\right)$$

or

$$y = (\sqrt{1+C^2}+C)e^x + (\sqrt{1+C^2}-C)$$


$\textbf{Edit}$: Even more simply, the original found answer can be simplified to

$$\boxed{y = Ce^x + \frac{1}{C}}$$

The missing solutions can be found by going back to the equation

$$4{v'}^2-v^2+1 = 0$$

The original solution assumed $v^2-1\neq 0$ so that we could divide by it later. In that case though, notice that $v=\pm 1$ is the constant solution

$$4(0)^2-(\pm1)^2+1 = 0$$

so we also have

$$\boxed{y = \pm 2e^{x/2}}$$

Moral of the story, always look for constant solutions in nonlinear DEs.