Coefficients of Fourier series

51 Views Asked by At

i’d like to calculate Fourier coefficients of $\cos 2 \pi f_0 t$. This is what I did :

$$ c_k = \frac{1}{T_0}\int_{0}^{T} \cos 2 \pi f_0 t \cdot e^{-2i\pi f_0 t}. $$

From Euler formulas:

$$ \frac{1}{T_0}\int_{0}^{T} \frac{ e^{2i\pi f_0 t} + e^{-2i\pi f_0 t} }{2} \cdot e^{-2i\pi f_0 t}. $$

$ \frac{1}{2T_0}\int_{0}^{T} 1 + e^{-2\pi f_0 t(1+i) } $

Solving i obtained $c_k = \frac{1}{2T_0}[T_0 + \frac{e^{-2\pi (1+i)} - 1 }{-2\pi f_0 - 2 i \pi f_0 }] $ (because $f_0 = 1/T_0 $).

But $e^{-2i\pi}e^{-2\pi} = e^{-2\pi}[\cos2\pi + i \sin(-2\pi)]= e^{-2\pi}$. So $\frac{1}{2T_0}[ T_0 + \frac{e^{-2\pi } - 1 }{-2\pi f_0}(1+i)]$.

On my book the result is $1/2$ If $k = \pm 1$ And $0$ If $k$ Is different from $1$. Can someone can tell me where is the error ? I’d really like to learn how to correct this exercise . Thank you so much

2

There are 2 best solutions below

0
On

The problem start in you very first expression

$$ c_k = \frac{1}{T}\int_0^T \cos 2\pi f_0 t \cdot e^{-2\pi i \color{red}{k}t / T}~{\rm d}t $$

and now do the same trick you did

\begin{eqnarray} c_k &=& f_0\int_0^{1/f_0} \frac{e^{2\pi i f_0 t} + e^{-2\pi i f_0 t}}{2} e^{-2\pi i f_0 \color{red}{k}t} ~{\rm d}t = \frac{f_0}{2} \int_0^{1/f_0}\left[ e^{2\pi i f_0(1 - k)t} + e^{-2\pi i f_0(1 + k)t}\right]{\rm d}t \end{eqnarray}

Now consider three cases

$k = 1$

$$ c_1 = \frac{f_0}{2} \int_0^{1/f_0}\left[1 + e^{-4\pi i f_0t}\right]{\rm d}t = \frac{1}{2} $$

$k = -1$

Same idea

$$ c_{-1} = \frac{1}{2} $$

$k \not= 1$ and $k \not= -1$

$$ c_k = \frac{f_0}{2} \left[\frac{e^{2\pi i f_0(1 - k)t}}{2\pi i f_0 (1 - k)} - \frac{-e^{2\pi i f_0(1 + k)t}}{2\pi i f_0 (1 + k)} \right]_0^{1/f_0} = 0 $$

0
On

First off, you didn't set up the initial integral correctly. Assuming $T_0=\frac{1}{f_0}$ is the period of $\cos(2\pi f_0t)$, it should be:

$$c_k=\frac 1 {T_0}\int_0^{T_0}\cos(2\pi f_0t)e^{-2i\pi kf_0t}dt$$

Critically, notice how $k$ is now in the exponent of the complex exponential where as in your integral, $k$ is not present in the formula at all. Now, we can use Euler's formula:

$$c_k=\frac 1 {T_0}\int_0^{T_0}\frac{e^{2i\pi f_0t}+e^{-2i\pi f_0t}}{2}e^{-2i\pi kf_0t}dt$$

Distribute the $e^{-2i\pi kf_0t}$:

$$c_k=\frac 1 {T_0}\int_0^{T_0}\frac{e^{2i\pi f_0(1-k)t}+e^{-2i\pi f_0(1+k)t}}{2}dt$$

For simplicity, take the $\frac 1 2$ out of the integral: $$c_k=\frac 1 {2T_0}\int_0^{T_0}(e^{2i\pi f_0(1-k)t}+e^{-2i\pi f_0(1+k)t})dt$$

Integrate: $$c_k=\frac{1}{2T_0}\left(\frac{e^{2i\pi f_0(1-k)T_0}-e^{2i\pi f_0(1-k)0}}{2i\pi f_0(1-k)}+\frac{e^{-2i\pi f_0(1+k)T_0}-e^{-2i\pi f_0(1+k)0}}{-2i\pi f_0(1+k)}\right)$$

Substitute $f_0T_0=1$ and $e^0=1$:

$$c_k=\frac{1}{2T_0}\left(\frac{e^{2i\pi (1-k)}-1}{2i\pi f_0(1-k)}+\frac{e^{-2i\pi (1+k)}-1}{-2i\pi f_0(1+k)}\right)$$

Now, since $k$ is an integer, $1-k$ and $-(1+k)$ are also both integers, so $e^{2i\pi (1-k)}=e^{-2i\pi (1+k)}=1$:

$$c_k=\frac{1}{2T_0}\left(\frac{1-1}{2i\pi f_0(1-k)}+\frac{1-1}{-2i\pi f_0(1+k)}\right)=0$$

Now, this seems like a very unintuitive answer, because it means $c_k=0$ for all $k$. However, if you look closely, you will see that we divided by $1-k$ and $1+k$ in our integration in order to get $c_k=0$. Clearly, this does not work for $k=1$ and $k=-1$ since it causes a division-by-zero error. Therefore, $c_k=0$ for all $k\neq \pm 1$ and we need to treat the cases $k=1$ and $k=-1$ separately.

First, let's do $k=1$. From a previous equation, we have:

$$c_k=\frac 1 {2T_0}\int_0^{T_0}(e^{2i\pi f_0(1-k)t}+e^{-2i\pi f_0(1+k)t})dt\rightarrow c_1=\frac 1 {2T_0}\int_0^{T_0}(e^{2i\pi f_00\cdot t}+e^{-2i\pi f_0\cdot 2\cdot t})dt$$

Simplify and substitute $e^0=1$:

$$c_1=\frac 1 {2T_0}\int_0^{T_0}(1+e^{-4i\pi f_0t})dt$$

Integrate: $$c_1=\frac 1 {2T_0}\left(T_0+\frac{e^{-4i\pi f_0T_0}-e^{-4i\pi f_0\cdot 0}}{-4i\pi f_0}\right)$$

Substitute $e^{-4i\pi f_0T_0}=e^{-4i\pi}=1$ and $e^0=1$: $$c_1=\frac 1 {2T_0}\left(T_0+\frac{1-1}{-4i\pi f_0}\right)=\frac{1}{2T_0}T_0=\frac 1 2$$

I will leave it as an exercise to you to finish it off by showing $c_{-1}=\frac 1 2$.