\(\displaystyle \begin{cases}u=x & dv=(\cos^2(x))^{-1}dx=\sec^2(x)dx \\ du=dx & v=\tan(x)\end{cases}\)
Thus
\(\displaystyle uv - \int {\tan (x)dx = x\tan (x) + \log (\cos (x)) + c} \)
Some people use "log" for "natural log" as above. I'm using "ln."
The argument needs absolute value bars:
\(\displaystyle uv \ - \ \int {\tan (x)dx \ = \ x\tan (x) \ + \ \ln|\cos (x)| \ + \ C} \)
Source:
http://math2.org/math/integrals/more/tan.htm