In this article, I calculate the indefinite integral of $trig^6(x)$ using reduction formulas.
The reduction formula for $\sin$ is
\[I_n = \int \sin^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1\\ I_n = -\dfrac{1}{n}\sin^{n-1}(x)\cos(x) + \dfrac{n-1}{n} I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= -\dfrac{1}{6}\sin^{5}(x)\cos(x) + \dfrac{5}{6} I_{4} \\ I_4 &= -\dfrac{1}{4}\sin^{3}(x)\cos(x) + \dfrac{3}{4} I_{2} \\ I_2 &= -\dfrac{1}{2}\sin(x)\cos(x) + \dfrac{1}{2} I_{0} \\ I_0 &= x + C \\ \therefore\\ I_6 &= -\dfrac{1}{6}\sin^{5}(x)\cos(x) -\dfrac{5}{6} \cdot \dfrac{1}{4} \sin^{3}(x)\cos(x) +\dfrac{5}{6} \cdot \dfrac{3}{4} \cdot \dfrac{1}{2}\sin(x)\cos(x) +\dfrac{5}{6} \cdot \dfrac{3}{4} \cdot \dfrac{1}{2}x + C \\ &= -\dfrac{1}{6}\sin^{5}(x)\cos(x) -\dfrac{5}{24}\sin^{3}(x)\cos(x) +\dfrac{5}{16}\sin(x)\cos(x) +\dfrac{5}{16}x + C \end{aligned}\]This gives the integral using the reduction formula.
Alternatively, we can expand $\sin^6(x)$ using the power-reduction identity:
\[\begin{aligned} \sin^2(x) &= \dfrac{1-\cos(2x)}{2} \\ \therefore \int \sin^6(x) \,\mathrm{d}x &= \int (\sin^2(x))^3 \,\mathrm{d}x \\ &= \int \left(\dfrac{1-\cos(2x)}{2}\right)^3 \,\mathrm{d}x \\ &= \dfrac{1}{8} \int ( 1-3\cos(2x) + 3\cos^2(2x) - \cos^3(2x) ) \,\mathrm{d}x \\ &= \dfrac{1}{8} \left( \int 1 \,\mathrm{d}x - 3\int \cos(2x) \,\mathrm{d}x + 3\int \cos^2(2x) \,\mathrm{d}x - \int \cos^3(2x) \,\mathrm{d}x \right) \\ \because \int 1 \,\mathrm{d}x &= x + C_1 \\ \int \cos(2x) \,\mathrm{d}x &=\dfrac{\sin(2x)}{2} + C_2 \\ \int \cos^2(2x) \,\mathrm{d}x &= \dfrac{x}{2} + \dfrac{\sin4x}{8} + C_3 \\ \int \cos^3(2x) \,\mathrm{d}x &= \dfrac{\sin(2x)}{2} - \dfrac{\sin^3(2x)}{6} + C_4 \\ \\ \therefore \int \sin^6(x) \,\mathrm{d}x &= \dfrac{5}{16}x - \dfrac{15}{32}\sin(2x) + \dfrac{3}{32}\sin(4x) + \dfrac{\sin^3(2x)}{32} + C \end{aligned}\]Ref:
The reduction formula for $\cos$ is
\[I_n = \int \cos^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1\\ I_n = \dfrac{1}{n}\cos^{n-1}(x)\sin(x) + \dfrac{n-1}{n} I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= \dfrac{1}{6}\cos^{5}(x)\sin(x) + \dfrac{5}{6} I_{4} \\ I_4 &= \dfrac{1}{4}\cos^{3}(x)\sin(x) + \dfrac{3}{4} I_{2} \\ I_2 &= \dfrac{1}{2}\cos(x)\sin(x) + \dfrac{1}{2} I_{0} \\ I_0 &= x + C \\ \therefore\\ I_6 &= -\dfrac{1}{6}\cos^{5}(x)\sin(x) -\dfrac{5}{6} \cdot \dfrac{1}{4} \cos^{3}(x)\sin(x) +\dfrac{5}{6} \cdot \dfrac{3}{4} \cdot \dfrac{1}{2}\cos(x)\sin(x) +\dfrac{5}{6} \cdot \dfrac{3}{4} \cdot \dfrac{1}{2}x + C \\ &= -\dfrac{1}{6}\cos^{5}(x)\sin(x) -\dfrac{5}{24}\cos^{3}(x)\sin(x) +\dfrac{5}{16}\cos(x)\sin(x) +\dfrac{5}{16}x + C \end{aligned}\]The reduction formula for $\tan$ is
\[I_n = \int \tan^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1 \\ I_n = \dfrac{\tan^{n-1}(x)}{n-1} - I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= \dfrac{1}{5}\tan^{5}(x) - I_{4} \\ I_4 &= \dfrac{1}{3}\tan^{3}(x) - I_{2} \\ I_2 &= \tan(x) - I_{0} \\ I_0 &= x + C \\ \therefore\\ I_6 &= \dfrac{1}{5}\tan^{5}(x) -\dfrac{1}{3}\tan^{3}(x) +\tan(x) -x +C \end{aligned}\]The reduction formula for $\cot$ is
\[I_n = \int \cot^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1 \\ I_n = -\dfrac{\cot^{n-1}(x)}{n-1} - I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= -\dfrac{1}{5}\cot^{5}(x) - I_{4} \\ I_4 &= -\dfrac{1}{3}\cot^{3}(x) - I_{2} \\ I_2 &= -\cot(x) - I_{0} \\ I_0 &= x + C \\ \therefore\\ I_6 &= -\dfrac{1}{5}\cot^{5}(x) +\dfrac{1}{3}\cot^{3}(x) -\cot(x) -x +C \end{aligned}\]The reduction formula for $\sec$ is
\[I_n = \int \sec^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1 \\ I_n = \dfrac{\sec^{n-2}(x)\tan(x)}{n-1} + \dfrac{n-2}{n-1} I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= \dfrac{1}{5}\sec^{4}(x)\tan(x) + \dfrac{4}{5} I_{4} \\ I_4 &= \dfrac{1}{3}\sec^{2}(x)\tan(x) + \dfrac{2}{3} I_{2} \\ I_2 &= \tan(x) + C \\ \therefore\\ I_6 &= \dfrac{1}{5}\sec^{4}(x)\tan(x) + \dfrac{4}{5} \cdot \dfrac{1}{3}\sec^{2}(x)\tan(x) + \dfrac{4}{5} \cdot \dfrac{2}{3}\tan(x) + C \\ &= \dfrac{1}{5}\sec^{4}(x)\tan(x) + \dfrac{4}{15}\sec^{2}(x)\tan(x) + \dfrac{8}{15}\tan(x) + C \end{aligned}\]The reduction formula for $\csc$ is
\[I_n = \int \csc^n(x) \,\mathrm{d}x, n \in \mathbb{N}, n > 1 \\ I_n = -\dfrac{\csc^{n-2}(x)\cot(x)}{n-1} + \dfrac{n-2}{n-1} I_{n-2}\]Applying the formula step by step:
\[\begin{aligned} I_6 &= -\dfrac{1}{5}\csc^{4}(x)\cot(x) + \dfrac{4}{5} I_{4} \\ I_4 &= -\dfrac{1}{3}\csc^{2}(x)\cot(x) + \dfrac{2}{3} I_{2} \\ I_2 &= -\cot(x) + C \\ \therefore\\ I_6 &= -\dfrac{1}{5}\csc^{4}(x)\cot(x) -\dfrac{4}{5} \cdot \dfrac{1}{3}\csc^{2}(x)\cot(x) -\dfrac{4}{5} \cdot \dfrac{2}{3}\cot(x) + C \\ &= -\dfrac{1}{5}\csc^{4}(x)\cot(x) -\dfrac{4}{15}\csc^{2}(x)\cot(x) -\dfrac{8}{15}\cot(x) + C \end{aligned}\]