# How can I solve the differential equation $(y'/y)'=ay$?

In a physics problem I'm working on, the following differential equation arose.

$$\left(\frac{y'}{y}\right)'=-\alpha y$$

where $y=y(x)$ and $\alpha$ is a positive real number. When I plug it into wolfram alpha, it says the general solution to this second order nonlinear differential equation is

$$y_1(x) = \frac{c_1-c_1 \tanh^2\left(\frac{1}{2} (\sqrt{c_1} c_2-\sqrt{c_1} x)\right)}{2 a}$$

$$y_2(x) = \frac{c_1-c_1 \tanh^2\left(\frac{1}{2} (\sqrt{c_1} c_2+\sqrt{c_1} x)\right)}{2 a}$$

where $c_1$ and $c_2$ are arbitrary real constants. I have no idea how it derived such solutions, but I have checked that they satisfy the differential equation. I've tried to show this for a few hours, but I just can't. Could you help offer some insight?

EDIT: I have almost everything obvious, like writing the LHS of the differential equation as the second derivative of $\log y$, and using the quotient rule on the LHS.

• @Moo I've tried that. See my edit. – Arturo don Juan Oct 8 '16 at 1:22

$\DeclareMathOperator{\sech}{sech}$Put $u = \log y$, so that $$u'' = -\alpha e^{u}. \tag{1}$$ Multiply by $u'$ and integrate, obtaining $$\frac{(u')^{2}}{2} = -\alpha e^{u} + \frac{c_{1}}{2},$$ or $$u' = \pm\sqrt{-2\alpha e^{u} + c_{1}}. \tag{2}$$ Now let $$2\alpha e^{u} = c_{1}\tanh^{2} v, \tag{3a}$$ so that $$2\alpha e^{u}\, u' = 2c_{1}\tanh v \sech^{2} v\, v'. \tag{3b}$$ Dividing (3b) by (3a), $$u' = 2\sech^{2} v \coth v\, v' = \frac{2v'}{\cosh v \sinh v}, \tag{4a}$$ while substituting (3a) in (2) gives $$u' = \pm \sqrt{c_{1}} \sech v. \tag{4b}$$ Equating (4b) and (4a), $$\pm\sqrt{c_{1}} = \frac{2v'}{\sinh v} = \frac{4e^{v}\, v'}{(e^{v})^{2} - 1}. \tag{5}$$ Setting $w = e^{v}$ converts (5) into $$\pm\sqrt{c_{1}} = \frac{4\, w'}{w^{2} - 1},$$ which integrates to $$\sqrt{c_{1}}(\pm x + c_{2}) = 2\log\left\lvert\frac{w - 1}{w + 1}\right\rvert = 2\log\left\lvert\frac{e^{v} - 1}{e^{v} + 1}\right\rvert$$ or $$e^{\frac{1}{2}\sqrt{c_{1}}(\pm x + c_{2})} = \tanh(\tfrac{v}{2}). \tag{6}$$ Now, (3a) reads $$\tanh^{2} v = \frac{2\alpha}{c_{1}} e^{u} = \frac{2\alpha}{c_{1}} y,$$ or $$y = \frac{c_{1}}{2\alpha} \tanh^{2}v. \tag{7}$$ To massage this into Wolfram's form, note that if $e^{z} = \tanh \frac{v}{2}$, i.e., $$z = \tfrac{1}{2}\sqrt{c_{1}}(\pm x + c_{2}), \tag{6a}$$ then $$e^{2z} = \tanh^{2}\tfrac{v}{2} = \frac{\cosh v - 1}{\cosh v + 1}. \tag{8}$$ Consequently, \begin{align*} 1 - \tanh^{2} z &= (1 - \tanh z)(1 + \tanh z) = \frac{4e^{2z}}{(e^{2z} + 1)^{2}} \\ &= \frac{4\dfrac{\cosh v - 1}{\cosh v + 1}}{\left(\dfrac{\cosh v - 1}{\cosh v + 1} + 1\right)^{2}} = \frac{\cosh v - 1}{\cosh v + 1}\left(\frac{\cosh v + 1}{\cosh v}\right)^{2} = \tanh^{2} v. \end{align*} Substituting this into (7) and using (6a), $$y = \frac{c_{1}}{2\alpha} (1 - \tanh^{2} z) = \frac{c_{1}}{2\alpha} \left[1 - \tanh^{2}\bigl(\tfrac{1}{2}\sqrt{c_{1}}(\pm x + c_{2})\bigr)\right].$$

Set $$z = \frac{y'}{y} \,\,\, \text{ or conversely } \,\,\, y' = y\,z$$ and create the system of ODEs \begin{align} y' &= y \, z\\ z' &= -\alpha \, y \end{align} or written with the $x$ argument variable \begin{align} \frac{dy}{dx} &= y \, z\\ \frac{dz}{dx} &= -\alpha \, y \end{align}

Eliminating $dx$ gives us the ODE

\begin{align} \frac{dy}{y \, z} = dx = - \, \frac{dz}{\alpha \, y } \end{align}

$$\frac{dy}{y \, z} + \, \frac{dz}{\alpha \, y } = 0$$ $$\frac{dy}{ z} + \, \frac{dz}{\alpha} = 0$$ $$\alpha \,{dy} + z\, {dz} = 0$$ $$\alpha \, y + \frac{z^2}{2} = \frac{C}{2}$$ $$2 \, \alpha \, y + {z^2} = {C}$$ Substituting $z = \frac{y'}{y}$ back $$2 \, \alpha \, y + \frac{1}{y^2} \, (y')^2 = {C}$$

\begin{align} \left(\frac{dy}{dx}\right)^2 = y^2 \, \big(C - 2 \, \alpha \, y\big) \end{align}

\begin{align} \frac{dy}{dx} = \varepsilon \, y\, \sqrt{C - 2 \, \alpha \, y} \end{align} where $\varepsilon \in \{-1, 1\}$. To integrate the latter equation, I think you should perform the substitute $$u(x) = \frac{1}{y(x)}$$ \begin{align} \end{align}