The Fourier Transform of a periodic function

The definition of the Fourier transform of a function $$f \in \mathbb{L}^1( \mathbb{R})$$ (integrable function ): $$F(f)(x)=\int_{-\infty}^{\infty}f(x)e^{-i2\pi xt}dt$$ but if I want to compute the fourier transform of a periodic function ($$f(x)=\sin(x)$$ for example ) what i have to do 1) consider
$$f(x)=\sin(x)$$ for $$x \in [0,2\pi]$$
$$f(x)=0$$ else
2) compute the fourier trannformation of $$\sin(x)$$ as a function definied on $$\;\mathbb{R} (f(x)=\sin(x)$$ for all $$x \in \mathbb{R})$$
• Let $\hat{f}_n(x) = \int_{-n}^n f(x)e^{-2i \pi xt}dt$ when $f$ is $L^1_{loc}$ and $T$-periodic then $\lim_{n \to \infty}\hat{f}_n$ converges only in the sense of distributions, to $\hat{f}(x)=\sum_k c_k(f) \delta(x-k/T)$ where $c_k(f) = \frac{1}{T} \int_0^T f(t)e^{-2i \pi kt/T}dt$ is the Fourier series coefficient. The inverse Fourier transform is just the Fourier series, which converges in the sense of distributions. – reuns May 22 at 0:44