as you know it is possible to measure the power spectral density ($|X(f)|^2$) of a certain voltage signal $x(t)$ through a Spectrum Analyzer.
As far as I'm concerned, the simplest spectrum analyzer does not perform the Fourier transform X(f) of the input signal to evaluate the power spectral density. On the contrary, it simply selects each harmonic of the input signal through a tuned filter (or a tuned demodulator) and measures the power of the selected harmonics. The measured power is plotted against all the possible frequencies in the display.
This is what I've seen when I used a 2GHz sine wave as input signal.
It is fine because it is similar to an ideal dirac-delta what I would have expected from theory.
But, there is something I cannot understand. The Fourier transform $X(f)$ (and hence the power spectral density $|X(f)|^2$) is something that may be evaluated only by knowing the full signal behaviour on the infinite time interval $[-\infty;+\infty]$. And the resulting quantities $X(f)$ and $|X(f)|^2$ are obviously constant in time.
However, in real world we cannot know the future and we are sending to the Spectrum Analyzer a real time signal. And it does provide a real-time spectrum, which is not the result of a Fourier Transform evaluation (which wouldn't be possible as we do not know the future values of the signal) but of a simple power measurement.
So, my question is: why does this power measurement (which is an instant function of time: if I stop the input signal, the spectrum becomes 0) coincide with the theoretical power spectral density $|X(f)|^2$ (which is not function of time and which is a pure ideal quantity which requires we to know the signal behaviour also in the future)?