How to find the Fourier Transform of a function that is periodic in an interval only? I know how to find the Fourier Series for a periodic function (Periodic for all inputs, from the definition). I also know how to find the Fourier Transform for non periodic functions. But, Which formula to use to calculate the Fourier transform of a function that is periodic in an interval only (Bounded), like shown here..
In this function, the period is 'r' and the function exists from 0 to M. 

Let be
$$
\mathcal F\{f(t)\}=F(\omega)=\int_{-\infty}^\infty f(t)\mathrm e^{-i\omega t}\mathrm d t=\int_{0}^Mf(t)\mathrm e^{-i\omega t}\mathrm d t
$$
Let be $f_0(t)$ the basis function in the interval $[0,\, r]$ and $M=nr$ for some $n\ge 1$. We have
$$
f(t)=\sum_{k=0}^{n-1}f_0(t-kr)
$$
and then
$$
\begin{align}
F(\omega)&=\int_{0}^Mf(t)\mathrm e^{-i\omega t}\mathrm d t=\int_{0}^{nr} \sum_{k=0}^{n-1}f_0(t-kr)\mathrm e^{-i\omega t}\mathrm d t\\
&=\sum_{k=0}^{n-1}\int_{0}^{nr}f_0(t-kr)\mathrm e^{-i\omega t}\mathrm d t=\sum_{k=0}^{n-1}\int_{0}^{r}f_0(t)\mathrm e^{-i\omega t}\mathrm e^{-i\omega kr}\mathrm d t\\
&=F_0(\omega)\sum_{k=0}^{n-1}\mathrm e^{-i\omega kr}=F_0(\omega)\frac{1-\mathrm e^{-i\omega nr}}{1-\mathrm e^{-i\omega r}}\\
&=F_0(\omega)\frac{\sin \left(\frac{n \omega r}{2}\right)}{\sin \left(\frac{\omega r}{2}\right)}\,\mathrm e^{i\frac{\omega r}{2} (n-1)}
\end{align}
$$
where $F_0(\omega)=\mathcal{F}\{f_0(t)\}$
