The following function will be used in the calculation of integrals for the purpose of proving convergence of Fourier series.
The Dirichlet kernel is the function #D_n# defined by
\[\begin{array}{rcl}\displaystyle D_n(x)& =&\displaystyle \frac{1}{\pi} \left( \frac{1}{2} + \sum_{k=1}^{n} \cos(kx) \right) \end{array}\]
This function satisfies
\[\begin{array}{rcl}\displaystyle D_n(x)&=& \displaystyle\frac{1}{2\pi}\frac{\sin\left((n+\frac12)x\right)}{\sin\left(\frac{x}{2}\right)} \phantom{xx}\text{ for }\phantom{xx} x \neq 2k\pi \end{array}\]
and
\[\begin{array}{rcl}\displaystyle \int_{-\pi}^0D_n(x)\,\dd x&=& \displaystyle\frac{1}{2}\\\displaystyle \int_{0}^{\pi}D_n(x)\,\dd x&=& \displaystyle\frac{1}{2}\end{array}\]
We begin by using the well-known geometric series formula to derive the following formula for the sum of powers of a number #a\ne1# with exponents ranging from #k=-n# to #k=n#:
\[\begin{array}{c}\displaystyle \sum_{k=-n}^{n} a^{k} = \frac{a^{-n-\frac12}-a^{n+\frac12}}{a^{-\frac12}-a^{\frac12}} \end{array}\]
Indeed,
\[\begin{array}{rcl}\displaystyle \sum_{k=-n}^{n} a^{k} &=&\displaystyle a^{-n} \cdot \frac{1-a^{2n+1}}{1-a} \\&&\phantom{xxx}\color{blue}{\text{geometric series formula}}\\&=&\displaystyle \frac{a^{-n-\frac12}}{a^{-\frac12}} \cdot \frac{1-a^{2n+1}}{1-a}\\&&\phantom{xxx}\color{blue}{\text{both denominator and numerator multiplied by }a^{-\frac12}}\\ &=&\displaystyle \frac{a^{-n-\frac12}-a^{n+\frac12}}{a^{-\frac12}-a^{\frac12}}\\ &&\phantom{xxx}\color{blue}{\text{simplified}}\end{array}\]
By de Moivre's formula, we have #(\cos(x) + \ii\sin(x))^n =\cos(nx) + \ii\sin(nx)=\ee^{n\ii x}#. Since #\sin# is odd and #\cos# is even, we find, for #x# such that #\ee^{x\ii}\ne1#,
\[\begin{array}{rcl} D_n(x) &=&\displaystyle \frac{1}{\pi} \left( \frac{1}{2} + \sum_{k=1}^{n} \cos(kx) \right)\\&&\phantom{xxx}\color{blue}{\text{definition of }D_n}\\ &=&\displaystyle \frac{1}{2\pi} \sum_{k=-n}^{n} (\cos(kx) +\ii\sin(kx))\\&&\phantom{xxx}\color{blue}{\cos\text{ is even and }\sin\text{ is odd}}\\&=&\displaystyle \frac{1}{2\pi} \sum_{k=-n}^{n} \ee^{kx\ii} \\&&\phantom{xxx}\color{blue}{\text{ De Moivre's formula}}\\&=&\displaystyle\frac{1}{2\pi}\frac{\ee^{-(n+\frac12)\ii x}-\ee^{(n+\frac12)\ii x}}{\ee^{-\ii \frac{x}{2}}-\ee^{\ii \frac{x}{2}}} \\&&\phantom{xxx}\color{blue}{\text{ above version of geometric series formula with }a = \ee^{\ii x}}\\&=&\displaystyle\frac{1}{2\pi}\frac{-2\ii\sin((n+\frac12)x)}{-2\ii\sin(\frac{x}{2})} \\&&\phantom{xxx}\color{blue}{\ee^{x\ii}-\ee^{-x\ii} = 2\ii\sin(x)}\\ &=&\displaystyle\frac{1}{2\pi}\frac{\sin((n+\frac12)x)}{\sin(\frac{x}{2})} \\&&\phantom{xxx}\color{blue}{\text{ simplified}}\\ \end{array}\]
Since #\ee^{x\ii}\ne1# if and only if #x# is not an integer multiple of #2\pi#, this establishes the formula for #D_n(x)#.
We continue by calculating the first integral involving #D_n#:
\[\begin{array}{rcl}\displaystyle \int_{-\pi}^0 D_n(x)\,\dd x & =& \displaystyle\frac{1}{2\pi} \int_{-\pi}^0 \dd x +\frac{1}{\pi}\sum_{k=1}^{n} \int_{-\pi}^0\cos(kx)\dd x\\&&\phantom{xxx}\color{blue}{\text{definition of }D_n}\\ & =& \displaystyle\frac{1}{2\pi} \left[x\right]_{x=-\pi}^{x=0} +\sum_{k=1}^{n} \frac{1}{k\pi}\left[\sin(kx)\right]_{x=-\pi}^{x=0}\\&&\phantom{xxx}\color{blue}{\text{antiderivatives determined}}\\& =& \displaystyle\frac{1}{2\pi} \pi +\sum_{k=1}^{n} \frac{1}{k\pi}\cdot 0\\&&\phantom{xxx}\color{blue}{\text{antiderivatives evaluated at boundaries}}\\& =& \displaystyle\frac{1}{2}\\&&\phantom{xxx}\color{blue}{\text{simplified}}\\ \end{array}\]
Since #D_n# is an even function, the second definite integral has the same value. This ends the proof of the theorem.
So far, we have not been concerned with convergence of the Fourier series. The theorem below is the first result in this direction.
From Piecewise continuous and smooth functions, we recall that, for a real piecewise continuous function #f# defined on an open interval around a point #x#, we write
- #f_+(x)# for #\lim_{h\downarrow 0}f(x+h)#, the right-hand limit of #f# at #x#, and
- #f_-(x)# for #\lim_{h\downarrow 0}f(x-h)#, the left-hand limit of #f# at #x#.
Let #L# be a positive number and \(f\) a periodic real function with period \(2L\). If #f# is piecewise smooth on the closed interval \(\ivcc{-L}{ L}\), then the Fourier series of #f# exists and converges to \(\frac{f_+(x)+f_-(x)}{2}\) at each point #x#.
In particular, the Fourier series of #f# converges to #f(x)# at all points \(x\) where \(f\) is continuous.
In what follows we can fix #L = \pi# without loss of generality, as the properties we exploit only depend on the integration interval being symmetric.
Consider the trigonometric series
\[\displaystyle s_n(x) = \frac{a_0}{2}+\sum_{k=1}^n\left(a_k\cos(kx)+b_k\sin(kx)\right)\]
where #a_0#, #a_1,\ldots,a_n#, #b_1,\ldots,b_n# are given by the Euler formulas for #f#.
We will show that \(\lim_{n\to\infty}s_n \) exists and is a Fourier series of #f#. Using the Euler formulas, we can write
\[ s_n(x) = \frac{1}{\pi} \int_{-\pi}^{\pi}f(y)\, \left(\frac{1}{2} + \sum_{k=1}^{n}\left( \cos(kx)\cos(ky) + \sin(kx)\sin(ky)\right)\right) \dd y \]
Recall from Dirichlet kernel that the function #D_n# is defined by
\[\begin{array}{c}\displaystyle D_n(x) = \frac{1}{\pi} \left( \frac{1}{2} + \sum_{k=1}^{n} \cos(kx) \right) \end{array}\]
Applying the addition formula for the cosine of a difference, we find
\[\begin{array}{c}D_n(x-y) = \displaystyle \frac{1}{\pi} \left( \frac{1}{2} + \sum_{k=1}^{n} \cos(kx)\cos(ky) + \sin(kx)\sin(ky) \right) \end{array}\]
We use this identity to rewrite #s_n(x)#.
\[\begin{array}{rcl}\displaystyle s_n(x) &=&\displaystyle\int_{-\pi}^{\pi} f(y)D_n(x-y) \dd y \\&&\phantom{xxx}\color{blue}{\text{use of the identity for }D_n(x-y) \text{ gives the above expression for }s_n(x)} \\ & =&\displaystyle \int_{-\pi+x}^{\pi+x} f(x+z)D_n(z) \dd z \\&&\phantom{xxx}\color{blue}{\text{change of variable }y = x+z\text{ since }D_n\text{ is even}}\\& =&\displaystyle \int_{-\pi}^{\pi}f(x+z) D_n(z) \dd z \\&&\phantom{xxx}\color{blue}{f(x+z) D_n(z)\text{ is periodic in }{z}\text{ with period }2\pi}\end{array}\]
By using properties of the Dirichlet kernel we continue to rewrite #s_n(x)# as follows.
\[\begin{array}{rcl}\displaystyle s_n(x) &=& \displaystyle\int_{-\pi}^{0} f(x+z)D_n(z)\dd z + \int_{0}^{\pi} f(x+z)D_n(z)\dd z \\ &&\phantom{xxx}\color{blue}{\text{property of definite integrals}}\\ &=& \displaystyle\int_{-\pi}^{0} \left(f(x+z)-f_-(x)\right)D_n(x) \dd z +\frac{1}{2}f_-(x) \\ &&\,+ \displaystyle\int_{0}^{\pi} \left(f(x+z)-f_+(x)\right)D_n(x)\dd z +\frac{1}{2}f_+(x) \\&&\phantom{xxx}\color{blue}{\int_{-\pi}^0D_n(x)\,\dd x=\frac{1}{2}= \int_{0}^{\pi}D_n(x)}\\ &=& \displaystyle\frac{1}{2\pi}\int_{-\pi}^{0} \left(f(x+z)-f_-(x)\right) \frac{\sin((n+\frac12)z)}{\sin(\frac{z}{2})} \dd z +\frac{1}{2}f_-(x) \\ &&\,+ \displaystyle\frac{1}{2\pi}\int_{0}^{\pi} \left(f(x+z)-f_+(x)\right)\frac{\sin((n+\frac12)z)}{\sin(\frac{z}{2})} \dd z +\frac{1}{2}f_+(x) \\&&\phantom{xxx}\color{blue}{D_n(z) =\frac{1}{2\pi} \frac{\sin(((n+\frac12)z)}{\sin(\frac{z}{2})} \text{ for } z \neq 2k\pi }\\ &=& \displaystyle\frac{1}{2\pi}\int_{0}^{\pi}\left(g_{L}(z)+g_{R}(z)\right)\sin((n+\frac12)z) \dd z + \frac{f_-(x) +f_+(x)}{2}\end{array}\]
where
\[\begin{array}{c}\displaystyle g_{L}(y) = \frac{f(x-y)-f_-(x)}{\sin\left(\frac{y}{2}\right)}\phantom{xxx}\text{ and }\phantom{xxx}\displaystyle g_{R}(y) = \frac{f(x+y)-f_+(x)}{\sin\left(\frac{y}{2}\right)}\end{array}\]
We will finish the proof by establishing that the first term of the expression found for #s_n(x)# is equal to zero. Both functions #g_L# and #g_R# are piecewise continuous on #\ivcc{0}{\pi}#. For instance, #g_{R}# is the quotient of the piecewise continuous function #f(x+y)-f_+(x)# of #y# by the continuous function #\sin\left(\frac{y}{2}\right)# that has a zero only at #0#. But this function is well-behaved at #0# too. Before proving this, we first need to analyse the limit of #\frac{f(x+y)-f_+(x)}{y}# for #y\downarrow0#.
By the assumption that #f# is piecewise smooth, the right-hand limit #f'_+(x)=(f')_+(x)# of #f'(x+y)# for #y\downarrow0# exists. We assert that
\[\lim_{y\downarrow0}\frac{f(x+y)-f_+(x)}{y} = f'_+(x)\]
In order to see this, let #\varepsilon\gt0#. By the definition of right-hand limit for #f'# at #x#, there is #\delta\gt0# such that #f# is continuous on #\ivoo{0}{\delta}# and such that, for all #y\in\ivoo{0}{\delta}#, we have #\left|f'(x+y)-f'_+(x)\right|\lt \varepsilon#. Now let #y\in\ivoo{0}{\delta}#. By the Mean value theorem, there is a number #\eta\in\ivoo{0}{1}# such that
\[\frac{f(x+y)-f_+(x)}{y}= f'(x+\eta \cdot y)\]As a consequence,
\[\begin{array}{rcl}\displaystyle \left|\dfrac{f(x+y)-f_+(x)}{y}-f'_+(x)\right|&=& \displaystyle \left|f'(x+\eta \cdot y)-f'_+(x)\right | \lt \varepsilon\end{array}\]which proves the assertion. With this assertion, we calculate
\[\begin{array}{rcl}\displaystyle \lim_{y \downarrow 0} g_{R}(y) &=& \displaystyle\lim_{y \downarrow 0} \frac{f(x+y)-f_+(x)}{\sin(\frac{y}{2})} \\ &&\phantom{xxx}\blue{\text{function rule for }g_{R}} \\ &=& \displaystyle\lim_{y \downarrow 0}\left(\frac{f(x+y)-f_+(x)}{y}\cdot\frac{y}{\sin(\frac{y}{2})}\right)\\ &=& \displaystyle\lim_{y \downarrow 0}\frac{f(x+y)-f_+(x)}{y} \cdot\lim_{y \downarrow 0}\frac{y}{\sin(\frac{y}{2})}\\ &=& f'_+(x)\cdot 2 \\ &&\phantom{xxx}\blue{\text{by the above assertion and }\lim_{y \downarrow 0}\frac{\sin(y)}{y} =1} \\ &=&2 f'_+(x) \end{array}\]
Similarly, we can prove #\lim_{y \downarrow 0} g_{L}(y)=2 f'_-(x)#. In particular, the function #g_{L}+g_{R}# is Riemann integrable on #\ivcc{0}{\pi}#, so the Riemann-Lebesgue lemma gives
\[\begin{array}{l}\displaystyle \lim_{n \rightarrow \infty} \int_{0}^{\pi}\left(g_{L}(y)+g_{R}(y)\right)\cdot \sin((n+\frac12)y)\, \dd y = 0 \end{array}\]
As a consequence,
\[\displaystyle \lim_{n \rightarrow \infty} s_n(x)=\frac{f_-(x)+f_+(x)}{2} \]
If #f# is continuous at #x#, then #\frac{1}{2} \left(f_-(x)+f_+(x)\right)# coincides with #f(x)# and the Fourier series converges to #f(x)#.
Consider the function \(f(x)\) (blue) defined on the open interval \(\ivoc{-2}{ 2}\), and the function \(g(x)\) (red) to which the Fourier series of \(f(x)\) converges. In the graphs below a small full circle denotes a point of the graph of the function, while a small empty circle indicate that its centre does not belong to the graph.

There are three key features of the above plots that are specified in the Fourier Convergence Theorem:
- The Fourier series converges to \(f(x)\) on the open interval \(\ivoo{-2}{2}\) where \(f\) is continuous (i.e., the red and blue curve match on the interval \(\ivoo{-2}{2}\) except at \(x=0\) where \(f\) is discontinuous).
- The Fourier series is periodic outside of the interval \(\ivoo{-2}{2}\) with period 4 (i.e., the red curve repeats every 4 units).
- At points where the periodic extension of \(f\) is discontinuous (i.e. \(x=0,\pm2,\pm4,\ldots\)) the Fourier series converges to the mid-point between the two ends of the discontinuity. For example, at \(x=2\) the function approaches \(f_-(2)=1\) from the left of the discontinuity, and \(f_+(2)=0\) from the right. Hence the Fourier series converges to \(g(0)=0.5\) as \(0.5\) is halfway between \(0\) and \(1\)
Suppose that \(f\) is piecewise continuous on the interval \(\ivcc{-L}{L}\) and let \(g\) denote the function to which the Fourier series of \(f\) converges.
- If \(a\in\ivoo{-L}{L}\) then \(g(a)=f(a)\) if \(f\) is continuous at \(x=a\) and \(g(a)=\frac{f_+(a)+f_-(a)}{2}\) if \(f\) is discontinuous at \(x=a\).
- If \(a=\pm L\) then \(g(a)=\frac{f_+(-L)+f_-(L)}{2}\).
- If \(f\) is defined as the even or odd extension of a function defined on \(\ivco{0}{L}\) and \(a\in\ivoo{-L}{0}\), then use the appropriate even property (\(f(-x)=f(x)\)) or odd property (\(f(-x)=-f(x)\)) so that #f(a)# can be calculated by evaluating \(f(-a)\) on \(\ivco{0}{L}\).
- If \(a\notin\ivcc{-L}{L}\) then subtract or add \(2L\) to \(a\) until \(a\in\ivcc{-L}{L}\). Then refer to items 1, 2, and 3 above.
A direct consequence of the theorem is the fact that two periodic piecewise smooth functions with the same period and the same Fourier series have the same values at every point where both are continuous.
Another look at the Riemann-Lebesgue lemma tells us that, if #f# is a periodic piecewise continuous function having a Fourier series, the Fourier coefficients #a_n# and #b_n# tend to zero as #n\to \infty#. Indeed, if #L# is the half-period of #f#, then, by the Euler formulas,
\[\lim_{n\to\infty} a_n =\frac{1}{L} \lim_{n\to\infty} \int_{-L}^{L}f(x)\cos\left(\frac{n\pi x}{L}\right)\,\dd x = 0\] and similarly for #b_n#.
If #f_n# #(n=1,2,\ldots)# is a sequence of real functions on the same domain #E# and #f# is a real function on #E# such that #\lim_{n=1}^\infty f_n(x) = f(x)#, then we say that the series converges pointwise to #f#. Later we will consider uniform convergence, which is a stronger property of the sequence #f_n#.
Let #f# be the #12#-periodic odd function determined by \[f(x)=1-{{x}\over{6}}\phantom{xxx}\text{for}\phantom{xxx}0\lt x\le6 \] and let \(s(x)\) denote the Fourier series of #f#.
Determine \[s(38),\hspace{1.1cm}s(-36),\hspace{0.5cm}\text{and}\hspace{0.5cm}s(19)\]
- \(s(38)=\) # {{2}\over{3}} #
- \(s(-36)=\) # 0 #
- \(s(19)=\) # {{11}\over{6}} #
By
Dirichlet's theorem for Fourier series, the value of #s(x)# at #x# is #\frac{f_+(x)+f_-(x)}{2}#.
At #x= 38#, we have
\[ \begin{array}{rcl}s(38) &=& \displaystyle \frac{f_+(38)+f_-(38)}{2}\\
&&\phantom{xx}\color{blue}{\text{Dirichlet's theorem for Fourier series}}\\
&=& \displaystyle \frac{f_+(2)+f_-(2)}{2}\\
&&\phantom{xx}\color{blue}{f \text{ is }12\text{-periodic}}\\
&=& \displaystyle {{2}\over{3}}
\\ &&\phantom{xx}\color{blue}{f \text{ is continuous at }2\text{, so the value is } f(2)}
\end{array}\]
At #x= -36#, we have
\[ \begin{array}{rcl}s(-36) &=& \displaystyle \frac{f_+(-36)+f_-(-36)}{2}\\
&&\phantom{xx}\color{blue}{\text{Dirichlet's theorem for Fourier series}}\\
&=& \displaystyle \frac{f_+(0)+f_-(0)}{2}\\
&&\phantom{xx}\color{blue}{f \text{ is }12\text{-periodic}}\\
&=&\displaystyle \frac{1-1}{2}\\ &&\phantom{xx}\color{blue}{f \text{ is odd}}\\
&=& \displaystyle 0
\end{array}\]
At #x= 19#, we have
\[ \begin{array}{rcl}s(19) &=& \displaystyle \frac{f_+(19)+f_-(19)}{2}\\
&&\phantom{xx}\color{blue}{\text{Dirichlet's theorem for Fourier series}}\\
&=& \displaystyle \frac{f_+(-5)+f_-(-5)}{2}\\
&&\phantom{xx}\color{blue}{f \text{ is }12\text{-periodic}}\\
&=& \displaystyle {{11}\over{6}}
\\ &&\phantom{xx}\color{blue}{f \text{ is continuous at }-5\text{, so the value is } f(-5)}
\end{array}\]
A plot of the Fourier series of \(f\) over 3 periods is shown in the figure below. The figure illustrates where the discontinuities are. At values of #x# where #f# is discontinuous, the point of the graph of #f# is drawn by a small full circle while the empty circles indicate points not belonging to the graph.