# 009B Sample Midterm 3, Problem 4 Detailed Solution

Compute the following integrals:

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

(b)   ${\displaystyle \int _{-{\frac {\pi }{4}}}^{\frac {\pi }{4}}\cos ^{2}(x)\sin(x)~dx}$

Background Information:
How would you integrate  ${\displaystyle 2x(x^{2}+1)^{3}~dx?}$

You could use  ${\displaystyle u}$-substitution.

Let  ${\displaystyle u=x^{2}+1.}$
Then,  ${\displaystyle du=2x~dx.}$
Thus,

${\displaystyle {\begin{array}{rcl}\displaystyle {\int 2x(x^{2}+1)^{3}~dx}&=&\displaystyle {\int u^{3}~du}\\&&\\&=&\displaystyle {{\frac {u^{4}}{4}}+C}\\&&\\&=&\displaystyle {{\frac {(x^{2}+1)^{4}}{4}}+C.}\\\end{array}}}$

Solution:

(a)

Step 1:
We proceed using  ${\displaystyle u}$-substitution.
Let  ${\displaystyle u=x^{3}.}$
Then,  ${\displaystyle du=3x^{2}~dx}$  and  ${\displaystyle {\frac {du}{3}}=x^{2}~dx.}$
Therefore, we have

${\displaystyle \int x^{2}\sin(x^{3})~dx=\int {\frac {\sin(u)}{3}}~du.}$

Step 2:
We integrate to get

${\displaystyle {\begin{array}{rcl}\displaystyle {\int x^{2}\sin(x^{3})~dx}&=&\displaystyle {-{\frac {1}{3}}\cos(u)+C}\\&&\\&=&\displaystyle {-{\frac {1}{3}}\cos(x^{3})+C.}\\\end{array}}}$

(b)

Step 1:
We proceed using u substitution.
Let  ${\displaystyle u=\cos(x).}$
Then,  ${\displaystyle du=-\sin(x)~dx.}$
Since this is a definite integral, we need to change the bounds of integration.
We have
${\displaystyle u_{1}=\cos {\bigg (}-{\frac {\pi }{4}}{\bigg )}={\frac {\sqrt {2}}{2}}}$  and  ${\displaystyle u_{2}=\cos {\bigg (}{\frac {\pi }{4}}{\bigg )}={\frac {\sqrt {2}}{2}}.}$
Step 2:
Therefore, we get

${\displaystyle {\begin{array}{rcl}\displaystyle {\int _{-{\frac {\pi }{4}}}^{\frac {\pi }{4}}\cos ^{2}(x)\sin(x)~dx}&=&\displaystyle {\int _{\frac {\sqrt {2}}{2}}^{\frac {\sqrt {2}}{2}}-u^{2}~du}\\&&\\&=&\displaystyle {\left.{\frac {-u^{3}}{3}}\right|_{\frac {\sqrt {2}}{2}}^{\frac {\sqrt {2}}{2}}}\\&&\\&=&\displaystyle {0.}\\\end{array}}}$

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