A linear differential equation Find the general solution to:
$$x'' + 2c \; x' + \left( \frac{2}{\cosh^2 t} - 1\right)x =0$$
where $c$ is a constant.
 A: When $c=0$ we can guess that $x_1 = \frac{1}{\cosh t}$ is a solution. Then by inserting $x = x_1 \cdot u$ into equation it simplifies to:
$$u'' - 2 \tanh t \;u' = 0$$
From which we conclude that: $x(t) = \frac{C_1}{\cosh t} + C_2 \left(\sinh t + \frac{t}{\cosh t} \right)$.
For more general case when $c \neq 0$ we use substitution $x = w\,e^{-ct}$. The equation transforms to:
$$w'' = \left(1 + c^2 - \frac{2}{\cosh^2 t} \right)w \quad \quad (1)$$
the trick is to use Darboux theorem. Let's say we have two functions $y$ and $z$ that are solutions to:
$$y'' = p(t)y, \quad z'' = \left(p(t) - \lambda \right)z$$
then the function:
$$\overline{y} = y' - \frac{yz'}{z}$$
satisfies:
$$\overline{y}'' = \left( p - 2 \frac{d}{dt} \left(\frac{z'}{z} \right) \right)\overline{y} \quad\quad(2)$$
Taking $z=\cosh t$ and $p=1+c^2$ equation $(2)$ turns out to be $(1)$.
We solve:
$$y'' = (1+c^2) y \Rightarrow y = C_1 e^{\sqrt{1+c^2} t} + C_2 e^{-\sqrt{1+c^2} t}$$
then we plug in for $\overline{y} = w$ and $x$ which yields the final result:
$$x = C_1 \left(\sqrt{1+c^2} - \tanh t \right)e^{\sqrt{1+c^2} t - ct} + C_2 \left(\sqrt{1+c^2} + \tanh t \right)e^{-\sqrt{1+c^2} t - ct}$$
