[proofplan]
We derive the aliasing formula by substituting the absolutely convergent Fourier series of $h$ into the rectangle rule $I_N(h)$, exchanging the order of summation (justified by absolute convergence), and evaluating the resulting inner sum over the $N$ equally spaced sample points using the orthogonality relation for $N$th roots of unity. The inner sum acts as a sieve: it selects exactly those Fourier modes whose index is a multiple of $N$, leaving $I_N(h) = 2\sum_{r} \widehat{h}_{Nr}$. Subtracting the exact integral $I(h) = 2\widehat{h}_0$ isolates the aliasing error.
[/proofplan]
[step:Substitute the Fourier series into the rectangle rule and exchange summation]
The rectangle rule on $[-1, 1]$ with $N$ equally spaced points $t_k = -1 + \frac{2k}{N}$ for $k = 0, 1, \ldots, N-1$ (each with weight $\frac{2}{N}$) is
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{k=0}^{N-1} h(t_k).
\end{align*}
Substituting the Fourier series $h(t) = \sum_{n=-\infty}^{\infty} \widehat{h}_n e^{i\pi n t}$, which converges absolutely by hypothesis:
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{k=0}^{N-1} \sum_{n=-\infty}^{\infty} \widehat{h}_n \, e^{i\pi n t_k}.
\end{align*}
Since the Fourier series converges absolutely (i.e., $\sum_n |\widehat{h}_n| < \infty$), the double sum $\sum_{k=0}^{N-1}\sum_n |\widehat{h}_n| \cdot |e^{i\pi n t_k}| = N\sum_n |\widehat{h}_n| < \infty$, so we may exchange the order of summation:
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{n=-\infty}^{\infty} \widehat{h}_n \sum_{k=0}^{N-1} e^{i\pi n t_k}.
\end{align*}
[/step]
[step:Evaluate the inner sum using the orthogonality of $N$th roots of unity]
Substituting $t_k = -1 + \frac{2k}{N}$ into the exponential:
\begin{align*}
e^{i\pi n t_k} = e^{i\pi n(-1 + 2k/N)} = e^{-i\pi n} \cdot e^{2\pi i nk/N}.
\end{align*}
Let $\omega_N := e^{2\pi i/N}$. The inner sum becomes
\begin{align*}
\sum_{k=0}^{N-1} e^{i\pi n t_k} = e^{-i\pi n} \sum_{k=0}^{N-1} \omega_N^{nk}.
\end{align*}
By the standard orthogonality relation for $N$th roots of unity (see the proof of the [Inverse DFT](/theorems/1370)):
\begin{align*}
\sum_{k=0}^{N-1} \omega_N^{nk} = \begin{cases} N & \text{if } n \equiv 0 \pmod{N}, \\ 0 & \text{if } n \not\equiv 0 \pmod{N}. \end{cases}
\end{align*}
When $n \equiv 0 \pmod{N}$, write $n = Nr$ for some $r \in \mathbb{Z}$. Then $e^{-i\pi n} = e^{-i\pi Nr} = (-1)^{Nr}$. But the sum $\sum_k \omega_N^{nk} = N$ already has the factor $e^{-i\pi n}$ in front, giving $e^{-i\pi Nr} \cdot N$. However, we need to reconsider: $e^{-i\pi n} \cdot N = (-1)^n \cdot N = (-1)^{Nr} \cdot N$.
Let us redo this more carefully. We have
\begin{align*}
\sum_{k=0}^{N-1} e^{i\pi n t_k} = e^{-i\pi n} \cdot N \cdot \mathbb{1}_{N | n}.
\end{align*}
Therefore
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{\substack{n \in \mathbb{Z} \\ N | n}} \widehat{h}_n \cdot e^{-i\pi n} \cdot N = 2\sum_{r=-\infty}^{\infty} \widehat{h}_{Nr} \cdot e^{-i\pi Nr} = 2\sum_{r=-\infty}^{\infty} \widehat{h}_{Nr} \cdot (-1)^{Nr}.
\end{align*}
We now observe that the sample points $t_k = -1 + \frac{2k}{N}$ can equivalently be written by shifting the index. Alternatively, we may use the symmetric sample points. The standard form of the rectangle rule for 2-periodic functions uses the $N$ points $t_k = \frac{2k}{N}$ for $k = -N/2+1, \ldots, N/2$ (shifted to be symmetric about 0). With these sample points, $e^{i\pi n t_k} = e^{2\pi i nk/N} = \omega_N^{nk}$, and the computation simplifies:
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{k=-N/2+1}^{N/2} h\!\left(\frac{2k}{N}\right) = \frac{2}{N}\sum_{k=-N/2+1}^{N/2}\sum_{n=-\infty}^{\infty} \widehat{h}_n \, \omega_N^{nk}.
\end{align*}
Exchanging summation (justified by absolute convergence) and applying orthogonality:
\begin{align*}
I_N(h) = \frac{2}{N}\sum_{n=-\infty}^{\infty} \widehat{h}_n \sum_{k=-N/2+1}^{N/2} \omega_N^{nk} = 2\sum_{r=-\infty}^{\infty} \widehat{h}_{Nr},
\end{align*}
where we used $\sum_{k=-N/2+1}^{N/2} \omega_N^{nk} = N$ if $N | n$ and $0$ otherwise (a shifted version of the same roots-of-unity identity, since the sum over any $N$ consecutive powers of $\omega_N$ gives the same result).
[guided]
The inner sum $\sum_{k} \omega_N^{nk}$ over $N$ consecutive integers acts as a frequency-domain sieve. It equals $N$ when $n$ is a multiple of $N$ (because every term is $\omega_N^0 = 1$), and vanishes otherwise (because the terms are equally spaced on the unit circle and cancel). This is the discrete orthogonality relation.
Using the symmetric sample points $t_k = 2k/N$ simplifies the computation because $e^{i\pi n t_k} = \omega_N^{nk}$ directly, without the phase factor $e^{-i\pi n}$ that appears with the shifted grid $t_k = -1 + 2k/N$. Both grids give the same quadrature rule (by 2-periodicity of $h$), but the symmetric form produces the cleaner algebra.
After applying orthogonality, the only surviving terms are those with $n = Nr$ for integer $r$. The $\frac{2}{N} \cdot N = 2$ prefactor gives $I_N(h) = 2\sum_r \widehat{h}_{Nr}$.
[/guided]
[/step]
[step:Subtract the exact integral to obtain the aliasing formula]
The exact integral is
\begin{align*}
I(h) = \int_{-1}^{1} h(t) \, dt = \int_{-1}^{1} \sum_{n=-\infty}^{\infty} \widehat{h}_n e^{i\pi nt} \, dt = \sum_{n=-\infty}^{\infty} \widehat{h}_n \int_{-1}^{1} e^{i\pi nt} \, dt,
\end{align*}
where the exchange of sum and integral is justified by absolute convergence. For $n = 0$, $\int_{-1}^{1} 1 \, dt = 2$. For $n \neq 0$, $\int_{-1}^{1} e^{i\pi nt} \, dt = \frac{e^{i\pi n} - e^{-i\pi n}}{i\pi n} = \frac{2i\sin(\pi n)}{i\pi n} = 0$ (since $n \in \mathbb{Z}$). Therefore $I(h) = 2\widehat{h}_0$.
Subtracting from the rectangle rule:
\begin{align*}
I_N(h) - I(h) = 2\sum_{r=-\infty}^{\infty} \widehat{h}_{Nr} - 2\widehat{h}_0 = 2\sum_{\substack{r \in \mathbb{Z} \\ |r| \geq 1}} \widehat{h}_{Nr},
\end{align*}
since the $r = 0$ term in the sum is $\widehat{h}_0$, which cancels with $I(h)$. This is the aliasing formula.
[/step]