Answer
$\tan x - x + C$
Work Step by Step
$$\eqalign{
&\text{Let } I= \int {{{\tan }^2}x} dx \cr
& {\text{Rewrite the integrand using }}{\tan ^2}\theta = {\sec ^2}\theta - 1 \cr
& I = \int {\left( {{{\sec }^2}x - 1} \right)} dx \cr
& = \int {{{\sec }^2}x} dx - \int {dx} \cr
& {\text{Using basic formulas of integration we obtain}} \cr
& I = \tan x - x + C \cr} $$