This example is already given entirely as tangents and secants, with everything in the numerator. The power of secant is even, so I can solve \(\sec^2 x\text{.}\) I can write the remaining \(\sec^2 x\) as \((1 + \tan^2 x)\text{.}\) Therefore, I’ll use the substitution \(u = \tan x\) with \(du = \sec^2 x dx\text{.}\) Since this is a definite integral, I can also change the bounds with the substitution: \(u(0) = 0\text{,}\) \(u\left(\frac{\pi}{3}
\right) = \sqrt{3}\text{.}\) After the substitution, this is an integral of polynomial terms, which I can split up with linearity, use the power rule to find antiderivaitves, and evaluate on the bounds.
\begin{align*}
\int_0^{\frac{\pi}{3}} \tan^5 x \sec^4 x dx \amp =
\int_0^{\frac{\pi}{3}} \tan^5 x (1 + \tan^2 x) \sec^2 x
dx\\
\amp = \int_0^{\sqrt{3}} u^5 (1+u^2) du =
\int_0^{\sqrt{3}} u^5 + u^7 du = \frac{u^6}{6} +
\frac{u^8}{8} \Bigg|_0^{\sqrt{3}} \\
\amp = \frac{3^3}{6} + \frac{3^4}{8} = \frac{4\cdot 3^3
+ 3\cdot 3^4}{24} = \frac{108 + 243}{24} =
\frac{351}{24} = \frac{117}{8}
\end{align*}
I could have solved this integral using my first method as well: converting everything into sines and cosines. Let me do that as well in this example, to show that the result is the same. (This also demonstrate the important point that for some integrals, multiple different techniques can all be successful.) Let me start by converting everything into sine and cosine.
\begin{equation*}
\int_0^{\frac{\pi}{3}} \tan^5 x \sec^4 x dx =
\int_0^{\frac{\pi}{3}} \frac{\sin^5 x}{\cos^9 x} dx
\end{equation*}
There is an odd power of sine in the numerator, so I’d like to isolate one sine term and change all the rest to cosine. I can do this with the squared identity. After doing so, I can use the substitution \(u = \cos x\) with \(du =
-\sin x dx\text{.}\) Again, since this is a definite integral, I change the bounds as well with the substitution \(u(0) =
1\text{,}\) \(u(\frac{\pi}{3}) = \frac{1}{2}\text{.}\)
\begin{align*}
\amp = \int_0^{\frac{\pi}{3}} \frac{\sin^5 x}{\cos^{9} x}
dx\\
\amp = \int_0^{\frac{\pi}{3}} \frac{(1-\cos^2
x)^2}{\cos^{9} x} \sin x dx\\
\amp = -\int_1^{\frac{1}{2}} \frac{(1-u^2)^2}{u^{9}} du =
\int_{\frac{1}{2}}^1 \frac{1 - 2u^2 + u^4}{u^{9}} du\\
\amp = \int_{\frac{1}{2}}^1 \left( \frac{1}{u^{9}} -
\frac{2}{u^7} + \frac{1}{u^5} \right) du
= \int_{\frac{1}{2}}^1 \frac{1}{u^{9}} -
\int_{\frac{1}{2}}^1 \frac{2}{u^7} du
+ \int_{\frac{1}{2}}^1 \frac{1}{u^5} du
\end{align*}
After the substitution, I expanded the numerator and split up the fraction into three pieces. Using linearity, the integral splits into three integrals. Now I have three power rule integrals, which I can find antiderivatives for, evalutate on bounds, and do some arithmetic to finish the integral. Notice that the arithmetic is quite different from the first solution (and a little more complicated), but it does end up in with the same final answer.
\begin{align*}
\amp = \int_{\frac{1}{2}}^1 \frac{1}{u^{9}} -
\frac{2}{u^7} + \frac{1}{u^5} du = \left(
\frac{-1}{8u^{8}} + \frac{2}{6u^6} - \frac{1}{4u^4}
\right) \Bigg|_{\frac{1}{2}}^1\\
\amp = \left( \frac{-1}{8} + \frac{1}{3} - \frac{1}{4} +
\frac{2^{8}}{8} - \frac{2^6}{3} + \frac{2^4}{4} \right)\\
\amp = \frac{-3+8-6+2^{8}\cdot 3 - 2^6 \cdot 8 + 2^4
\cdot 6}{24}\\
\amp = \frac{-3+8-6+768-512+96}{24} = \frac{351}{24} =
\frac{117}{8}
\end{align*}