Proof. We want to determine the integral of \tan^2(x), that is:
\begin{align*} \int \tan^2(x) dx. \end{align*}
\begin{align*} \tan^2(x) + 1 = \sec^2(x). \end{align*}
\begin{align*} \int \tan^2(x) dx = \int (\sec^2(x) - 1)dx. \end{align*}
\begin{align*} \int \tan^2(x) dx &= \int (\sec^2(x) - 1)dx \\ &= \int \sec^2(x)dx - \int 1\cdot dx \\ &= \tan(x) - x + C. \end{align*}