Here's the full function I'm trying to find the Fourier series to:
$$f(x) = \left\{ \begin{array}{lr} 0 & : -\frac{\pi}{\omega}\leq t\lt 0 \\ E\;sin(\omega t) & : 0\leq t\lt \frac{\pi}{\omega} \end{array} \right.,\;\;\;f\;\left(t\ + \frac{2\pi}{\omega}\right) = f(t)$$
At first, I tried this the non-complex way and got:
$a_0 = \frac{E}{\pi}$
$a_n = \frac{E\;\omega}{\pi}\int\limits_0^L sin\left(\frac{\pi\;t}{L}\right)cos\left(\frac{n\;\pi\;t}{L}\right)dt = \left\{ \begin{array}{lr} 0 & : n\neq 1\\ E & : n=1 \end{array} \right.,\;\;\;L=\frac{\pi}{\omega}$
$b_n = \left\{ \begin{array}{lr} 0 & : n\neq 1\\ E & : n=1 \end{array} \right.\;\;\;$ by the same method as $a_n$.
Which seems to give a Fourier series that is not even a series and doesn't fit the initial function:
$$\mbox{Fourier series} = E\left[\frac{1}{\pi}+cos(\omega\;t)+sin(\omega\;t)\right]$$
Obviously I've really messed up somewhere.
I then tried the complex Fourier series and got stuck. I can't really show every step as there are a lot of them but I can show the first and last.
$c_n = \frac{E}{2L}\int\limits_0^L\;sin(\omega\;t)e^{-i\frac{n\;\pi\;t}{L}}$
$ = ...$
$ = \frac{E}{4L}\left[(n-1)\omega\left(1-e^{-(n-1)i\;\omega\;L}\right)+(n+1)\omega\;\left(\; e^{-(n+1)\;i\;\omega\;L}-1\right)\right]$
And now I'm completely lost. Is there a trick to this Fourier series? Am I missing something?
Any help would be greatly appreciated!
Thank you.
Check your calculation of $a_n$, only the odd values of $n$ give $0$. To do the computation, use the angle addition formulas.