# 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 $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:
$f(t)=-1 \ldots -(\pi)= and $f(t)=-1 \ldots 0
Now $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)
=> $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)
=> $\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 $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:
$f(t)=\begin{cases}-1 & ( -\pi\leqslant t<0), \\ 1&(0
Now $c_{k}=\int_{-\pi}^\pi f(t) e^{-ikt}dt$

$\Rightarrow\;c_{k}=\frac{1}{2\pi}\Bigl(\int_{-\pi}^0 -e^{-ikt}dt+\int_0^\pi e^{-ikt}dt\Bigr)$
. . . .. . . $= \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 $\int_{-\pi}^0 -e^{-ikt}dt = -\frac{1-e^{ik\pi}}{-ik} = \frac{1-(-1)^k}{ik}$ (remembering that $e^{ik\pi} = (-1)^k$). Similarly, $\int_0^\pi e^{-ikt}dt = \frac{e^{-ik\pi}-1}{-ik}$, which is also equal to $\frac{1-(-1)^k}{ik}$. To complete the calculation, you probably need to notice that $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 $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 $\cos kt = \tfrac12(e^{ikt}+e^{-ikt})$ and $\sin kt = \tfrac1{2i}(e^{ikt}-e^{-ikt})$. That tells you that the cosine coefficients are given by $a_k = c_k+c_{-k}$, and the sine coefficients are given by $b_k = i(c_k-c_{-k})$.

In this example, you should find that the complex Fourier coefficients $c_k$ have the property that $c_{-k} = -c_k$, so all the cosine terms in the real Fourier series vanish. Also, $c_k=0$ when k is odd, so the only nonzero sine terms occur for odd values of k. Write $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 $a_k = c_k+c_{-k}$ (for the cosine coefficients) and $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

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

Here, you can see that $c_{-k} = c_k = 0$ if k is even, and $c_{-k} = -c_k$ if k is odd. So the cosine coefficients are all zero. For the sine coefficients, $b_k = 0$ if k is even, and if k is odd then $b_k = i(c_k-c_{-k}) = 2ic_k = \tfrac4{k\pi}.$ Since k is odd, we can put $k=2m+1$. Then you see that the coefficient of $\sin((2m+1)t)$ is $\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 $f(t) = \frac4\pi\sum_{m=1}^\infty (2m+1)^{-1}\sin((2m+1)t)$, just as the book says.