# Evaluating the integral, correct?

1. Jan 18, 2008

### Zack88

1. The problem statement, all variables and given/known data

Evaluate the integral

$$\int x^2 \cos mx dx$$

2. Relevant equations

Evaluating the integral, correct?

3. The attempt at a solution

$$u = x^2$$
$$du = 2x$$
$$dv = \cos mx$$
$$v= \frac {\sin mx }{m}$$

(x^2)(sin mx / m) - [integral] (sin mx / m)(2x)

(x^2)(sin mx / m) - 2 [integral] (sin mx / m) (x)

[My final answer:] (x^2)(sin mx / m) + 2 (cos mx / m) + c

Last edited: Jan 18, 2008
2. Jan 18, 2008

### rocomath

3. Jan 18, 2008

### dynamicsolo

I believe you lost a term in evaluating the second term integral in this:

(x^2)(sin mx / m) - 2 [integral] (sin mx / m) (x) .

If you differentiate your final result,

(x^2)(sin mx / m) + 2 (cos mx / m) + c ,

you don't cancel out the additional terms beyond the original integrand...

4. Jan 18, 2008

### Zack88

i heard that i should do parts with xsinmx / m, should i do that?

5. Jan 18, 2008

### dynamicsolo

Yes, you'll need to do that. In general, integration of functions defined by polynomials times sin kx, cos kx, or e^kx need multiple stages of integration by parts.

6. Jan 18, 2008

### Zack88

ok with doing parts again confuses me since i have xsinmx /m. The u should it be m? but then what is the derivative of m?

7. Jan 18, 2008

### dynamicsolo

The 'm' is a constant, so that will not be involved in the integration. Make the integral
(1/m) · integral[ x sin(mx) ] dx . Now u = x and dv = sin(mx) dx . You can append the multiplicative constant (1/m) afterwards...

8. Jan 18, 2008

### Zack88

ok so now I have

x^2/m sinmx + 2/m [integral] xsinmx

u = x
du = dx

dv = sin mx
v = 1/m cos mx

and now im lost

9. Jan 18, 2008

### rocomath

Ok let's start from scratch.

$$I=\int x^2\cos{mx}dx$$

$$u=x^2$$
$$du=2xdx$$

$$dV=\cos{mx}dx$$
$$V=\frac{1}{m}\sin{mx}$$

$$I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\int x\sin{mx}dx$$

Now we have to do Parts again.

$$u=x$$
$$du=dx$$

$$dV=\sin{mx}dx$$
$$V=\frac{-1}{m}\cos{mx}$$

$$I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)$$

Now you can easily evaluate this Integral!!!

Last edited: Jan 18, 2008
10. Jan 18, 2008

### rocomath

Ok, I'm officially done typing! Sorry about that, had too many typographical errors.

11. Jan 18, 2008

### Zack88

$$I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\int\cos{mx}dx\right)$$
ok where did the last $$\int\cos{mx}dx\right)$$ come from

12. Jan 18, 2008

### rocomath

By doing Parts again to evaluate ...

$$\int x\sin{mx}dx$$

13. Jan 18, 2008

### Zack88

ok i see now, thank you, sad part is im not done with this question and i have one more just like it :(

Last edited: Jan 18, 2008
14. Jan 18, 2008

### rocomath

Post it and we'll work on it step by step.

15. Jan 18, 2008

### Zack88

[integral] e^-x cos 2x dx

u = e^-x
du = -e^-x

dv = cos 2x
v = sin 2x / 2

16. Jan 18, 2008

### rocomath

17. Jan 18, 2008

### rocomath

$$I=\int e^{-x}\cos{2x}dx$$

$$u=e^{-x}$$
$$du=-e^{-x}dx$$

$$dV=\cos{2x}dx$$
$$V=\frac{1}{2}\sin{2x}$$

$$I=\frac{1}{2}e^{-x}\sin{2x}+\frac{1}{2}\int e^{-x}\sin{2x}dx$$

Ok done typing. Evaluate your current Integral, notice that your Original Integral reappears? Just move it to the left then divide by the constant and you're done!

Last edited: Jan 18, 2008
18. Jan 18, 2008

### Zack88

ok so $$\frac{1}{2}\int e^{-x}\sin{2x}dx$$ turns into -1/2e^-xcos2x + c?

Last edited: Jan 18, 2008
19. Jan 18, 2008

### rocomath

You're supposed to have "2" Parts just like any Integration by Parts.

What is the other term?

20. Jan 18, 2008

### Zack88

so i dont take the integral just yet? i do another integration by parts?