<s>[INST] Integral of $2x^2 \sec^2{x} \tan{x}$ I've been trying for a while to find $\int{( 2x^2 \sec^2{x} \tan{x} )} dx$, using integration by parts.
I always end up getting a more complicated integral in the second part of the equation.
For example:
$$ \int{( 2x^2 \sec^2{x} \tan{x} )} dx =
\\ 2x^2 \tan^2x - \int{\tan{x} \cdot \frac{d}{dx}(2x^2 \tan{x})}
\\ \frac{d}{dx}(2x^2 \tan{x})=4x\tan{x} + 2x\sec^2{x} \rightarrow
\\ 2x^2 \tan^2x - \int{4x \tan^2{x}+2x\tan{x}\sec^2{x}}
$$
I've tried integrating with different value for $u$ and $v$, such as:
$$ 1:( 2x^2 \sec^2{x} \tan{x} ),
\\ \tan{x} : 2x^2 \sec^2{x},
\\ 2x^2: \sec^2{x} \tan{x},
\\ \sin{x}: 2x^2 \sec^3{x} $$ etc, however, haven't succeeded.
 [/INST] We have,
$\int \sec ^{2}x\tan {x}dx$
Put v = $\sec{x}$
Then dv = 2$\sec{x}\tan{x}$
So $\int (v) dv=\frac{1}{2}v^{2}=\frac{1}{2}\sec ^{2}x.$
Now use this result in question,
2$\int{(x^2 \sec^2{x} \tan{x} )} dx$
Integrating by parts, integrate $\sec^2x \tan{x}$ and differentiate $x^2$
We have,
2$\left[\frac{1}{2}x^{2}\sec ^{2}x-\int x\sec
^{2}x\,dx \right]$
Now again integration by parts on $ x\sec
^{2}x\,dx $ by integrating $\sec
^{2}x$ and differentiate x.
You got an answer.
</s>