TITLE: Is this a correct method for finding Fourier series coefficients?
QUESTION [5 upvotes]: I'm trying to find Fourier series coefficients $c_n$ for given signal
$x(t)=\cos(2\pi t)+\cos(4\pi t)$
Solution:
$$x(t)=\sum_{n=-\infty}^\infty c_n e^{j \frac{2\pi}{T_0}nt}$$
$$\cos(2\pi t)+\cos(4\pi t)=\sum_{n=-\infty}^\infty c_n e^{j \frac{2\pi}{T_0}nt}$$
$$e^{j \frac{2\pi}{T_0}nt}=\cos(2\pi nt)+j\sin(2\pi nt)$$
The signal is periodic in $t$ with period $1$
$$cos(2\pi t)+cos(4\pi t)=\sum_{n=-\infty}^\infty c_n (\cos(2\pi nt)+j\sin(2\pi nt))$$
$$\cos(2\pi t)+\cos(4\pi t)=...+c_{-2}(\cos(4\pi nt)-j\sin(4\pi nt))+c_{-1}(\cos(2\pi nt)-j\sin(2\pi nt))+c_{0}(\cos(0)+j\sin(0))+c_{1}(\cos(2\pi nt)+j\sin(2\pi nt))+c_{2}(\cos(4\pi nt)+j\sin(4\pi nt))+...$$
$$\cos(2\pi t)+\cos(4\pi t)=...+\cos(4\pi t)(c_{-2}+c_{2})+j\sin(4\pi t)(c_{2}-c_{-2})+\cos(2\pi t)(c_{-1}+c_{1})+j\sin(2\pi t)(c_{1}-c_{-1})+c_0+...$$
$$c_n=
\begin{cases}
1/2,  & \text{for $n$= -2, -1, 1, 2} \\
0, & \text{other}
\end{cases}$$
 Is this a correct solution?

REPLY [5 votes]: Yes. Nevertheless, it's too long. Instead, directly replace into expression:
$$x(t)=\cos(2\pi t)+\cos(4\pi t)$$
the cosines by their expression with Euler formulas :
$$\cos 2 \pi t= \tfrac12 (e^{2i \pi t}+e^{-2i \pi t})$$
$$\cos 4\pi t=  \tfrac12 (e^{4i \pi t}+e^{-4i \pi t})$$
{"set_name": "stack_exchange", "score": 5, "question_id": 4579420}