Recall that we defined the partial sum to be

$$ \begin{align*} S_Nf(x)=\sum_{n=-N}^{N}\widehat f(n)e^{inx}. \end{align*} $$

and recall that our goal is to understand when will this sum coverage to \(f(x)\). Recall that the Fourier coefficient is

$$ \begin{align*} \widehat{f}(n) &= \frac{1}{2\pi}\int_{-\pi}^{\pi} f(y)e^{-iny}\ dy \end{align*} $$

If we plug in the coefficient back in the partial sum, we get

$$ \begin{align*} S_Nf(x) = \sum_{n=-N}^{N} \left( \frac{1}{2\pi}\int_0^{2\pi}f(y)e^{-iny}\,dy \right)e^{inx}. \end{align*} $$

Note that \(e^{inx}\) does not depend on \(y\). Hence move it inside the integral.

$$ \begin{align*} S_Nf(x) = \frac1{2\pi}\sum_{n=-N}^{N} \int_0^{2\pi} e^{inx}f(y)e^{-iny}\,dy. \tag{1} \end{align*} $$

Then note that in general, for finitely many integrable functions \(g_n(y)\),

$$ \begin{align*} \sum_{n=-N}^{N}\int_0^{2\pi}g_n(y)\,dy = \int_0^{2\pi}\sum_{n=-N}^{N}g_n(y)\,dy. \end{align*} $$

Hence swap the finite sum and integral in (1) to get

$$ \begin{align*} S_Nf(x) = \frac1{2\pi}\int_0^{2\pi} \sum_{n=-N}^{N} e^{inx}f(y)e^{-iny}\,dy. \end{align*} $$

But note that \(f(y)\) doesn’t depend on the sum so we can take it outside

$$ \begin{align*} S_Nf(x) = \frac1{2\pi}\int_0^{2\pi} f(y)\sum_{n=-N}^{N}e^{inx}e^{-iny}\,dy. \end{align*} $$

Now combine the exponents to get

$$ \begin{align*} S_Nf(x) = \frac1{2\pi}\int_0^{2\pi} f(y)\sum_{n=-N}^{N}e^{in(x-y)}\,dy. \tag{2} \end{align*} $$

Now define the Dirichlet Kernel to be

$$ \begin{align*} \boxed{ D_N(t):=\sum_{n=-N}^{N}e^{int}.} \end{align*} $$

In (2), we have \(t = x - y\). So

$$ \begin{align*} \boxed{ S_Nf(x) = \frac1{2\pi}\int_0^{2\pi}f(y)D_N(x-y)\,dy. } \end{align*} $$

So the Fourier partial sum is a convolution of \(f\) with the Dirichlet kernel stated in the following lemma

Lemma
The Fourier Partial sum can be written as \[S_Nf(x) = \frac1{2\pi}\int_0^{2\pi}f(y)D_N(x-y)\,dy.\] where \[ D_N(t):=\sum_{n=-N}^{N}e^{int} = \frac{\sin\left((N+\tfrac12)t\right)}{\sin(t/2)} \] where \(D\) is the Dirichlet Kernel

Proof

We now show the closed form. Expand the Dirichlet Kernel to see that

$$ \begin{align*} D_N(t) = e^{-iNt}+e^{-i(N-1)t}+\cdots+1+\cdots+e^{i(N-1)t}+e^{iNt}. \end{align*} $$

and let \(\omega=e^{it}\). Hence

$$ \begin{align*} D_N(t)=\sum_{n=-N}^{N}\omega^n =\omega^{-N}+\omega^{-N+1}+\cdots + \omega^N. \end{align*} $$

Factoring out \(\omega^{-N}\),

$$ \begin{align*} D_N(t) = \omega^{-N}\left(1+\omega+\omega^2+\cdots+\omega^{2N}\right). \end{align*} $$

Therefore, \(D_N(t)\) is a finite geometric sum. Hence

$$ \begin{align*} 1+\omega+\omega^2+\cdots+\omega^{2N} = \frac{\omega^{2N+1}-1}{\omega-1}, \qquad \omega\ne1. \end{align*} $$

and therefore

$$ \begin{align*} D_N(t)=\omega^{-N}\frac{\omega^{2N+1}-1}{\omega-1}. \end{align*} $$

Now multiply \(\omega^{-N}\) into the numerator

$$ \begin{align*} D_N(t) &= \frac{\omega^{-N}\omega^{2N+1}-\omega^{-N}}{\omega-1} \\ &=\frac{\omega^{N+1}-\omega^{-N}}{\omega-1} \end{align*} $$

factor \(\omega^{1/2}\) from both numerator and denominator. So in the numerator we will have

$$ \begin{align*} \omega^{N+1} = \omega^{1/2}\omega^{N+1-\frac12} = \omega^{1/2}\omega^{N+\frac12}. \end{align*} $$

If we substitute

$$ \begin{align*} D_N(t)=\frac{\omega^{1/2}\left(\omega^{N+\frac12}-\omega^{-N-\frac12}\right)}{\omega^{1/2}\left(\omega^{1/2}-\omega^{-1/2}\right)}. \end{align*} $$

Cancel the common factor:

$$ \begin{align*} D_N(t)= \frac{\omega^{N+\frac12}-\omega^{-(N+\frac12)}}{\omega^{1/2}-\omega^{-1/2}}. \end{align*} $$

Now substitute back \(\omega=e^{it}\):

$$ \begin{align*} D_N(t)= \frac{e^{i(N+\frac12)t}-e^{-i(N+\frac12)t}}{e^{it/2}-e^{-it/2}}. \end{align*} $$

Now recall that

$$ \begin{align*} e^{in\theta}-e^{-in\theta}=2i\sin(n\theta). \end{align*} $$

Set \(\theta = (N+\frac12)t\) for the numerator and \(\theta = t/2\) in the denominator so

$$ \begin{align*} D_N(t) &= \frac{2i\sin((N+\frac12)t)}{2i\sin(t/2)} \\ &= \frac{\sin((N+\frac12)t)}{\sin(t/2)}. \end{align*} $$

Now recall that we excluded \(\omega = 1\). Since \(\omega=e^{it}\),

$$ \begin{align*} \omega=1 \quad\Longleftrightarrow\quad t=2\pi k,\qquad k\in\mathbb Z. \end{align*} $$

So when \(t = 2\pi k\), let’s go back to the original definition:

$$ \begin{align*} D_N(t)=\sum_{n=-N}^{N}e^{int}. \end{align*} $$

At \(t=2\pi k\), every term is

$$ \begin{align*} e^{in(2\pi k)}=1. \end{align*} $$

There are \(2N+1\) terms, so \(D_N(2\pi k)=2N+1\). If we summarize everything, we get

$$ \begin{align*} D_N(t)= \begin{cases} \displaystyle \frac{\sin\left((N+\tfrac12)t\right)}{\sin(t/2)}, & t\notin 2\pi\mathbb Z,\\[8pt] 2N+1, & t\in 2\pi\mathbb Z. \end{cases} \end{align*} $$

References

  • SFSU Fourier Analysis by Professor Chun-Kit Lai
  • Fourier Analysis: An Introduction by Elias M.Stein and Rami Shakarchi