Thread: Findind the complex Fourier Series and deducing the real one

1. Findind the complex Fourier Series and deducing the real one

I'm trying to find the complex form for this fourier series and then transform it into the real one.I don't know exactly how this transformation is suppose to happen..I'm thinking it must have something to do with $\displaystyle e^{-ikt}=\cos (kt)+i\sin (kt)$.Also when I try to calculate the complex form I get zero which means I"m doing something wrong.
F(t) is defined as:
$\displaystyle f(t)=-1 \ldots -(\pi)=<t<0$ and $\displaystyle f(t)=-1 \ldots 0<t<\pi$
Now$\displaystyle c_{k}=\frac{1}{2/pi}*\int {f(x) e^{-ikt}}$(don't know how to define a definite integral on latex but this one is from -pi to pi)
=>$\displaystyle c_{k}=\frac{1}{2/pi}*(\int { -e^{-ikt}}+\int{e^{-ikt}})$
(the first integral is from -pi->0 and the second from 0->pi)
=>$\displaystyle \frac{1}{2(/pi)ik}[1-e^{-ikt}+e^{ikt}-1]=0.$

2. Originally Posted by StefanM
I'm trying to find the complex form for this fourier series and then transform it into the real one.I don't know exactly how this transformation is suppose to happen..I'm thinking it must have something to do with $\displaystyle e^{-ikt}=\cos (kt)+i\sin (kt)$.Also when I try to calculate the complex form I get zero which means I"m doing something wrong.
F(t) is defined as:
$\displaystyle f(t)=\begin{cases}-1 & ( -\pi\leqslant t<0), \\ 1&(0<t<\pi).\end{cases}$
Now $\displaystyle c_{k}=\int_{-\pi}^\pi f(t) e^{-ikt}dt$

$\displaystyle \Rightarrow\;c_{k}=\frac{1}{2\pi}\Bigl(\int_{-\pi}^0 -e^{-ikt}dt+\int_0^\pi e^{-ikt}dt\Bigr)$
. . . .. . .$\displaystyle = \frac{1}{2\pi ik}\Bigl[1-e^{-ikt}+e^{ikt}-1\Bigr]=0.$
(I have tweaked the TeX a bit there and corrected minor errors.)

The last line is wrong. you should have $\displaystyle \int_{-\pi}^0 -e^{-ikt}dt = -\frac{1-e^{ik\pi}}{-ik} = \frac{1-(-1)^k}{ik}$ (remembering that $\displaystyle e^{ik\pi} = (-1)^k$). Similarly, $\displaystyle \int_0^\pi e^{-ikt}dt = \frac{e^{-ik\pi}-1}{-ik}$, which is also equal to $\displaystyle \frac{1-(-1)^k}{ik}$. To complete the calculation, you probably need to notice that $\displaystyle 1-(-1)^k$ is 0 if k is even, and 2 if k is odd.

3. I'm such an idiot...it was supposed to be $\displaystyle c_{k}=\frac{1}{2/pi}*\int {f(x) e^{-ikt}}$,sorry about that...thanks for the reply.
How can I transforme the series from complex to real form?According to the answer book the result should be...(4/pi)*SUM[(2m+1)^(−1) *sin((2m+1)t)]

4. Originally Posted by StefanM
How can I transform the series from complex to real form? According to the answer book the result should be...(4/pi)*SUM[(2m+1)^(−1) *sin((2m+1)t)]
Use the facts that $\displaystyle \cos kt = \tfrac12(e^{ikt}+e^{-ikt})$ and $\displaystyle \sin kt = \tfrac1{2i}(e^{ikt}-e^{-ikt})$. That tells you that the cosine coefficients are given by $\displaystyle a_k = c_k+c_{-k}$, and the sine coefficients are given by $\displaystyle b_k = i(c_k-c_{-k})$.

In this example, you should find that the complex Fourier coefficients $\displaystyle c_k$ have the property that $\displaystyle c_{-k} = -c_k$, so all the cosine terms in the real Fourier series vanish. Also, $\displaystyle c_k=0$ when k is odd, so the only nonzero sine terms occur for odd values of k. Write $\displaystyle k = 2m+1$ for those terms, and you should get the given solution.

5. I found the right answer....but the problem is that I was under the impression that I did that by accident...so I tried another ex. and unfortunately this was the case.....can you please give me a full example of a fourier transformation from complex to real?

6. Originally Posted by StefanM
I found the right answer....but the problem is that I was under the impression that I did that by accident...so I tried another ex. and unfortunately this was the case.....can you please give me a full example of a fourier transformation from complex to real?
The formulas I gave in my previous comment were wrong (I have now edited it to correct them). They should be $\displaystyle a_k = c_k+c_{-k}$ (for the cosine coefficients) and $\displaystyle b_k = i(c_k-c_{-k})$ (for the sine coefficients).

For the square wave function in this example, you should have found that the complex Fourier coefficients are given by

$\displaystyle c_k = \begin{cases}0& (k \text{ even,}) \\ \tfrac2{k\pi i}& (k \text{ odd.}) \end{cases}$

Here, you can see that $\displaystyle c_{-k} = c_k = 0$ if k is even, and $\displaystyle c_{-k} = -c_k$ if k is odd. So the cosine coefficients are all zero. For the sine coefficients, $\displaystyle b_k = 0$ if k is even, and if k is odd then $\displaystyle b_k = i(c_k-c_{-k}) = 2ic_k = \tfrac4{k\pi}.$ Since k is odd, we can put $\displaystyle k=2m+1$. Then you see that the coefficient of $\displaystyle \sin((2m+1)t)$ is $\displaystyle \tfrac4{(2m+1)\pi}$, for m=1,2,3,..., and all the other terms in the Fourier series are 0.

That gives you the formula $\displaystyle f(t) = \frac4\pi\sum_{m=1}^\infty (2m+1)^{-1}\sin((2m+1)t)$, just as the book says.