# Thread: Exponential Fourier coefficients problem

1. ## Exponential Fourier coefficients problem

Hi everyone,
My problem is to do with calculating the fourier coefficients $C_k$ of $x(t)=cos(2t)$,
where $C_k = {1 \over T} \int_0^Tx(t)e^{-j\omega_0kt} dt$ where $k \in \bold Z$ and $\omega_0 = 2 \to T = \pi$
Everytime I try to evaluate the integral by letting $cos(2t) = {1 \over 2}(e^{j2t} + e^{-j2t})$ I get $C_k = 0$ which I am sure is incorrect as the fourier series of $cos(2t) \not= 0$. If some one could show me the working to this problem so I can compare it with mine to see where I am going wrong it would be greatly appreciated.
Thank you,
Mat

2. Originally Posted by matyoun89
Hi everyone,
My problem is to do with calculating the fourier coefficients $C_k$ of $x(t)=cos(2t)$,
where $C_k = {1 \over T} \int_0^Tx(t)e^{-j\omega_0kt} dt$ where $k \in \bold Z$ and $\omega_0 = 2 \to T = \pi$
Everytime I try to evaluate the integral by letting $cos(2t) = {1 \over 2}(e^{j2t} + e^{-j2t})$ I get $C_k = 0$ which I am sure is incorrect as the fourier series of $cos(2t) \not= 0$. If some one could show me the working to this problem so I can compare it with mine to see where I am going wrong it would be greatly appreciated.
You have already found this Fourier series without realising it!

In fact, it is correct to say that $C_k = 0$ for almost every value of k. But you should look more carefully to see what happens if k=2 or k=–2. In those cases, the calculation of the integral is a bit different, and you should find that $C_2 = C_{-2} = \frac12$. Those are the only nonzero Fourier coefficients, so the Fourier series of $\cos(2t)$ is $\cos(2t) = \frac12(e^{j2t} + e^{-j2t})$ (an equation that you had already written down without noticing that it gives the answer to the problem).

3. Thanks for the Response however I'm still getting zero. I'll post my working for the integration when k = 2 below.

$X_2 = {1 \over \pi} \int_0^\pi {1 \over 2}(e^{2tj} + e^{-2tj})e^{-4tj} dt$

$X_2 = {1 \over 2\pi} \int_0^\pi e^{2tj}e^{-4tj} + e^{-2tj}e^{-4tj} dt$

$X_2 = {1 \over 2\pi} \int_0^\pi e^{-2tj} + e^{-6tj} dt$

$X_k = {1 \over 2\pi}([{1 \over -2j}e^{-2tj}]_0^\pi + [{1 \over -6j} e^{-6tj}]_0^\pi)$

$X_2 = {1 \over 2\pi}(-{1 \over 2j}e^{-2\pi j} + {1 \over 2j} - {1 \over 6j} e^{-6\pi j} + {1 \over 6j})$

$e^{-2\pi j} = 1, e^{-6\pi j} = 1 \to X_2 = {1 \over 2\pi}(0) = 0$

any help spotting my problem?
Thanks, Mat

4. Originally Posted by matyoun89
Thanks for the Response however I'm still getting zero.

[snip]

any help spotting my problem?
My fault, I was using the wrong scaling (I forgot that $\omega_0 = 2$). In fact, the critical values of k are 1 and –1, not 2 and –2. When you integrate $\int_0^\pi\frac12\bigl(e^{2tj} + e^{-2tj}\bigr)e^{2tj}dt$ or $\int_0^\pi\frac12\bigl(e^{2tj} + e^{-2tj}\bigr)e^{-2tj}dt$, the answer comes out differently from other values of k.

5. Thanks I worked it out,
Turns out I had to take the limit of the integral when k=-1 or 1 in order to get the answer due to the division by (1-k) for one term and (1+k) for another.
Mat.