8. $int x^{2}cos mxmathrm{d}x$

8. $int x^{2}cos mxmathrm{d}x$

8. $int x^{2}cos mxmathrm{d}x$

Answer

Explanation:

Step1: Use integration - by - parts formula $\int u\mathrm{d}v=uv-\int v\mathrm{d}u$

Let $u = x^{2}$, $\mathrm{d}v=\cos(mx)\mathrm{d}x$. Then $\mathrm{d}u = 2x\mathrm{d}x$, $v=\frac{1}{m}\sin(mx)$. So $\int x^{2}\cos(mx)\mathrm{d}x=\frac{x^{2}}{m}\sin(mx)-\frac{2}{m}\int x\sin(mx)\mathrm{d}x$.

Step2: Apply integration - by - parts again on $\int x\sin(mx)\mathrm{d}x$

Let $u = x$, $\mathrm{d}v=\sin(mx)\mathrm{d}x$. Then $\mathrm{d}u=\mathrm{d}x$, $v =-\frac{1}{m}\cos(mx)$. So $\int x\sin(mx)\mathrm{d}x=-\frac{x}{m}\cos(mx)+\frac{1}{m}\int\cos(mx)\mathrm{d}x$.

Step3: Integrate $\int\cos(mx)\mathrm{d}x$

$\int\cos(mx)\mathrm{d}x=\frac{1}{m}\sin(mx)+C$.

Step4: Substitute back

$\int x^{2}\cos(mx)\mathrm{d}x=\frac{x^{2}}{m}\sin(mx)-\frac{2}{m}\left(-\frac{x}{m}\cos(mx)+\frac{1}{m}\int\cos(mx)\mathrm{d}x\right)$ $=\frac{x^{2}}{m}\sin(mx)+\frac{2x}{m^{2}}\cos(mx)-\frac{2}{m^{3}}\sin(mx)+C$.

Answer:

$\frac{x^{2}}{m}\sin(mx)+\frac{2x}{m^{2}}\cos(mx)-\frac{2}{m^{3}}\sin(mx)+C$