Primitive of Square of Tangent Function

Theorem

 * $\displaystyle \int \tan^2 x \ \mathrm d x = \tan x - x + C$

where $C$ is an arbitrary constant.