I want to calculate the Fourier expansion of the function $f_r=e^{-2\pi rx}$, for $|x|<\frac{1}{2}$ and $r\neq{0}$
I just began to study Fourier series, and after checking online, I've seen that the most common method to do this problem would be to find the Fourier coefficients and using this formula: $$\frac{a_o}{2}+\sum_{n=1}^{\infty} (a_n\cos(\frac{2n\pi}{T})t+b_n\sin(\frac{2n\pi}{T})t$$
However, in my professors notes about Fourier series, there is no such formula, instead, the Fourier coefficients are defined as: $$\hat{f}(n)=\langle f, e_n\rangle=\int_{0}^{1} f(x)e^{-2\pi inx} dx$$ My question is: are there different methods to calculate the Fourier expansion of a function? Which method should I use to calculate the Fourier expansion of $f_r$?
the fourier expansion of a function is unique hence all of the methods are equivalent. The first formula is a particular case of the general definition of $$f_n=\frac{1}{L}\int_0^L e^{-\frac{2\pi i nx}{L}} f(x) dx$$ L being the period of $f$ and is only valid for real functions.