1. ## fourier series again

f(x) = xsin(px)

to calculate the fourier series, I am struggling.. do I need to distinguish between when p = n?

I am really struggling with the integration of this.. could somebody please show me how I would go about it? many thanks

2. Originally Posted by James0502
f(x) = xsin(px)

to calculate the fourier series, I am struggling.. do I need to distinguish between when p = n?

I am really struggling with the integration of this.. could somebody please show me how I would go about it? many thanks
Is $p$ a positive integer?

3. yes, sorry, that wasnt clear

any help would be so greatly appreciated!

4. Originally Posted by James0502
yes, sorry, that wasnt clear

any help would be so greatly appreciated!
Here's what I got

$a_0 = \frac{1}{\pi} \int_{- \pi}^{\pi} x \sin p x\, dx = - \frac{2 (-1)^p}{p}$

$a_n = \frac{1}{\pi} \int_{- \pi}^{\pi} x \sin p x \cos nx\, dx = - \frac{2 p}{p^2 -n^2}\,(-1)^{p+n}\;\;\;n \ne p$

$a_n = - \frac{1}{2p},\;\;\;n = p$

The series

$\frac{a_0}{2} + \sum_{i=1}^{\infty} a_n \cos nx$