Example 6.2.1. Integrating powers of sine and cosine.
Evaluate \(\ds\int\sin^3(x) \cos(x) \, dx\text{.}\)
Solution 1.
We have used substitution on problems similar to this problem in Section 5.6 . If we let \(u=\sin(x)\text{,}\) then \(du=\cos(x)\,dx\text{,}\) and
\begin{equation*}
\int \sin^3(x)\cos(x)\,dx = \int u^3 \,du = \frac{u^4}{4}+C = \frac14 \sin^4(x)+C\text{.}
\end{equation*}
But what if, for some reason, we wanted to let \(u=\cos(x)\) instead? Unfortunately, we have \(\sin^3(x)\) as part of our integrand, not just \(\sin(x)\text{.}\) The solution to this problem is to replace some of our powers of sine (two of them to be exact) with expressions that involve cosine. We will use the Pythagorean Identity \(\sin^2(x)=1-\cos^2(x)\text{.}\)
\begin{align*}
\int\sin^3(x) \cos(x) \, dx \amp =\int\sin(x)\cdot \sin^2(x) \cos(x) \, dx\\
\amp =\int\sin(x)\left(1-\cos^2(x)\right) \cos(x) \, dx\text{.}
\end{align*}
Now we let \(u=\cos(x)\) so that \(-du=\sin(x)\,dx\text{.}\)
\begin{align*}
\int\sin^3(x) \cos(x) \, dx \amp =\int\sin(x)\left(1-\cos^2(x)\right) \cos(x) \, dx\\
\amp =\int -\left(1-u^2\right)u\,du\\
\amp =\int -\left(u-u^3\right)\,du\\
\amp =-\frac{u^2}{2}+\frac{u^4}{4}+C\\
\amp =-\frac{\cos^2(x)}{2}+\frac{\cos^4(x)}{4}+C\text{.}
\end{align*}
This looks like a very different answer, so you might wonder if we went wrong somewhere. But in fact, the two answers are equivalent, in the sense that they differ by a constant! (So the “\(+C\)” is different in each case, if you like.) Notice that
\begin{align*}
\frac14\sin^4(x) \amp = \frac14(1-\cos^2(x))^2\\
\amp = \frac14-\frac12\cos^2(x)+\frac14\cos^4(x)\text{,}
\end{align*}
so the difference between the two answers is the constant \(\frac14\) .