How do I solve this integral with hyperbolic functions? I was studying mechanics when I f ound a problem that lead to an integral that I can't solve. Basically the problem asked to find the period of oscillation function of the energy $E$ of a particle (mass $m$) in a field with a potential defined by:
$\displaystyle U(x) = -\frac{U_0}{\cosh^2(\alpha x)}$ with $-U_0 < E < 0$
From the differential equation $\displaystyle \frac{1}{2}m\dot{x}^2 -\frac{U_0}{\cosh^2(\alpha x)} = E$ you get the following integral for the period:
$\displaystyle T = 2\sqrt{2m} \int_0^{x_1} \frac{dx}{\sqrt{E + \frac{U_0}{\cosh^2(\alpha x)}}} $
Where $x_1$ is the positive solution of the equation $U(x) = E \implies \displaystyle x_1 = \frac{1}{\alpha} \cosh^{-1} \left( \sqrt{-\frac{U_0}{E}}\right)$. 
The integral can then be written as:
$\displaystyle T = \frac{2\sqrt{2m}}{\alpha\sqrt{|E|}} \int_0^{\alpha x_1} \frac{dx}{\sqrt{1 + \frac{U_0}{E}\frac{1}{\cosh^2(x)}}}$
and that's where my solution stops... I can't find a good substitution to solve this. Thanks.

When pulling $\sqrt{\lvert E\rvert}$ out of the denominator, you made a sign error. Since $E < 0$, you have
$$E + \frac{U_0}{\cosh^2 (\alpha x)} = (-E)\left(- 1 + \frac{-U_0/E}{\cosh^2 (\alpha x)}\right),$$
so the period would be
$$T = \frac{2\sqrt{2m}}{\alpha\sqrt{\lvert E\rvert}} \int_0^{\alpha x_1} \frac{dx}{\sqrt{\frac{-U_0/E}{\cosh^2 x} - 1}}.$$
Now let us write $c^2 = -U_0/E$ and $\gamma = \cosh^{-1} c = \alpha x_1$. Substituting $u = \cosh x$, we find
$$\begin{align}
\int_0^\gamma \frac{dx}{\sqrt{\left(\frac{c}{\cosh x}\right)^2-1}} &= \int_1^c \frac{1}{\sqrt{\left(\frac{c}{u}\right)^2-1}}\cdot \frac{du}{\sqrt{u^2-1}}\\
&= \int_1^c \frac{u\,du}{\sqrt{(c^2-u^2)(u^2-1)}}\\
&= \frac{1}{2}\int_1^{c^2} \frac{dv}{\sqrt{(c^2-v)(v-1)}}\tag{$v = u^2$}\\
&= \frac{1}{2} \int_1^{c^2} \frac{\sqrt{(c^2-v)(v-1)}}{c^2-1}\left(\frac{1}{v-1} + \frac{1}{c^2-v}\right)\,dv\\
&= \frac{1}{2} \int_1^{c^2} \sqrt{\frac{c^2-v}{v-1}} + \sqrt{\frac{v-1}{c^2-v}}\,dv.
\end{align}$$
Now we can substitute $t = \frac{c^2-v}{v-1}$ for the first summand, and $t = \frac{v-1}{c^2-v}$ for the second to obtain
$$\begin{align}
\int_0^\gamma \frac{dx}{\sqrt{\left(\frac{c}{\cosh x}\right)^2-1}} &= \int_0^\infty \frac{\sqrt{t}}{(t+1)^2}\,dt\tag{$\ast$}\\
&= B\left(\tfrac{1}{2},\tfrac{3}{2}\right)\\
&= \frac{\Gamma\left(\frac{1}{2}\right)\Gamma\left(\frac{3}{2}\right)}{\Gamma(2)}\\
&= \frac{\sqrt{\pi}\cdot \frac{1}{2}\sqrt{\pi}}{1}\\
&= \frac{\pi}{2},
\end{align}$$
and
$$T = \frac{\sqrt{2m}\cdot\pi}{\alpha\sqrt{\lvert E\rvert}}.$$
An alternative way to evaluate the integral $(\ast)$ is the residue theorem:
Choosing the branch of $\sqrt{z}$ with $\operatorname{Im}\sqrt{z} > 0$ on $\mathbb{C}\setminus [0,\infty)$ and a keyhole contour, the integrals over the circular arcs tend to $0$ in the limit, and $\lim\limits_{\varepsilon \downarrow 0} \sqrt{t+i\varepsilon} = \sqrt{t}$, $\lim\limits_{\varepsilon\downarrow 0} \sqrt{t-i\varepsilon} = -\sqrt{t}$ lead to
$$2\int_0^\infty \frac{\sqrt{t}}{(t+1)^2}\,dt = 2\pi i \operatorname{Res} \left(\frac{\sqrt{z}}{(z+1)^2}; -1\right) = 2\pi i \frac{1}{2\sqrt{-1}} = \pi.$$
