# Homework Help: Integration by parts (2-x)cos(nPi/2)x?

1. Jan 23, 2012

### Splint

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

I'm doing fouier transforms and I'm not sure how to integrate (2-x)cos(nPi/2)x, (1,2). Anyone able to help me out? Even the indefinite integral would be fine.

2. Relevant equations

3. The attempt at a solution
I guess u would be (2-x) and dv would be cos(nPi/2)x dx. I'm not sure how to handle (nPi/2) since it is not a constant. Does (nPi/2) stay with x at all times?
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

Last edited: Jan 23, 2012
2. Jan 23, 2012

### ehild

n pi/2 IS a constant during the integration with respect to x.
Yes, it will be fine if you integrate by parts. How is the function exactly defined? Are you sure that you wrote the cosine function correctly? .

ehild

Last edited: Jan 23, 2012
3. Jan 23, 2012

### Splint

Thanks Ehild,

It's actually a half range expansion. The function is:

f(x)= (1, 0<x<1
(2-x, 1=<x=<2

So I believe the cosine function is correct. I wont try and integrate it right now but I should be ok with it.

Many thanks
Splint