[Math] After calculating Fourier series coefficients for $x(t)=2 cos(4t) + 4 sin(10t)$, why am I getting all zeroes for all coefficients

fourier series

I am trying to find the Cosine/Sine Fourier series coefficients for the given equation:

$$x(t)=2\cos(4t) + 4\sin(10t)$$

$\cos(4t)$ has a period of $T=\frac{\pi}{2}$, and $\sin(10t)$ has a period of $T=\frac{\pi}{5}$. Therefore, the fundamental period of $x(t)$ is:

$$T_0=\text{LCM}\left(\frac{\pi}{2},\frac{\pi}{5}\right)=\pi$$

And the fundamental angular frequency is:

$$\omega_0=\frac{2\pi}{T_0}=2$$

I know that the equations to find all the coefficients are:
$$a_0=\frac{1}{T}\int_0^Tx(t)dt$$
$$a_n=\frac{2}{T}\int_0^Tx(t)\cos(\omega nt)dt$$
$$b_n=\frac{2}{T}\int_0^Tx(t)\sin(\omega nt)dt$$

However, after a long calculation showed that:

$$a_0=0$$
$$a_n=\frac{2}{\pi}\left(\frac{n\sin(2\pi n)}{n^2-4}-\frac{20\sin^2(\pi n)}{n^2-25}\right)$$
$$b_n=\frac{4}{\pi}\left(\frac{n\sin^2(\pi n)}{n^2-4}+\frac{5\sin(2\pi n)}{n^2-25}\right)$$
But since n is an integer, you can see that $a_n=0$ and $b_n=0$. But isn't that impossible because any function can be formed with a Fourier series? Did I make a mistake somewhere?

Best Answer

The formulae you have derived are invalid for $n=2,5$ but are correct otherwise. You would need to compute the coefficients individually in the cases where $n=2$ or $5$. However, you are making this more difficult than it needs to be.

Since your original function is of the form $$x(t)=a\cos(2nt)+b\sin(2mt),$$ you should be able to see that your original function is already a Fourier expansion with most coefficients equal to zero. By the uniqueness of Fourier expansions this going to be the Fourier expansion of $x$.

Related Question