Fourier series of $\sin x$ using series of $e^{ix}$

I have to find the Fourier series of $\sin x$ . Assume that $\ell$ is not an integer multiple of $\pi$.(Hint: First find the Fourier series for $e^{ix}$)

This is how I did it:
Complex Fourier series of $e^{ix}$=$\sum {(-1)^n \over (\ell-n\pi)}\sin(\ell)e^{{in\pi x}\over\ell}$

Letting $x=-x$ $$e^{-ix}=\sum {(-1)^n \over (\ell-n\pi)}\sin(\ell)e^{{-in\pi x}\over\ell}\\ \sin x={e^{ix}-e^{ix} \over 2i}$$

I get $$\sin x=\sin (\ell)\sum {(-1)^n \over (\ell-n\pi)}\sin{{n\pi x}\over\ell}$$

Is this correct?Can I have a sine term on the right hand side when I am finding the series of a sine function?
Formula of complex fourier series is
$f(x)=\sum C_n e^{in\pi x \over l}$ wher n goes from $-\infty$ to $+\infty$.

$C_n$=${1\over 2l}\int_{-l}^l f(x)e^{-in\pi x \over l} dx$

• Are you saying $l$ is the period you're interested in? – DanZimm May 31 '14 at 18:57
• $\sin(x)$ is the Fourier series of $\sin(x)$ just as $e^{ix}$ is the Fourier series of $e^{ix}$ in exponential form, of course you could write $e^{ix}=\cos(x)+i\sin(x)$ but there is no series to compute here. More generally, $\sin(lx)$ is its own Fourier series for $l$ integer or otherwise. – Graham Hesketh May 31 '14 at 19:09
• Which formula are you using to calculate coefficients? I don't think you have the correct period because the right hand side has period $2l$ and the left has period $2\pi$ – Graham Hesketh May 31 '14 at 19:13
• @DanZimm :Fourier series of $sinx$ has to be found on $(-l,l)$ – clarkson Jun 1 '14 at 5:51
• @GrahamHesketh :I wrote the formula in the OP – clarkson Jun 1 '14 at 5:52

Yes it is correct, although conventionally when you give the expression in trig form the index usually runs only over the positive integers while in the exponential form it is usually writtena s running from $-\infty$ to $+\infty$, hence, the following notations are equivalent: \begin{aligned} \sin \left( x \right) &=\sin \left( l \right) \sum _{n=-\infty}^{\infty } \frac{\left( -1 \right) ^{n}}{ -\pi \,n+l}\sin \left( {\frac {\pi \,nx}{l}} \right) \quad :-l<x<l\\ &=\sin \left( l \right) \sum _{n=-\infty}^{-1} \frac{\left( -1 \right) ^{n}}{ -\pi \,n+l}\sin \left( {\frac {\pi \,nx}{l}} \right)+\sin \left( l \right) \sum _{n=1}^{\infty } \frac{\left( -1 \right) ^{n}}{ -\pi \,n+l}\sin \left( {\frac {\pi \,nx}{l}} \right)\\ &=\sin \left( l \right) \sum _{n=1}^{\infty} \frac{\left( -1 \right) ^{n}}{ \pi \,n+l}\sin \left( -{\frac {\pi \,nx}{l}} \right)+\sin \left( l \right) \sum _{n=1}^{\infty } \frac{\left( -1 \right) ^{n}}{ -\pi \,n+l}\sin \left( {\frac {\pi \,nx}{l}} \right)\\ &=\sin \left( l \right) \sum _{n=1}^{\infty } \left(\frac{1}{ -\pi \,n+l}+ \frac{1}{ -\pi \,n-l} \right) \left( -1 \right) ^{n}\sin \left( {\frac {\pi \,nx}{l}} \right) \end{aligned} where the properties $\sin(0)=0$ and $\sin(-x)=-x$ were exploited.
Example plot for $l=1$, first $250$ terms of the sum shown in blue, plotted against $\sin(x)$ in red:
• Thanks for the answer.But I don't understand with the term $\sum _{n=1}^{\infty } \left(\frac{1}{ -\pi \,n+l}+ \frac{1}{ -\pi \,n-l} \right)$ how this and my answer are equal – clarkson Jun 1 '14 at 16:46