Fourier Series Odd Function So I'm still a little bit new to this stuff... I've learned abit from Khan Academy and also used lecture notes as a guide, so bear with me.
the question I have here is relatively simple:
$f(x)\begin{cases}-8 & -2<x<0\\8 & 0<x<2\end{cases}$
So this is a square wave, of period $T=4$ and $\omega=\frac{\pi}{2}$
(Hope everythings looking good so far...)
>
now it seems that I can simply state that since $f(x)=-f(x)$ the function is odd and so the Fouriers series expansion is given by:
$f(x)=\sum_{n=1}^\infty b_{n}\sin(n\omega t)$
where
$b_{n}=\frac{4}{T}\int_{0}^{T/2} f(x)\sin(n\omega x) dx$
(So far so good???)
>
well after subbing in our $T=4$ and $\omega=\frac{\pi}{2}$ we have:
$b_{n}=8\int_{0}^{2}\sin(\frac{\pi}{2}nx) dx$
and we only calculate the $f(x)=8$ and not the $f(x)=-8$ since we are only concerned about what happens between $0<x<2$ (Is this correct??)
from the above, I get:
$b_{n}=8\left[\left( \frac{-2}{\pi n}\right)\cos\left( \frac{\pi}{2}nx\right) \right]_0^2$
$b_{n}= \frac{16}{\pi n}\left[-\cos\left( \frac{\pi}{2}nx\right) \right]_0^2$
$b_{n}= \frac{16}{\pi n}\left[-\cos\left( \frac{\pi}{2}2n\right)+\cos\left( 0\right) \right]$
$b_{n}= \frac{16}{\pi n}\left[-\cos\left( \pi n\right)+\cos\left( 0\right) \right]$
and it's right here where I start charting into unfamiliar waters... what I have done is:
$-\cos(\pi n)+\cos(0)=\begin{cases}2 & n=odd\\0 & n=even\end{cases}$
therefore, $b_{n}=\frac{32}{\pi(2n-1)}$
and so, my Fourier series is:
$f(x)=\sum_{n=1}^\infty \frac{32}{\pi(2n-1)}\sin\left(\frac{(2n-1)\pi n}{2} \right)$
$f(x)=\frac{32}{\pi}\sum_{n=1}^\infty \frac{1}{(2n-1)}\sin\left(\frac{(2n-1)\pi n}{2} \right)$
$f(x)=\frac{32}{\pi}\left(\sin\left(\frac{1}{2}\pi x\right) +\frac{1}{3}\sin\left(\frac{3}{2}\pi x\right)+\frac{1}{5}\sin\left(\frac{5}{2}\pi x\right)+...\right)$
>
I know this is a very simple problem... like, beginners level stuff, so sorry to bore you with the basics, but I'm still not wrapping my head around it...
any help would be greatly appreciated, thanks very much
--GD

You did a pretty good job, but this is a nice opportunity to go through some steps in more detail, which can be pretty instructive to a starter on Fourier Analysis.
You have the following function:
$$f(t)=\begin{cases}-8 & -2<t<0\\8 & 0<t<2\end{cases}$$
As pointed correctly, $T=4$ and, consequently, $\omega=2\pi/T=\pi/2$
And you know that the Trigonometric Form of the Fourier Series is:
$$f(t)=a_0+\sum^{\infty}_{n=1}a_n \cos(n\omega t)+\sum^{\infty}_{n=1}b_n\sin(n\omega t)$$
Where:
\begin{align}
a_0&=\frac{1}{T}\int_{-T/2}^{T/2}f(t)dt\\
a_n&=\frac{2}{T}\int_{-T/2}^{T/2}f(t)\cos(n\omega t)dt\\
b_n&=\frac{2}{T}\int_{-T/2}^{T/2}f(t)\sin(n\omega t)dt
\end{align}
You did a pretty good job inspecting the function to get rid of the even part of the Fourier Series. Also, the symmetry along the $x$ axis assures that the function has no mean value, resulting in $a_0=0$.
Finally, you need to compute $b_n$:
\begin{align}
b_n&=\frac{2}{T}\int_{-T/2}^{T/2}f(t)\sin(n\omega t)dt\\
&=\frac{2}{4}\int_{-4/2}^{4/2}f(t)\sin\left(n\frac{\pi}{2}t\right)dt\\
&=\frac{1}{2}\int_{-2}^{2}f(t)\sin\left(n\frac{\pi}{2}t\right)dt\\
&=\frac{1}{2}\left[-\int_{-2}^{0}8\sin\left(n\frac{\pi}{2}t\right)dt+\int_{0}^{2}8\sin\left(n\frac{\pi}{2}t\right)dt\right]\\
&=4\left[-\int_{-2}^{0}\sin\left(n\frac{\pi}{2}t\right)dt+\int_{0}^{2}\sin\left(n\frac{\pi}{2}t\right)dt\right]
\end{align}
Here I must make a quick stop to correct you in something: Yes, we need to compute what happens before $0$, because it makes part of the signal you are analyzing. That is why I use, as a rule-of-thumb, the definition where the integration interval is $[-T/2;T/2]$, instead of $[0;T]$. However, in thsi specific case, we know that $\int_{0}^{A}\sin(x)dx=-\int_{-A}^{0}\sin(x)dx$, what is a consequence of the Odd parity of $\sin(x)$. Going on:
\begin{align}
&=4\left[\int_{0}^{2}\sin\left(n\frac{\pi}{2}t\right)dt+\int_{0}^{2}\sin\left(n\frac{\pi}{2}t\right)dt\right]\\
&=8\int_{0}^{2}\sin\left(n\frac{\pi}{2}t\right)dt\\
&=\frac{16}{\pi n}\left[\cos(\pi n)-1\right]\\
\end{align}
And we finally arrive to your conclusion that:
$$b_n=\begin{cases}32/\pi n & n\,\,\,\,\text{odd} \\0 & n\,\,\,\,\text{even}\end{cases}$$
Then, there is the closed form of your Fourier Series of $f(t)$:
$$f(t)=\frac{32}{\pi}\left[\sum_{n=1}^{\infty}\frac{1}{(2n-1)}\sin\left(\frac{\pi(2n-1)t}{2}\right)\right]$$
