You need to be aware that reconstructing a waveform at exactly half the sample rate is a special case that only works in theory.We begin studying a sine wave that for convenience 1) has a frequency equal to half the sampling frequency;
The above is based on a common misunderstanding of how waveforms are reconstructed.ArnoldLayne said:Then we move on to another case using the same wave as before but altering point 3) so that the peaks don't coincide with the exact moments of sampling. Let's say that the samples measure the wave when it reaches 80% of its amplitude. At t1, t2, t3 etc we obtain samples 0.8, -0.8, 0.8 etc. As far as I can see it is no longer possible to reconstruct the wave. Frequency is still correct but amplitude will be underestimated.
I guess (and hope) this is somehow taken into account in the signal theory used when developing our consumer electronics. For example, would 44.1, 48 or 96KHz PCM gives us sufficient sample points to estimate the true amplitude of a 20KHz wave even if its maximum value is not present among the samples? If so, what are the maths behind?
It doesn't matter if there are any points at the peaks of the waveform or not, because it's not reconstructed in a "connect-the-dots" fashion.
The parts of the waveform that are between the sample points do not have to be guessed or estimated. They are completely known from the points you do have.
The only things that matter is that you have sufficient sample points and that the signal is band limited, because then there is only one "legal" way of reconstructing the waveform!
Any other way you can think of to reconstruct it will have frequency content above the "legal" range, and thus not conform to the Nyquist theorem.
So the sampling theorem basically says that there is only one possible way to draw a waveform through points along an axis if it's band limited to half the sample rate.
If you're interested in the math behind the theorem you can read Claude E. Shannon's proof here: http://www.stanford.edu/class/ee104/shannonpaper.pdf