Answer
$-\displaystyle \frac{1}{2}\ln|\sec x+\tan x|+\frac{1}{2}\sec x\tan x+C$
Work Step by Step
$I=\displaystyle \int\tan^{2}x\sec xdx$
From the Strategy for Evaluating $\displaystyle \int\tan^{m}x\sec^{n}xdx$, case (a)
we use $\sec^{2}x=1+\tan^{2}x$
$I=\displaystyle \int\left(-1+\sec^{2}(x)\right)\sec(x)dx$
$=\displaystyle \int-\sec(x)dx+\int\sec^{3}(x)dx$
The first integral is given under the "Strategy.."
$\left[\begin{array}{l}
-\int\sec xdx=-\ln|\sec x+\tan x|+C\\
\end{array}\right]$
The second integral was solved in Example 8.
$\left[\begin{array}{l}
\int\sec^{3}(x)dx=\frac{1}{2}(\sec x\tan x+\ln|\sec x+\tan x|)+C
\end{array}\right]$
$I=-\displaystyle \ln|\sec x+\tan x|+\frac{1}{2}(\sec x\tan x+\ln|\sec x+\tan x|)+C$
$I=-\displaystyle \frac{1}{2}\ln|\sec x+\tan x|+\frac{1}{2}\sec x\tan x+C$