What is meant by *sampling* in terms of the *sampling theorem*?
I think, with respect to sampled function, that i disagree a bit with MBaz.  perhaps i misunderstand what he/she says regarding needing an infinite number of coefficients or samples for this special case of sampled periodic functions.  we had a little discussion about this at comp.dsp, and i'm gonna make use of $\LaTeX$ to spell out the same points.

of course, whether $x(t)$ is periodic or not, if $x(t)$ is real and is sufficiently bandlimited (there are no frequency components as high or higher than $\frac{f_\text{s}}{2} = \frac{1}{2T_\text{s}}$), then the samples:

$$ x[n] \triangleq x(n T_\text{s}) $$

are sufficient to completely represent the continuous-time $x(t)$.  if $x(t)$ never repeats, than an infinite number of discrete $x[n]$ are necessary to represent $x(t)$ for all $t$.

but if $x(t)$ is periodic,

$$ x[n+N]=x[n] \quad\quad \forall n,N \in \mathbb{Z} $$
and
$$ x(t+T)=x(t) \quad\quad \forall t $$

then samples existing over the span of one period are sufficient to represent $x[n]$ and $x(t)$.  in order for the $x[n]$ to be periodic in the sampled domain:

$$ \begin{align}
x[n+N] &amp; = x\left((n+N)T_\text{s} \right) \\
&amp; = x\left(nT_\text{s}+NT_\text{s} \right) \\
&amp; = x\left(nT_\text{s}+T \right) \\
\end{align} $$
because $ x(t+T) = x(t) $.

which means the obvious, your function period $T$ has to be the same as $N$ times your sampling period $T_\text{s}$.

$$ T = N T_\text{s} $$

now, what we know about this sampled periodic function is that $N$ samples of $x[n]$ are sufficient to tell us all about $x[n]$, and since $x(t)$ is bandlimited, $x[n]$ and the $N$ samples that fully define it, are sufficient to fully describe $x(t)$.

if $x(t)$ is sufficiently bandlimited (as above), then

$$ \begin{align}
x(t) &amp; = \sum\limits_{n=\infty}^{+\infty} x[n] \operatorname{sinc}\left(\frac{t-nT_\text{s}}{T_\text{s}}\right) \\
&amp; = \sum\limits_{n=\infty}^{+\infty} x[n] \frac{\sin\left(\pi\frac{t-nT_\text{s}}{T_\text{s}}\right)}{\pi\frac{t-nT_\text{s}}{T_\text{s}}} \\
&amp; = \sum\limits_{m=\infty}^{+\infty} \sum\limits_{n=0}^{N-1} x[n+mN] \frac{\sin\left(\pi\frac{t-(n+mN)T_\text{s}}{T_\text{s}}\right)}{\pi\frac{t-(n+mN)T_\text{s}}{T_\text{s}}} \\
&amp; = \sum\limits_{n=0}^{N-1} \sum\limits_{m=\infty}^{+\infty} x[n] \frac{(-1)^{mN}\sin\left(\pi\frac{t-nT_\text{s}}{T_\text{s}}\right)}{\pi\frac{t-(n+mN)T_\text{s}}{T_\text{s}}} \\
&amp; = \sum\limits_{n=0}^{N-1} x[n] \sin\left(\pi\frac{t-nT_\text{s}}{T_\text{s}}\right) \sum\limits_{m=\infty}^{+\infty} \frac{\frac{T_\text{s}}{\pi}(-1)^{mN}}{t-(n+mN)T_\text{s}} \\
\end{align} $$

$$ x(t) =
\begin{cases}
\sum\limits_{n=0}^{N-1} x[n] \frac{\sin\left(\pi\frac{t-nT_\text{s}}{T_\text{s}}\right)}{N\tan\left(\frac{\pi}{N}\frac{t-nT_\text{s}}{T_\text{s}}\right)}, &amp; \text{if }N\text{ is even} \\
\sum\limits_{n=0}^{N-1} x[n] \frac{\sin\left(\pi\frac{t-nT_\text{s}}{T_\text{s}}\right)}{N\sin\left(\frac{\pi}{N}\frac{t-nT_\text{s}}{T_\text{s}}\right)}, &amp; \text{if }N\text{ is odd}
\end{cases} $$

proving the latter takes a little bit.  you might recognize the $N$ odd case as the Dirichlet_kernel.  the $N$ even case looks a teeny bit different.  but both show exactly how the $N$ samples that fully define the sampled and periodic $x(t)$ are combined to get $x(t)$.

now, since $x(t)$ is also periodic with period $T$, then

$$ \begin{align}
x(t) &amp; = x\left(t+T \right) \\
&amp; = x\left(t+N T_\text{s} \right) \\
&amp; = \sum\limits_{k=-\infty}^{+\infty} X[k] e^{i 2 \pi \frac{k}{T} t} \\
&amp; = \sum\limits_{k=-\infty}^{+\infty} X[k] e^{i 2 \pi \frac{k}{N T_\text{s}} t} \\
&amp; = \sum\limits_{k=-\lfloor \frac{N}{2} \rfloor}^{+\lfloor \frac{N}{2} \rfloor} X[k] e^{i 2 \pi \frac{k}{N} \frac{t}{T_\text{s}}}
\end{align} $$

where $\lfloor\cdot\rfloor$ is the $\operatorname{floor}(\cdot)$ operator and

$$ \begin{align}
X[k] &amp; = \frac{1}{N} \sum\limits_{n=0}^{N-1} x[n] e^{-i 2 \pi \frac{nk}{N}} \\
&amp; = \mathcal{DFT}\{x[n]\}
\end{align} $$

there's actually something to fudge (a factor of $\frac{1}{2}$) about $X\left[\frac{N}{2}\right]$ for the $N$ even case:

$$ \begin{align}
X\left[-\frac{N}{2}\right] = X\left[\frac{N}{2}\right] &amp; = \frac{1}{2} \ \frac{1}{N} \sum\limits_{n=0}^{N-1} x[n] e^{-i 2 \pi n\frac{n(N/2)}{N}} \\
&amp; = \frac{1}{2N} \sum\limits_{n=0}^{N-1} x[n] (-1)^n \\
\end{align} $$

note that:

$$ \begin{align}
x[n] = x(n T_\text{s}) &amp; = \sum\limits_{k=-\lfloor \frac{N}{2} \rfloor}^{+\lfloor \frac{N}{2} \rfloor} X[k] e^{i 2 \pi \frac{k}{N} \frac{t}{T_\text{s}}}\bigg|_{t=n T_\text{s}} \\
&amp; = \sum\limits_{k=-\lfloor \frac{N}{2} \rfloor}^{+\lfloor \frac{N}{2} \rfloor} X[k] e^{i 2 \pi \frac{k}{N}n} \\
&amp; = \sum\limits_{k=0}^{N-1} X[k] e^{i 2 \pi \frac{nk}{N}} \\
&amp; = \mathcal{iDFT}\{X[k]\}
\end{align} $$

if you deal with that $\frac{1}{2}$ fudging for $X\left[\frac{N}{2}\right]$ for the $N$ even case.  this is because $X[k+N]=X[k]$ for all $k$.



a periodic continuous-time function can be described with a countable set of Fourier coefficients.  a bandlimited periodic continuous function can be described with a finite set of $N$ Fourier coefficients, just as well as it can be described with a finite set of $N$ samples.