Example 11. Find $\int \operatorname{tg}^{2} x d x$.
Solution. Using the formula $1+\operatorname{tg}^{2} x=\frac{1}{\cos ^{2} x}$, we obtain the standard integrals:

$$
\int \operatorname{tg}^{2} x d x=\int\left(\frac{1}{\cos ^{2} x}-1\right) d x=\operatorname{tg} x-x+C
$$