# 009B Sample Final 3, Problem 5

Find the following integrals.

(a)  ${\displaystyle \int x\cos(x)~dx}$

(b)  ${\displaystyle \int \sin ^{3}(x)\cos ^{2}(x)~dx}$

Foundations:
1. Integration by parts tells us that
${\displaystyle \int u~dv=uv-\int v~du.}$
2. Since  ${\displaystyle \sin ^{2}x+\cos ^{2}x=1,}$  we have
${\displaystyle \sin ^{2}x=1-\cos ^{2}x.}$

Solution:

(a)

Step 1:
To calculate this integral, we use integration by parts.
Let  ${\displaystyle u=x}$  and  ${\displaystyle dv=\cos xdx.}$
Then,  ${\displaystyle du=dx}$  and  ${\displaystyle v=\sin x.}$
Therefore, we have
${\displaystyle \int x\cos(x)~dx=x\sin x-\int \sin x~dx.}$
Step 2:
Then, we integrate to get
${\displaystyle \int x\cos(x)~dx=x\sin x+\cos x+C.}$

(b)

Step 1:
First, we use the identity  ${\displaystyle \sin ^{2}x=1-\cos ^{2}x}$  to get
${\displaystyle {\begin{array}{rcl}\displaystyle {\int \sin ^{3}(x)\cos ^{2}(x)~dx}&=&\displaystyle {\int \sin ^{2}x(\cos ^{2}x)\sin x~dx}\\&&\\&=&\displaystyle {\int (1-\cos ^{2}x)(\cos ^{2}x)\sin x~dx.}\end{array}}}$
Step 2:
Now, we use  ${\displaystyle u}$-substitution.
Let  ${\displaystyle u=\cos(x).}$
Then,  ${\displaystyle du=-\sin(x)dx}$  and  ${\displaystyle -du=\sin(x)dx.}$
Therefore, we have
${\displaystyle {\begin{array}{rcl}\displaystyle {\int \sin ^{3}(x)\cos ^{2}(x)~dx}&=&\displaystyle {\int (-1)(1-u^{2})u^{2}~du}\\&&\\&=&\displaystyle {\int u^{4}-u^{2}~du}\\&&\\&=&\displaystyle {{\frac {u^{5}}{5}}-{\frac {u^{3}}{3}}+C}\\&&\\&=&\displaystyle {{\frac {\cos ^{5}x}{5}}-{\frac {\cos ^{3}x}{3}}+C.}\end{array}}}$

(a)    ${\displaystyle x\sin x+\cos x+C}$
(b)    ${\displaystyle {\frac {\cos ^{5}x}{5}}-{\frac {\cos ^{3}x}{3}}+C}$