Integrate $\int x\sec^2(x)\tan(x)\,dx$ $$\int x\sec^2(x)\tan(x)\,dx$$
I just want to know what trigonometric function I need to use. I'm trying to integrate by parts.  My book says that the integral equals
$${x\over2\cos^2(x)}-{\sin(x)\over2\cos(x)}+C$$

Hint: With $u = x$ and $dv = \sec^2 \tan(x)\,dx$, we have
$$
\int u \,dv = uv - \int v \,du = \frac 12 x \tan^2 x - \int \tan^2 x\,dx
$$
We can compute the integral of $\sec^2 \tan(x)$ with the $u$-substitution $u = \tan(x)$.
