so I have a problem and I ALMOST have it, but get stuck at the very end (you'll see why)

so what we are given is a simple periodic function:

$f(t)\begin{cases}5\sin t & 0\leq t\leq\pi\\0 & \pi \leq t \leq 2\pi \end{cases}$

where $T=2\pi$ and $\omega=1$

I'm really uncomfortable using the even/odd shortcuts, because my teacher has done a very poor job explaining it all, so I just used the general formulae...

what I got was this:

$a\_{n}=\frac{1}{\pi}\left[\int\_{0}^{\pi}5 \sin t \cos (nt)+\int\_{\pi}^{2\pi}0\*\cos (nt) \right]$

and therefore only:

$a\_{n}=\frac{5}{\pi}\left[\int\_{0}^{\pi}\sin t \cos (nt) \right]$

using

$\sin(mt)\cos(nt) = \frac{1}{2}\left[\sin((m-n)t)+\sin((m+n)t)\right]$

we have:

$a\_{n}=\frac{5}{2\pi}\left[\int\_{0}^{\pi}\sin((m-n)t)+\int\_{0}^{\pi}\sin((m+n)t) \right]$

$a\_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\cos((1-n)t)\right)\_0^\pi+\left(\left(\frac{-1}{1+n}\right)\cos((1+n)t)\right)\_0^\pi \right]$

$a\_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\left(-1-1\right)\right)+\left(\left(\frac{-1}{1+n}\right)\left(-1-1\right)\right) \right]$

$a\_{n}=\frac{5}{2\pi}\left[\left(\frac{2}{1-n}\right)+\left(\frac{2}{1+n}\right) \right]$

$a\_{n}=\frac{5}{\pi}\left[\frac{1+n+1-n}{1-n^{2}} \right]$

$a\_{n}=\frac{10}{\pi}\left(\frac{1}{1-n^{2}} \right)$

I wont bore you with the $b\_{n}$ coefficient as it comes up as zero...

>

ok, this is all fine and dandy so far... but once I need to actually apply it to the formulae

$f(t) = \frac{1}{2}a\_{0}+\sum\_{n=1}^\infty a\_n\cos(nt)$

my coefficient immediately falls apart once you sub in $n=1$

I've looked over my work many times and the only thing I can think that I have have wrong was when I was subbing in $\pi$ and $0$ into my $\cos$ functions... where do I go from here?? or did I miss something completely??

--GD