If you've been there before, so to speak, and you know what the solution is to look like, then Alan's ' trial solution ' method is quickest.

Assume that

\(\displaystyle v=A\tanh(Bt), \text{ then}\\\frac{dv}{dt}=AB\text{ sech} ^{2}(Bt)=AB(1-\tanh^{2}(Bt))=AB -\frac{B}{A}v^{2}\)

Equate coefficients with the given equation and solve for A and B.

If you have to get there from scratch, with one eye on the upcoming algebra, write \(\displaystyle \frac{dv}{dt}=k_{2}(K^{2}-v^{2}),\text{ where, for convenience, } K^{2}=k_{1}/k_{2}.\)

then \(\displaystyle \int \frac{dv}{K^{2}-v^{2}}=\int k_{2}dt\)

\(\displaystyle \frac{1}{2K}\int \frac{1}{K+v}+\frac{1}{K-v}dv=\frac{1}{2K}\ln\left(\frac{K+v}{K-v}\right)=k_{2}t + C\), \(\displaystyle v=0 \text{ when } t=0, \text{ so } C=0.\)

\(\displaystyle \frac{K+v}{K-v}=e^{2Kk_{2}t} \text{ from which }\quad v= K\left(\frac{e^{2Kk_{2}t}-1}{e^{2Kk_{2}t}+1}\right)=K\left(\frac{e^{Kk_{2}t}-e^{-Kk_{2}t}}{e^{Kk_{2}t}+e^{Kk_{2}t}}\right)=K\left(\frac{\sinh (Kk_{2}t)}{\cosh(Kk_{2}t)}\right)\\=K\tanh(Kk_{2}t)\).

Substitution for K now gets us the earlier mentioned solution (Alan's solution).

To find x, integrate wrt t,

\(\displaystyle \int v\,dt= x =K\int\tanh(Kk_{2}t)\,dt=\frac{K}{Kk_{2}}\ln(\cosh(Kk_{2}t))+D\\\text{ and since } x=0\text{ when }t=0, D=0.\)

Substituting for K,

\(\displaystyle x=\frac{1}{k_{2}}\ln(\cosh(\sqrt{k_{1}k_{2}}t)\)

.