Answer
$\displaystyle \theta\tan\theta-\frac{1}{2}\theta^{2}-\ln|\sec\theta|+C$
Work Step by Step
Integrate by parts. $I=\displaystyle \int\theta\tan^{2}\theta d\theta=\int udv$
$\left[\begin{array}{ll}
u=\theta & dv=\tan^{2}\theta d\theta\\
& dv=(\sec^{2}\theta-1)d\theta\\
& \\
du=dv & v=\tan\theta-\theta
\end{array}\right] $
We changed $dv$ using a Pythagorean identity because 7. $\displaystyle \int\sec^{2}xdx=\tan x$
$I=\displaystyle \int\theta\tan^{2}\theta d\theta=uv-\int vdu$
$=\displaystyle \theta(\tan\theta-\theta)-\int(\tan\theta-\theta)d\theta$
... Use $13.\ \displaystyle \quad \int\tan xdx=\ln|\sec x|$
... and $1.\quad \displaystyle \int x^{\mathrm{n}}dx=\frac{x^{n+1}}{n+1} (n\neq-1)$
$=\displaystyle \theta\tan\theta-\theta^{2}-\ln|\sec\theta|+\frac{1}{2}\theta^{2}+C$
$=\displaystyle \theta\tan\theta-\frac{1}{2}\theta^{2}-\ln|\sec\theta|+C$