Solution. We want to determine the integral of \sec^3(x), i.e.:
\begin{align*} I = \int \sec^3(x) dx. \end{align*}
\begin{align*} \int UdV = UV - \int VdU, \end{align*}
\begin{align*} U = \sec(x), \quad &dV = \sec^2(x)dx\\ dU = \sec(x)\tan(x)dx, \quad &V = \tan(x). \end{align*}
\begin{align*} I &= \int \sec^3(x) dx \\ &= \sec(x)\tan(x) - \int \sec(x)\tan^2(x)dx. \end{align*}
\begin{align*} \sec(x)\tan(x) - \int \sec(x)\tan^2(x) &= \sec(x)\tan(x) - \int \sec(x)(\sec^3(x) - 1)dx \\ &= \sec(x)\tan(x) - \int \sec^3(x)dx + \int \sec(x)dx \\ &= \sec(x)\tan(x) - I + \ln \lvert \sec(x) + \tan(x) \rvert, \end{align*}
\begin{align*} I &= sec(x)\tan(x) - I + \ln \lvert \sec(x) + \tan(x) \rvert \iff \\ 2I &= \sec(x)\tan(x) + \ln \lvert \sec(x) + \tan(x) \rvert \iff \\ \int \sec^3(x)dx &= \frac{1}{2} \sec(x)\tan(x) + \frac{1}{2}\ln \lvert \sec(x) + \tan(x) \rvert + C \end{align*}