# Homework Help: What's the indefinite integral formula?

1. Aug 19, 2008

### afcwestwarrior

1. The problem statement, all variables and given/known data
evaluate the integral
∫x^2 sinpi x dx

2. Relevant equations
∫u dv= uv - ∫v du
integration by parts formula

3. The attempt at a solution
u=x^2 dv= sin pi x dx
du = 2x v = -cos pi x dx ?????? the pi is giving me trouble

2. Aug 19, 2008

### rootX

Why?
Would using 3.14 instead of pi would help?

Sorry, I am not used to this type of Int by parts. I make
d/dx (f(x)) = .. equation and integrate

But, seems like you having trouble integrating cos(pi*x)?

3. Aug 19, 2008

### afcwestwarrior

4. Aug 19, 2008

### afcwestwarrior

my answer is -1/pi cos pi x + 1/pi 2x sin pi x - 2(1/pi) -cos pi x +c
but in the back of the book the answer is - 1/pi cos pi x + 2/pi^2 sin pi x + 2/pi^3 cos pi x +c

5. Aug 19, 2008

### rootX

possible that you can write out the solution?

I hate to simplify and compare but this is what I got with matlab if you want confirm it with book:

>> int('x^2*sin(pi*x)','x')

ans =

1/pi^3*(-pi^2*x^2*cos(pi*x)+2*cos(pi*x)+2*pi*x*sin(pi*x))

Last edited: Aug 19, 2008
6. Aug 19, 2008

### afcwestwarrior

here's me work

u=x^2 dv= sin pi x
du = 2x v = 1/pi -cos pi x dx

x^2 (1/pi) (-cos pi x) -∫2x (1/pi) -cos pi x dx or - (1/pi) x^2 (cos pi x) + (1/pi) ∫2x cos pi x dx

u=2x dv= (1/pi) cos pi x
du=2 v= (1/pi) sin pi x

(1/pi) ∫2x cos pi x dx= 2x (1/pi) sin pi x - ∫ 2(1/pi) sin pi x dx
plug this equation to the other one and you get

(1/pi) x^2 (cos pi x) + (2/pi) x sin pi x + 2/pi cos pi x + c

7. Aug 19, 2008

### rootX

You are forgetting to divide by pi when you substitute (you are multiplying by 2 but forgetting about pi as it is 2/pi?)
and second problem is you should have cos(pi*x)/pi^2 but you have cos(pi*x)/pi

Only seems to be coefficient problem, everything else looks good!

8. Aug 19, 2008

### tiny-tim

Hi afcwestwarrior!

(have a pi: π )

The only difference is that you have 1/π everywhere, but the answer has 1/π2 or 1/π3

that's because each time you integrate a function of (πx), you must divide by π …

two integrations π2, three integrations π3.

9. Aug 19, 2008

### afcwestwarrior

Ok, so your saying that i have to divide by pi each time i integrate a function of nx.

10. Aug 19, 2008

### afcwestwarrior

so if that pi were a 5, then i'd have to divide by 5 each time right

11. Aug 19, 2008

### afcwestwarrior

I get it now thanks.