I have a problem with the below fourier series
-2, -2 < t < -1
-1, -1 < t < 0
f(t) = 1, 0 < t < 1
2, 1 < t < 2
f(t + 4) = f(t)
I want to intergrate by parts to go on to solve bn but dont how what U will be.
That make the problem easier. $\displaystyle f(x)$ is an odd function so all of the $\displaystyle a_n$ must be zero.
$\displaystyle \displaystyle b_n=\frac{1}{2}\left[ \int_{-2}^{-1}-2\sin\left(\frac{n\pi x}{2} \right)dx + \int_{-1}^{0}-\sin\left(\frac{n\pi x}{2} \right)dx+\int_{0}^{1}\sin\left(\frac{n\pi x}{2} \right)dx+\int_{1}^{2}2\sin\left(\frac{n\pi x}{2} \right)dx \right]$
$\displaystyle \displaystyle b_n=-\frac{2}{\pi n}\left[ 2\cos(n\pi)-\cos\left( \frac{n \pi}{2}\right)-1\right]$
As I said in my first post you do not need integration by parts.
$\displaystyle \displaystyle \int \sin(ax)dx=-\frac{1}{a}\cos(ax)$
Or in your case
$\displaystyle \displaystyle \int \sin\left(\frac{\pi n}{L}x \right)dx=-\frac{L}{\pi n}\cos\left(\frac{\pi n}{L}x \right)$