Integration of $(\tan x\sec x)^3$ How do you integrate the following function? I've been struggling with this one for quite a while now. Any help would be very much appreciated.
$$\int(\tan(x)\sec(x))^3dx$$
 A: The key facts for tangent and secant product integrals are that the derivative of $\tan(x)$ is $\sec(x)^2$ and the derivative of $\sec(x)$ is $\sec(x) \tan(x)$. So the situation is good if you have only one factor of tangent or if you have two factors of secant. Here you will achieve the first one by making two of the factors of tangent into secants:
$$\int \tan(x)^3 \sec(x)^3 dx = \int \sec(x)^5 \tan(x) dx - \int \sec(x)^3 \tan(x).$$
Now each of these have some number of powers of secant and one power of tangent, which makes them approachable with $u=\sec(x)$.
A: differentiate this with respect to $x$
$$\frac{\sec ^5(x)}{5}-\frac{\sec ^3(x)}{3}$$
A: Hint: $\tan'x=1+\tan^2x=\sec^2x$. The integrand then becomes $t^3\sqrt{t^2+1}$, which begs for a substitution of the form $u=t^2+1$, since $t^3=t\cdot t^2=\dfrac{\big(t^2+1\big)'}2\cdot\Big[\big(t^2+1\big)-1\Big]$.
A: First notice that $\sec(x)\tan(x)$ is the derivative of $\sec(x)$. We will peel one off and hold it in reserve for $u$-substitution later.
$$\int (\sec(x)\tan(x))^2 (\sec(x)\tan(x))dx$$
Now we have the wonderful Pythagorean identities: $$\tan^2(x)+1 =\sec^2(x)$$ so replacing $\tan^2(x)$ with $\sec^2(x)-1$ we arrive at:
$$\int \sec^2(x) (\sec^2(x) - 1) (\sec(x)\tan(x)) dx.$$ Now let $u=\sec(x)$, and we have:
$$\int u^2 (u^2-1) du$$ and you can take it from here.
A: \begin{align}
\int{\tan^3x\sec^3x}
& =\int{(\tan{x}sec{x})^2(\tan{x}\sec{x})dx}\\
& =\int{(\tan^2{x}sec^2{x})d\sec{x}}\\
& =\int{(\sin^2{x}\sec^4{x})d\sec{x}}\\
& =\int{(1-\cos^2{x})(\sec^4{x})d\sec{x}}\\
& =\int{(\sec^4{x}-\sec^2{x})d\sec{x}}\\
& =\frac{\sec^5x}{5}-\frac{\sec^3x}3+C
\end{align}
