The convergence of the Fourier series proved in Dirichlet's theorem was called pointwise. In order to guarantee that, if the #f_n# are continuous, the limit #f# is also continuous, we need a stronger concept of convergence.
Let #f_n# #(n=1,2,\ldots)# be a sequence of real functions defined on a set #E# of real numbers. We recall that the sequence is said to converge pointwise to a function #f# on #E# if, for each #x# in #E#, we have \[f(x) = \lim_{n \rightarrow \infty} f_n(x)\]
We say that this sequence converges uniformly to a function #f# on #E# if, for every #\varepsilon \gt 0#, there exists a natural number #N# such that, for #n \geq N# and all #x\in E#, we have
\[\begin{array}{c}\displaystyle |f_n(x) -f(x)|\lt\varepsilon \end{array}\]
In the setting of Fourier series, we take #s_0= \frac{a_0}{2}# and #s_n(x) = s_0+\sum_{k=1}^n\left(a_k\cos(kx)+b_k\sin(kx)\right)#, where #a_0#, #a_1#, #b_1#, #a_2#, #b_2,\ldots# are given by the Euler formulas for a #2\pi#-periodic piecewise smooth function #f#. Then, according to Dirichlet's theorem, the series #s_n# #(n=1,2,\ldots)# converges pointwise to the function #\frac12(f_-(x)+f_+(x))# and so to #f(x)# if #f# is continuous at #x#. In general this convergence is not uniform, but later we will see that it converges uniformly if #f# is continuous.
In terms of limits and suprema, we can formulate uniform convergence of the sequence #f_n # #(n=1,2,\ldots)# to #f# on #E# by \[ \displaystyle \lim_{n\rightarrow \infty} \sup_{x \in E} \abs{f_n(x) -f(x)} = 0 \]
If the #f_n# #(n=1,2,\ldots)# are continuous, is #f# continuous? The following example shows that the notion of pointwise convergence is not strong enough to answer this question in the affirmative.
The sequence of continuous functions
\[\begin{array}{l}\displaystyle f_n(x)=\frac{1}{1+n^2 x^2} \end{array}\]
converges pointwise to the function
\[\begin{array}{l}\displaystyle f(x) = \begin{cases} 1 & \text{if }x=0 \\ 0 & \text{otherwise} \end{cases} \end{array}\]
which is not continuous.
This convergence is not uniform, as can be seen by use of the Reformulation above: \[ \begin{array}{rcl}\displaystyle \lim_{n\rightarrow \infty} \sup_{x \in \mathbb{R}} \abs{f_n(x) -f(x)} &=&\displaystyle \lim_{n\rightarrow \infty} \sup_{x \ne0} \frac{1}{1+n^2x^2} \\ &=&\displaystyle \lim_{n\rightarrow \infty} 1 \\ &=& 1\end{array} \]
The series #f_n# #(n=1,2,\ldots)# converges pointwise to the function #f# if, for each #x# in the domain of #f# and each #\varepsilon \gt 0#, there exists a natural number #N_{\varepsilon,x} # such that, whenever #n \ge N_{\varepsilon,x} #, we have #|f_n(x)-f(x)|\lt \varepsilon #. The dependence of #N_{\varepsilon,x}# on #x# is the crucial difference with uniform convergence. Indeed the definition of uniform convergence says that for every #\varepsilon \gt 0# there exists #N_{\varepsilon}# such that, whenever #n\gt N_{\varepsilon}# the inequality #|f_n(x)-f(x)|\lt \varepsilon # holds for all #x# in #E#.
Clearly, uniform convergence implies pointwise convergence. An example of pointwise but non-uniform convergence is given in another comment to the definition.
We will often employ the notion for series rather than sequences. We say that the series #\sum_{n=1}^\infty f_n(x) # converges uniformly to #f# on #E# if the sequence #s_n# #(n=1,2,\ldots)# of partial sums defined by
\[\displaystyle s_n(x) = \sum_{k=1}^n f_k(x) \]
converges uniformly to #f# on #E#.
Suppose that the sequence #f_n# #(n=1,2,\ldots)# of functions on a set #E# of real numbers converges uniformly to a function #f# on #E#. If #\lambda# is a nonzero number, then the series #f_n(\lambda x)# #(n=1,2,\ldots)# of functions on the set #\lambda^{-1} E=\{\frac{x}{\lambda}\mid x\in E\}# of real numbers converges uniformly to the function #f(\lambda x)#. In words: the notion of uniform convergence is invariant under scaling.
This fact is a direct consequence of the definition, since the set of values #\abs{f_n(x) -f(x)}# for #x\in E# coincides with the set of values #\abs{f_n(\lambda x) -f(\lambda x)}# for #x\in \lambda^{-1} E#.
In particular, the Fourier series #s_n# of a #2L#-periodic function #f# on #\mathbb{R}# converges uniformly to #f# if and only if the #2\pi#-periodic scalings #s_n\left(\frac{\pi x}{L}\right)#, which are the Fourier series of #f\left(\frac{\pi x}{L}\right)#, convergence uniformly to the #2\pi#-periodic function #f\left(\frac{\pi x}{L}\right)#.
The uniform convergence criterion below does not use the limit function #f# in its formulation.
Let #E# be a set of real numbers and let #f_n: E \rightarrow \mathbb{R}# be functions for each natural number #n#. The sequence #f_n# #(n=1,2,\ldots)# converges uniformly if and only if for every #\varepsilon \gt 0# there is a number #M# such that, for all #n#, #m \gt M# and all #x \in E#, we have
\[\displaystyle \left| f_n(x) - f_m(x)\right| \lt \varepsilon \]
A sequence with the latter property is sometimes said to be uniformly Cauchy on #E#.
Suppose that #f_n# #(n = 1,2,\ldots)# are real functions on a subset #E# of #\mathbb{R}# converging uniformly to a real function #f# on #E#. Then there is a number #M# such that, for all #x \in E#,
\[\displaystyle \left| f_n(x) -f(x)\right| \lt \frac{\varepsilon}{2} \]
By the triangle inequality, this implies that, for all #n,m \geq M#,
\[\begin{array}{c}\displaystyle \left| f_n(x) -f_m(x)\right| \leq \left| f_n(x) -f(x)\right| + \left| f(x) -f_m(x)\right| \lt \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon \end{array}\]
This proves that uniform convergence implies that the sequence is uniformly Cauchy.
To prove the other implication, we use the notion of Cauchy sequence. A Cauchy sequence of real numbers #a_n# #(n=1,2,\ldots)# is called a Cauchy sequence if, for every #\varepsilon \gt 0# there is a number #M# such that, for all #n#, #m \gt M# and all #x \in E#, we have
\[\displaystyle \left| a_n - a_m\right| \lt \varepsilon \]
It is an essential property of the real numbers that Cauchy sequences converge to real numbers.
Consider the sequence #f_n(x)# #(n=1,2,\ldots)#. It is a Cauchy sequence for each #x# and thus converges to a value which we call #f(x)#. This defines a function #f# on #E#. Given #\varepsilon \gt 0#, there is an index #N# such that, for #n,m \gt N#, we have
\[ \left| f_m(x) -f_n(x)\right| \lt\frac{\varepsilon}{2} \]
In particular, letting #n \rightarrow \infty#, we find that, for each #x \in E#,
\[\displaystyle \left| f_m(x) -f(x)\right| \le\frac{\varepsilon}{2}\lt\varepsilon\]
This shows that the sequence #f_n# #(n=1,2,\ldots)# converges uniformly to #f#.
Let #x# be a real number and consider the sequence \(a_n(x)\) #(n=1,2,\ldots)# whose #n#-th term #a_n# is the decimal expansion of #x# up to #n# places. Then, for any pair of natural numbers #m,n# we have \[\left|a_m(x)-a_n(x)\right| \le 10^{-\min(m,n)}\] Now given any #\varepsilon\gt0#, there is a natural number #N# such that #10^{-N}\lt \varepsilon#, and so , for all natural numbers #m,n\ge N#, we have \[\left|a_m(x)-a_n(x)\right |\le 10^{-\min(m,n)}\lt \varepsilon \]This shows that \(a_n(x)\) #(n=1,2,\ldots)# is a Cauchy sequence for each #x#.
The following theorem gives a very useful criterion for establishing uniform convergence of a series.
Let #f_k# #(k=1,2,\ldots)# be a sequence of real functions on a subset #E# of #\mathbb{R}#. Assume that there is a sequence #M_k# #(k=1,2,\ldots)# such that the corresponding series #\sum_{k=1}^{\infty} M_k# converges and, for each natural number #k#, we have #|f_k(x)| \leq M_k# for each #x \in E#. Then both #\sum_{k=1}^{\infty}\abs{ f_k(x)}# and #\sum_{k=1}^{\infty} f_k(x)# converge uniformly on #E#.
The numbers #M_k# in the hypotheses of the Weierstrass M-test must be nonnegative since they satisfy #M_k\ge \abs{f_k(x)}#.
Let #\varepsilon \gt 0#. By the convergence of #\sum_{k=1}^{\infty} M_k#, we can find a natural number #N # such that, for all #m# and #n# with #n \gt m \gt N#, we have
\[\begin{array}{c}\displaystyle \sum_{k=m+1}^n M_k \lt \varepsilon \end{array} \]
As a consequence, for each pair #m#, #n# of natural numbers with #n \gt m \gt N# and for each #x \in E# we have
\[\begin{array}{rcl}\displaystyle \left|\sum_{k=1}^{m} f_k(x) -\sum_{k=1}^{n} f_k(x)\right| &=& \displaystyle\left| \sum_{k=m+1}^n f_k(x) \right| \\ &\leq& \displaystyle\sum_{k=m+1}^n \left| f_k(x) \right|\\ & \leq& \displaystyle\sum_{k=m+1}^n M_k \\ &\lt& \varepsilon \end{array}\]
This shows that #s_n# is uniformly Cauchy, so, by the above Uniform Cauchy theorem, it converges uniformly on #E#.
The fact that the series #\sum_{k=1}^{\infty} \abs{f_k(x)}# is also uniform convergent can be proven similarly, since \[ \left|\sum_{k=1}^m \left| f_k(x) \right| -\sum_{k=1}^n \left| f_k(x) \right|\right|=\sum_{k=m+1}^n \left| f_k(x) \right|\le \sum_{k=m+1}^{n} M_k\]
Consider the series \[s(x) = \sum_{k=1}^{\infty} \frac{1}{x^2+k^2}\] Set #M_k =\frac{1}{k^2}# for #k=1,2,\ldots# Then #\sum_{k=1}^{\infty}M_k# converges and, for each #x \in \mathbb{R}#, we have
\[\left|\frac{1}{x^2+k^2}\right|\le \frac{1}{k^2} = M_k\]
so the Weierstrass M-test can be applied. This shows that the series #s# converges uniformly to a function on #\mathbb{R}#.
The converse statement to the Weierstrass M-test with #E = \ivcc{0}{1}# would be that, if a series #\sum_{n=1}^{\infty} f_n(x) # converges uniformly on #\ivcc{0}{1}#, then there exists a sequence of real numbers #M_n# #(n=1,2,\ldots)# such that #|f_n(x)| \leq M_n# for all #n \in \mathbb{N}# and #\sum_{n=1}^\infty M_n# converges.
This statement is false. A counterexample is given by the sequence of functions # f_n# on #\ivcc{0}{1}# defined by \[f_n(x) = \begin{cases}0 & \text{if }x \in \ivcc{0}{2^{-n-1}} \cup \ivoc{2^{-n}}{1} \\\ \dfrac{1}{n} \sin^2(2^{n-1}\pi x) & \text{if }x \in \ivoc{2^{-n-1}} {2^{-n}}\end{cases} \] If #x=0# then #f_n(x)=0# and if #x\in\ivoc{0}{1}# then, for each natural number #n# with #2^n\gt \frac{1}{x} # we have #x\in\ivoc{2^{-n}}{1}#, so #f_n(x)=0#. Hence, the sequence #f_n# #(n=1,2,\ldots)# converges pointwise to the constant function #0# on #\ivcc{0}{1}#.
If #x\in \ivoc{0}{\frac{1}{2}}#, then it lies in exactly one of the intervals #\ivoc{2^{-n-1}}{2^{-n}}#, because these intervals have no points in common. Hence there is only one natural number #n(x)# such that #x \in \ivoc{2^{-n(x)-1}}{2^{-n(x)}}#. Then #f_{n(x)}(x)=\frac{1}{n(x)}\sin^2(2^{n(x)-1}\pi x)# and #f_{n}(x)=0# for #n \neq n(x)#. As a consequence, #\sum_{n=1}^{\infty} f_n(x) = f_{n(x)}(x)#, which shows the convergence of this series on #\ivoc{0}{\frac12}#. Since for each #n\ge1#, we have #f_n(x) =0# if #x=0# and if #x\in\ivoc{\frac12}{1}#, we conclude that the series #\sum_{n=1}^{\infty}f_n(x)# converges pointwise to the function #s# on #\ivcc{0}{1}# given by # s(x) =f_{n(x)}(x)# if #x\in\ivoc{0}{\frac{1}{2}}# and #s(x) = 0# otherwise.
Similarly, we can prove that the convergence is uniform. For each #x\in\ivoc{0}{\frac12}#, we have
\[|f_{n(x)}(x)| = \left| \frac{1}{n(x)} \sin^2(2^{n(x)-1} \pi x) \right| \leq \frac{1}{n(x)}\]
This implies that
\[\left|\sum_{k=1}^nf_k(x)-f_{n(x)}(x)\right| \le \frac{1}{n}\]
because the left hand side is equal to #0# if #n\ge n(x)# and equal to #|f_{n(x)}(x)| #, which is at most #\frac{1}{n(x)}# as we saw above, if #n\lt n(x)#.
Therefore, for each natural number #n#,
\[\begin{array}{rcl}\displaystyle\sup_{x\in\ivcc{0}{1}}\left|\sum_{k=1}^{n} f_k(x)-s(x)\right| &=&\displaystyle \sup_{x\in\ivoc{0}{\frac12}}\left|\sum_{k=1}^{n} f_k(x)-s(x)\right|\\
&&\phantom{xxx}\color{blue}{\text{all terms are zero outside }\ivoc{0}{\frac12}}\\
\\&=&\displaystyle \sup_{x\in\ivoc{0}{\frac12}}\left|\sum_{k=1}^{n} f_k(x)-f_{n(x)}(x)\right|\\
&&\phantom{xxx}\color{blue}{\text{function rule of }s(x)\text{ on }\ivoc{0}{\frac12}}\\
&\le&\displaystyle \sup_{x\in\ivoc{0}{\frac12}} \frac{1}{n}\\
&&\phantom{xxx}\color{blue}{\text{inequality derived above}}\\&=&\displaystyle \frac{1}{n}\\\end{array}\]
Thus, \(\lim_{n\to\infty}\sup_{x\in\ivcc{0}{1}}\left|\sum_{k=1}^{n} f_k(x)-s(x)\right|=0 \), which means that the series converges uniformly to #s(x)# on #\ivcc{0}{1}#.
Yet, the functions #\left|f_n(x)\right|# do not admit an upper bound on #\ivcc{0}{1}# by constants #M_n# such that the series #\sum_n M_n# converges. Indeed, for each natural number # n#, the inequality #\left|f_n(x) \right|\leq \frac{1}{n}# is actually an equality when #x_n= 2^{-n}#, for then #x_n \in \ivoc{2^{-n-1}}{2^{-n}}# so #\left|f_n(x_n)\right| =\dfrac{1}{n} \sin^2(2^{n-1}\pi 2^{-n})= \frac{1}{n}\sin^2\left(\frac{\pi}{2} \right)=\frac{1}{n}#. This means that the optimal choice for #M_n# would be #\frac{1}{n}#. But the series #\sum_{n=1}^{\infty} \frac{1}{n}# diverges.
Consider the following sequence #f_n# #(n=1,2,\ldots)# of real functions defined on the whole real line by
\[ f_n(x) = {{n\cdot x}\over{n^2\cdot x^2+1}} \]
The function #f(x) =0 # is the pointwise limit of the sequence. The goal is to determine whether the series converges uniformly to #f#.
Give a simplified expression for the supremum of #\left|f_n(x)-f(x)\right|# for #x\in\mathbb{R}# in terms of #n#.
#\sup\{\left|f_n(x)-f(x)\right|\,\mid x\in\mathbb{R}\} = # #{{1}\over{2}}#
The function #f_n-f# is differentiable. Its derivative is given by \[\begin{array}{rcl}\displaystyle
\frac{\dd}{\dd x}\left (f_n(x)-f(x)\right)&=&\displaystyle \frac{\dd}{\dd x}\left ({{n\cdot x}\over{n^2\cdot x^2+1}}\right)\\ &=&\displaystyle {{-\left(n^3\cdot x^2-n\right)}\over{n^4\cdot x^4+2\cdot n^2\cdot x^2+1}}\end{array}\] Its zeros are \[ x={{-1}\over{n}} \quad\text{ and }\quad x={{1}\over{n}} \] The extreme values of #f_n(x)-f(x)# are assumed at these points. These values are \[ {{-1}\over{2}} \quad\text{ and }\quad {{1}\over{2}} \] Furthermore, the limits of #f_n(x)-f(x)# for #x\to \infty # and for #x\to -\infty # are clearly #0#, so
\[\sup\{\left|f_n(x)-f(x)\right|\,\mid x\in\mathbb{R}\} ={{1}\over{2}} \]
As a consequence, we find
\[ \lim_{n\to\infty} \sup\{\left|f_n(x)-f(x)\right|\,\mid x\in\mathbb{R}\} = \lim_{n\to\infty}{{1}\over{2}} ={{1}\over{2}} \]
According to the reformulation of the definition Uniform convergence, this means that #f_n# #(n=1,2,\ldots)#
does not converge uniformly to #f#.
This result is illustrated in the graphs pictured below of the functions #f_1# (in blue), #f_2# (in purple), #f_{10}# (in red), and #f_{100}# (in green).