Fourier Transform of a short signal if I have a sine wave signal for a duration of only a few seconds, the Fourier transform will show me, that this signal corresponds to a range of frequencies. Why is this the case?
I do understand that every signal is composed of sine waves, even this sine wave pulse, but I don't get the intuition behind that for this case. Even if my sine wave is not infinitely long, I should still be able, to measure the distance of 2 peaks as precisely as I want. Therefore, I should also be able, to calculate the frequency as precisely as I want to. Where is the uncertainty? Why would the frequency of a longer signal be less uncertain?
 A: The product of 2 signals is the convolution of their Fourier transforms, so a truncated sine, or better, complex exponential is:
$$h(t)\equiv f(t)g(t)$$
with:
$$f(t) = e^{i\omega_0 t} $$
$$g(t) = \Pi(t/\tau) $$
where $\Pi(x)$ is the box function ($1$ for $0\le x\le 1$, zero everywhere else).
The FT's are:
$$\tilde f(\omega) = \delta(\omega-\omega_0) $$
$$\tilde g(\omega) = \frac {\tau}{\sqrt{2\pi}}{\rm sinc}(\frac{\omega}{2\tau}) $$
Then:
$$\tilde h(\omega)=\{f*g\}(\omega)=\int{\tilde f(\omega')\tilde g(\omega-\omega') d\omega'}$$
$$\tilde h(\omega)\propto \int \delta(\omega'-\omega_0){\rm sinc}
\frac{\omega-\omega'}{2\tau}d\omega' $$
from which you can see explicitly $\tilde h(\omega)$ is composed of frequencies on:
$$\omega_0 \pm \frac 1 {2\tau}$$
The (angular) frequency bandwidth is:
$$\Delta\omega=1/\tau$$
The shorter the pulse length, the wider the bandwidth.
Note this is not related to how well you can measure the center frequency, $\omega_0$, aka: the peak position;  rather it's the definition of frequency content.
A: You can measure the distance between two peaks.  That will give you a value near the center wavelength of the distribution, but that's not the wavelength.   This is one of those times when word usage outside of the classroom is different than inside.  Inside the physics classroom a sine has to be of infinite length in order for it to have an unambiguous the wavelength.
Even that is not quite right.  An infinite sine comprises two wavelengths, each having the same magnitude but opposite sign.
Your Fourier analysis will tell you the same thing.  The Fourier analysis of $\sin{kx}$ will produce two delta functions in wavelength space.   The Fourier transform of $\exp{ikx}$ will have one delta function at wavelength $2\pi/k$.  Strictly speaking, and limiting our location to the physics classroom, only the complex exponential has a the wavelength
A: To throw some intuition in, lets imagine a sine function as a rotating vector on a unit circle. While it rotates, its "shadow" or a projection on any of the coordinate axes can be regarded as a sine of an angle at which it is at that moment. Imagine now that this vector rotates id est angle changes with time and, as a consequence, sine changes also, of course. Now, that is just one sine wave with some frequency. Now imagine we add another vector and we line them up so that they are at the same angle in the begining, at t=0.This new sine wave has a little bit different frequency so as they start to rotate they separate because of this. Now imagine that you are adding them up, id est, somehow representing their sum. At t=0, if they are of length one, their sum will be 2. But there might be a moment in time at which one vector is -1 and other is +1. So here we can see that we can get zero at some instant if we have at least two frequencies. But imagine now 1000 vectors, all rotating with different frequencies, aligned at t=0, or better yet, 1000 000 vectors. Now, at one point, if we have enough of them they will all spread so that for every vector pointing in one direction there is some vector point in the oposite and they will never again line-up. So what we have here is something that exist for a short period of time and then goes to zero. Of course, this is just the intuition.
A: The math has been discussed in other answers, I'd like to address some conceptual points.
To sample a perfect sine wave, you would need to measure for an infinite time from -$\infty$ to $\infty$. We can't do that in the laboratory and have to make do with finite measurements. In this case your data set is not a perfect sine. You can make an assumption and assume that you just measured a part of an infinite periodic signal that happens to be a sine wave but that is an assumption. It is not what you have measured. Picking the central frequency of a broadened spectrum and claiming that it is a perfect sine wave of that frequency is thus a conclusion based on an assumption and not solely based on information from a finite measurement.
But we can make a connection of our limited measurement and the Fourier formalism that assumes infinite signals by using window functions. Our real time-limited signal can be modeled as an infinite sine wave that is multiplied with a rectangle window function that is one over the duration of our measurement and zero at all other times. But now you are Fourier transforming a window function times a sine wave which is again different from the Fourier transform of a pure sine wave and the obtained spectrum will also depend on the choice of the window function. A simple "on-ff" rectangle function in the time domain, causes a sinc function shape in the frequency spectrum.
The window function will also introduce a width to the peaks in your spectrum. Normally, you don't know the spectral content beforehand. This means that you can't say for certain whether a broadened peak is only due to a  single sine wave or a perhaps a sum of two close lying sine waves that get broadened and merge together. This is the point where you can increase the resolution by taking a longer measurement and thus decrease the width of the peaks in your spectrum.
A: As other answers have noted, the meaning of a "frequency component" in the Fourier transform is an eternal sine wave. Thus, a signal consisting of a finite time sample of a sine wave, and zero elsewhere, does not consist of a single frequency component.
However, suppose we are interested in estimating the frequency content when viewing a finite time sample purely as a sample -- i.e., this is the part of the signal we know, and elsewhere it is simply not measured (we don't assume it is zero, or anything in particular). In this case, the Fourier transform is not directly usable since it requires knowledge of the signal at all times.
We cannot deduce the complete frequency spectrum due to the lack of information, but we can estimate it if we make a "parsimonious" assumption that the spectrum is "simple" in some way. This is the approach of the Lomb-Scargle periodogram, for example. This allows even a short, but accurately measured, segment of a pure sine wave to be identified as a single frequency.
Again, this is an estimate, meaning that the signal observed during the given window is consistent with an eternal sine wave. However, physical effects in quantum mechanics, such as the uncertainty principle, refer to the actual, complete frequency spectrum given by the Fourier transform. So the frequency would have a definite value only if the signal is actually an eternal sine wave (or one lasting for least a time $1/\Delta\omega$, where $\Delta\omega$ is the relevant precision).
A: The issue is that a sine wave on a finite interval is not the same function as a pure sine wave, and so the Fourier transforms will be different.
Note that in the rest of this answer, I'm going to assume by "Fourier transform" you mean "Fourier transform over the entire real line," and not "a Fourier series over a finite region of the real line." But I will mention just for completeness that if you have a sine wave with period $T$ and you do a Fourier series over a finite interval of length $kT$ for some positive integer $k$, then in fact you would find that the only non-zero Fourier coefficient is the one corresponding to the sine wave of period $T$.
Anyway back to your question. The Fourier transform $\tilde{f}(\omega)$ of $f(t)$ is
\begin{equation}
\tilde{f}(\omega) = \int_{-\infty}^\infty {\rm d} t e^{-i \omega t}f(t)
\end{equation}
If we take $f(x) = e^{i \Omega t}$ for $t_1 \leq t \leq t_2$, and $0$ otherwise, then
\begin{equation}
\tilde{f}(\omega) = \int_{t_1}^{t_2} {\rm d} t e^{i (\Omega-\omega) t} = \frac{e^{i (\Omega-\omega) t_2} - e^{i(\Omega-\omega) t_1}}{i (\Omega-\omega) }
\end{equation}
There are a few useful special cases to know.
One is when $\Omega=0$ -- then $f(t)$ describes one pulse of a square wave. Taking $t_2=-t_1=T/2$ for simplicity, the Fourier transform is
\begin{equation}
\tilde{f}(\omega) =  \frac{2 \sin (\omega T/2)}{\omega}
\end{equation}
This characteristic behavior $|\tilde{f}(\omega)|\sim 1/\omega$ is common to "sharp edges" in the time domain signal, which excite Fourier modes of arbitrarily large frequencies. The slow falloff $\sim 1/\omega$ can cause many issues in dealing with sharp edges in time domain signals, when transforming into the frequency domain, in practical applications.
Another interesting limit is $\omega \rightarrow \Omega$. In fact the Fourier transform is equal to $T$, and diverges in the limit of infinite times! This is precisely the frequency of the truncated sine wave. We can understand the $T\rightarrow \infty$ limit by proceeding carefully. For simplicity let's assume $t_2=T/2>0$ and $t_1=-t_2=-T/2$, and refer to $f_T(\omega)$ as the truncated sine wave, with the duration of the window being $T$. Then
\begin{eqnarray}
\tilde{f}_T(\omega) &=& \int_{-T/2}^{T/2} {\rm d} t e^{ -i (\omega-\Omega) t } \\
&=& \int_{-T/2}^0 {\rm d} t e^{ - i (\omega - \Omega ) t } + \int_{0}^{T/2} {\rm d} t e^{- i (\omega - \Omega )t} \\
&=& \frac{1 - \exp\left( \frac{-i T}{2}\left(\omega - \Omega \right) \right)}{i(\omega - \Omega )}
+ \frac{\exp\left( \frac{i T}{2}\left(\omega - \Omega  \right) \right) - 1 }{i(\omega - \Omega )} \\
&=& \frac{2 \sin \bigl((\omega - \Omega) T/2\bigr)}{\omega - \Omega}
\end{eqnarray}
Now we can take the limit $T\rightarrow \infty$, using the delta function representation
\begin{equation}
\lim_{\epsilon\rightarrow 0} \frac{\sin (x/\epsilon)}{\pi x} =  \delta(x)
\end{equation}
where $\delta(x)$ is a Dirac delta function.
This yields
\begin{equation}
\lim_{T \rightarrow \infty}  \tilde{f}_T(\omega) = 2\pi \delta(\omega-\Omega)
\end{equation}
In the limit, the function $\sin T (\omega-\Omega)/(\omega-\Omega)$ becomes $\sim \delta(\omega-\Omega)$. This corresponds to your intuition that the Fourier transform should be dominated by the frequency of the truncated part of the sine wave.
Note: Thanks to @nanoman, who pointed out an error in an earlier version of this post.
A: This answer is only going to give some intuition, not give a proof.
When you apply a Fourier transformation twice you get the same function up to a reflection:
$$\mathcal F^2 f(x)=\mathcal F\mathcal Ff(x)=f(-x)$$
This is not too surprising because the inverse Fourier transform is identical to the Fourier transform up to a sign change (and an irrelevant factor $2\pi$).
If you Fourier transform something that looks like a pure sine wave you get a function that is very similar to a delta function which means it is highly localised. If you were to apply another Fourier transform you must get back the same function (up to a reflection and a scale factor). So because a spread out wave has a very localised Fourier transform we must have conversely that a localised function must have a very spread out transform.
