Primitive of Square of Tangent of a x

Theorem

 * $\displaystyle \int \tan^2 a x \ \mathrm d x = \frac {\tan a x} a - x + C$

Also see

 * Primitive of $\cot^2 a x$