For each \(x\) in \([0,1]\) the numbers \(x^n\) converge as \(n\to\infty\) : to \(0\) if \(x<1\) , and to \(1\) if \(x=1\) . Each function \(x^n\) is continuous, indeed a polynomial. Their limit is not continuous. In symbols,
The two limits do not commute. Cauchy stated in 1821 that a convergent series of continuous functions has a continuous sum, and the statement stood for years before the hidden assumption was identified.
The same difficulty appears three times in analysis, since continuity, the integral, and the derivative are all defined by limits. Is the limit of continuous functions continuous? Is the integral of the limit the limit of the integrals? Is the derivative of the limit the limit of the derivatives? For convergence at each point separately, the answer to all three is no. This chapter isolates the stronger notion of convergence under which the first two answers become yes and the third becomes yes with an extra hypothesis, and then applies it to series of functions, where it pays for itself at once: power series can be differentiated and integrated term by term.
8.1 Pointwise convergence and its failures
Definition 8.1 (pointwise convergence). Let \(f_n\) and \(f\) be real functions on a set \(S\) . The sequence \((f_n)\) converges pointwise to \(f\) on \(S\) if \(f_n(x)\to f(x)\) for every \(x\in S\) : for every \(x\in S\) and every \(\varepsilon>0\) there is an \(N\) such that \(\lvert f_n(x)-f(x)\rvert<\varepsilon\) for all \(n\ge N\) .
Here \(N\) is allowed to depend on \(x\) as well as on \(\varepsilon\) . That freedom is the source of every failure below.
Example 8.1: Pointwise limits lose continuity and lose area
Continuity. On \([0,1]\) let \(f_n(x)=x^n\) . As described above, \(f_n\to f\) pointwise, where \(f(x)=0\) for \(x<1\) and \(f(1)=1\) . The \(N\) needed for a given \(\varepsilon\) grows without bound as \(x\) approaches \(1\) : to get \(x^n<0.01\) takes \(n\ge 44\) at \(x=0.9\) , since \(0.9^{44}\approx 0.0097\) , and \(n\ge 459\) at \(x=0.99\) .
Area. On \([0,1]\) let \(g_n(x)=n^2x(1-x)^n\) . Then \(g_n(0)=0\) , and for \(0<x\le 1\) we have \(g_n(x)=x\cdot n^2r^n\) with \(r=1-x\in[0,1)\) ; since \(\sum n^2r^n\) converges by the ratio test, its terms tend to \(0\) . So \(g_n\to 0\) pointwise. But substituting \(u=1-x\) ,
For \(n=10\) the integral is about \(0.7576\) and for \(n=100\) about \(0.9707\) . The integrals converge to \(1\) , while the integral of the limit function is \(0\) . The graphs are tall thin humps: the maximum of \(g_n\) is at \(x=1/(n+1)\) and equals \(\tfrac{n^2}{n+1}\bigl(\tfrac{n}{n+1}\bigr)^n\) , about \(3.50\) for \(n=10\) and \(36.6\) for \(n=100\) . Each point is eventually left behind by the hump, but the hump keeps its area.
8.2 Uniform convergence
Definition 8.2 (uniform convergence). The sequence \((f_n)\) converges uniformly to \(f\) on \(S\) if for every \(\varepsilon>0\) there is an \(N\) such that
Now \(N\) depends on \(\varepsilon\) only. Geometrically: for \(n\ge N\) the whole graph of \(f_n\) lies in the band of half-width \(\varepsilon\) around the graph of \(f\) . Uniform convergence implies pointwise convergence to the same limit, so the only candidate for a uniform limit is the pointwise one. The relation between the two notions is that between continuity and uniform continuity in Chapter 5: the same words with one quantifier moved.
For a function \(g\) on \(S\) write \(\lVert g\rVert_\infty=\sup_{x\in S}\lvert g(x)\rvert\) , which may be \(+\infty\) . For bounded functions this is the distance from \(g\) to \(0\) in the metric space \(B(S)\) of Proposition 4.4.
Proposition 8.3 (supremum test). \((f_n)\) converges uniformly to \(f\) on \(S\) if and only if \(\lVert f_n-f\rVert_\infty\to 0\) . In particular, for bounded functions, uniform convergence is convergence in the metric space \(B(S)\) with the supremum metric.
Proof. If the convergence is uniform and \(n\ge N\) , then \(\varepsilon\) is an upper bound of the numbers \(\lvert f_n(x)-f(x)\rvert\) , so \(\lVert f_n-f\rVert_\infty\le\varepsilon\) . Conversely, if \(\lVert f_n-f\rVert_\infty<\varepsilon\) for \(n\ge N\) , then \(\lvert f_n(x)-f(x)\rvert<\varepsilon\) for all \(x\) and all \(n\ge N\) .
This turns a statement with three quantifiers into the convergence of one sequence of numbers. To test for uniform convergence: find the pointwise limit \(f\) , compute or estimate \(M_n=\lVert f_n-f\rVert_\infty\) , and see whether \(M_n\to 0\) .
Example 8.2: Computing the supremum
Powers on a shorter interval. On \([0,a]\) with \(0<a<1\) , \(\lVert x^n-0\rVert_\infty=a^n\to 0\) . So \(x^n\to 0\) uniformly on \([0,a]\) . On \([0,1)\) , however, \(\sup_{0\le x<1}x^n=1\) for every \(n\) , so the convergence to \(0\) is not uniform there, even though the limit function \(0\) is continuous on \([0,1)\) . Uniformity depends on the set.
A sequence on the whole line. Let \(f_n(x)=x/(1+nx^2)\) on \(\mathbb R\) . The pointwise limit is \(0\) . From \(1+nx^2\ge 2\sqrt n\,\lvert x\rvert\) , which is \((1-\sqrt n\lvert x\rvert)^2\ge 0\) , we get
with equality at \(x=1/\sqrt n\) . So \(\lVert f_n\rVert_\infty=1/(2\sqrt n)\to 0\) , and \(f_n\to 0\) uniformly on \(\mathbb R\) . For \(n=100\) the largest value anywhere is \(0.05\) .
Theorem 8.4 (uniform Cauchy criterion). A sequence \((f_n)\) of real functions on \(S\) converges uniformly on \(S\) if and only if for every \(\varepsilon>0\) there is an \(N\) such that \(\lvert f_n(x)-f_m(x)\rvert<\varepsilon\) for all \(m,n\ge N\) and all \(x\in S\) .
Proof. If \(f_n\to f\) uniformly, choose \(N\) with \(\lvert f_n(x)-f(x)\rvert<\varepsilon/2\) for all \(n\ge N\) and all \(x\) , and use the triangle inequality. Conversely, suppose the condition holds. For each fixed \(x\) the sequence \((f_n(x))\) is a Cauchy sequence of real numbers, so it converges; call its limit \(f(x)\) . Given \(\varepsilon>0\) take \(N\) as in the condition for \(\varepsilon/2\) . For \(n\ge N\) and any \(x\) , let \(m\to\infty\) in \(\lvert f_n(x)-f_m(x)\rvert<\varepsilon/2\) to get \(\lvert f_n(x)-f(x)\rvert\le\varepsilon/2<\varepsilon\) . The same \(N\) works for every \(x\) , so the convergence is uniform.
Restricted to bounded functions, the theorem says that \(B(S)\) with the supremum metric is a complete metric space: the pointwise completeness of \(\mathbb R\) has been lifted to a space of functions.
Common mistake. Proving pointwise convergence and calling it uniform. An argument that begins “fix \(x\) ; given \(\varepsilon\) choose \(N\) such that…” has let \(N\) depend on \(x\) , and proves pointwise convergence only, however the last line is worded. To prove uniform convergence, produce a bound for \(\lvert f_n(x)-f(x)\rvert\) that does not contain \(x\) and tends to \(0\) . To disprove it, show that \(\lVert f_n-f\rVert_\infty\) does not tend to \(0\) , for instance by evaluating at points \(x_n\) that move with \(n\) .
8.3 Continuity of the limit
Theorem 8.5 (uniform limit theorem). Let \(X\) be a metric space and let \(f_n:X\to\mathbb R\) converge uniformly on \(X\) to \(f\) . If every \(f_n\) is continuous at a point \(a\) , then \(f\) is continuous at \(a\) . Hence a uniform limit of continuous functions is continuous.
Proof. Let \(\varepsilon>0\) . By uniform convergence choose \(N\) with \(\lvert f_N(x)-f(x)\rvert<\varepsilon/3\) for all \(x\in X\) . By continuity of the single function \(f_N\) at \(a\) choose \(\delta>0\) with \(\lvert f_N(x)-f_N(a)\rvert<\varepsilon/3\) whenever \(d(x,a)<\delta\) . For such \(x\) ,
The first and third terms are controlled at two different points, \(x\) and \(a\) , by the same \(N\) . That is exactly what uniformity provides and what pointwise convergence does not: with pointwise convergence the \(N\) for the point \(x\) would change as \(x\) varies, and no single \(f_N\) could be used.
The theorem is most often used in the contrapositive: since the limit of \(x^n\) on \([0,1]\) is discontinuous, the convergence is not uniform. The converse is false. A sequence of continuous functions can converge non-uniformly to a continuous limit, as the humps \(g_n\) of Example 8.1 and the powers on \([0,1)\) show.
For a compact metric space \(K\) , let \(C(K)\) be the set of continuous real functions on \(K\) . They are bounded, by the Extreme Value Theorem, so \(C(K)\subseteq B(K)\) , and \(C(K)\) is a metric space with the supremum metric. Theorem 8.5 says that \(C(K)\) is a closed subset of \(B(K)\) , and a closed subset of a complete space is complete, since a Cauchy sequence in it converges in the larger space and the limit stays in the subset. So \(C[a,b]\) is a complete metric space. It is the first example of the function spaces studied in Functional Analysis, and such spaces differ from \(\mathbb R^n\) in a way that Example 4.5 has already shown for the space of bounded sequences: their closed bounded sets need not be compact. Exercise 18 shows the same for \(C[0,1]\) itself.
There is one situation in which pointwise convergence to a continuous limit is automatically uniform.
Theorem 8.6 (Dini). Let \(K\) be a compact metric space and let \(f_n:K\to\mathbb R\) be continuous functions with \(f_1(x)\ge f_2(x)\ge\cdots\) for every \(x\) . If \((f_n)\) converges pointwise to a continuous function \(f\) , then the convergence is uniform.
Proof. Let \(g_n=f_n-f\) . Each \(g_n\) is continuous, \(g_n\ge g_{n+1}\ge 0\) , and \(g_n\to 0\) pointwise. Let \(\varepsilon>0\) and put \(U_n=\{x\in K:g_n(x)<\varepsilon\}\) . Each \(U_n\) is open by Theorem 5.4, \(U_n\subseteq U_{n+1}\) because the \(g_n\) decrease, and every \(x\in K\) lies in some \(U_n\) because \(g_n(x)\to 0\) . So the \(U_n\) form an open cover of \(K\) . By compactness finitely many of them cover \(K\) , and since they are nested, \(K=U_N\) for some \(N\) . Then \(0\le g_n(x)\le g_N(x)<\varepsilon\) for all \(n\ge N\) and all \(x\in K\) .
The theorem also holds for increasing sequences, by applying it to \(-f_n\) . Each hypothesis is needed. The powers \(x^n\) on \([0,1]\) are monotone on a compact set, but the limit is not continuous. On \([0,1)\) they are monotone with a continuous limit, but the set is not compact. The humps \(g_n\) have a continuous limit on a compact set but are not monotone in \(n\) .
8.4 Integrals of limits
Theorem 8.7 (uniform convergence and integration). Let \(f_n\in\mathcal R[a,b]\) and suppose \(f_n\to f\) uniformly on \([a,b]\) . Then \(f\in\mathcal R[a,b]\) and
Proof. First, \(f\) is bounded: if \(\lVert f_N-f\rVert_\infty<1\) , then \(\lvert f\rvert\le\lvert f_N\rvert+1\) . Let \(\varepsilon>0\) and put \(\eta=\varepsilon/(3(b-a))\) . Choose \(N\) with \(\lVert f_N-f\rVert_\infty<\eta\) , and by Theorem 7.5 a partition \(P\) with \(U(f_N,P)-L(f_N,P)<\varepsilon/3\) . On each subinterval, \(f\le f_N+\eta\) and \(f\ge f_N-\eta\) , so the supremum of \(f\) is at most that of \(f_N\) plus \(\eta\) and the infimum at least that of \(f_N\) minus \(\eta\) . Multiplying by the lengths and adding,
So \(f\) is integrable. Finally, by Theorem 7.11,
The last line is worth remembering on its own: the integral is a Lipschitz function on \(C[a,b]\) with respect to the supremum metric, with constant \(b-a\) .
Example 8.3: Three sequences and their integrals
Uniform convergence, integrals converge. For \(f_n(x)=x/(1+nx^2)\) on \([0,1]\) , the substitution \(u=1+nx^2\) gives \(\int_0^1f_n=\log(1+n)/(2n)\) , which for \(n=100\) is about \(0.0231\) and tends to \(0\) , the integral of the limit. This is what Theorem 8.7 predicts, since \(\lVert f_n\rVert_\infty=1/(2\sqrt n)\to 0\) ; indeed \(\int_0^1f_n\le 1/(2\sqrt n)\) .
No uniform convergence, integrals converge to the wrong value. For the humps \(g_n(x)=n^2x(1-x)^n\) , the integrals tend to \(1\) and the integral of the limit is \(0\) . By the theorem the convergence cannot be uniform; indeed \(\lVert g_n\rVert_\infty\to\infty\) .
No uniform convergence, integrals converge to the right value anyway. For \(x^n\) on \([0,1]\) , \(\int_0^1x^n\,dx=1/(n+1)\to 0\) , which is the integral of the limit function. The theorem gives a sufficient condition, not a necessary one.
The third case is not an accident. Pointwise convergence together with a single integrable bound for all the \(\lvert f_n\rvert\)
is enough to pass the limit through the integral, provided the integral is Lebesgue’s; that is the Dominated Convergence Theorem of Measure Theory (math.measure-theory.dominated-convergence-theorem). Here \(\lvert x^n\rvert\le 1\)
supplies the bound, while the humps \(g_n\)
admit none. Within Riemann’s theory, uniform convergence is the tool.
8.5 Derivatives of limits
For derivatives uniform convergence is not enough, and the failure is more radical than for integrals.
Example 8.4: Uniform convergence does not control derivatives
The derivatives diverge. Let \(f_n(x)=\sin(nx)/\sqrt n\) on \(\mathbb R\) . Then \(\lVert f_n\rVert_\infty=1/\sqrt n\to 0\) , so \(f_n\to 0\) uniformly. But \(f_n'(x)=\sqrt n\cos(nx)\) , and \(f_n'(0)=\sqrt n\to\infty\) . The limit function has derivative \(0\) everywhere, and the derivatives of the approximants do not converge to it, or to anything.
The limit is not differentiable. Let \(h_n(x)=\sqrt{x^2+1/n}\) on \(\mathbb R\) . Each \(h_n\) is differentiable everywhere. Since
with equality at \(x=0\) , we have \(\lVert h_n-\lvert x\rvert\rVert_\infty=1/\sqrt n\to 0\) . So smooth functions converge uniformly to \(\lvert x\rvert\) , which has a corner. For \(n=100\) the two graphs are nowhere more than \(0.1\) apart.
Small wiggles of small height can have large slope, so closeness of functions says nothing about closeness of derivatives. The right hypothesis puts the uniform convergence on the derivatives.
Theorem 8.8 (uniform convergence and differentiation). Let \(f_n:[a,b]\to\mathbb R\) have continuous derivatives. Suppose that \((f_n(x_0))\) converges for some point \(x_0\in[a,b]\) , and that \(f_n'\to g\) uniformly on \([a,b]\) . Then \((f_n)\) converges uniformly on \([a,b]\) to a function \(f\) that is continuously differentiable, and \(f'=g\) . That is,
Proof. By Theorem 7.15, \(f_n(x)=f_n(x_0)+\int_{x_0}^xf_n'\) for all \(x\in[a,b]\) . Let \(c=\lim f_n(x_0)\) . The function \(g\) is continuous by Theorem 8.5, so we may define
By Theorem 7.14, \(f\) is differentiable with \(f'=g\) , which is continuous. And for every \(x\in[a,b]\) ,
The right side does not depend on \(x\) and tends to \(0\) . So \(f_n\to f\) uniformly.
The proof integrates, uses Theorem 8.7 in effect, and differentiates back; the Fundamental Theorem is what converts a statement about derivatives into one about integrals, where uniform convergence is effective. The theorem remains true if the \(f_n\) are only assumed differentiable, with a longer proof based on the Mean Value Theorem; we shall not need that version.
8.6 Series of functions and power series
A series of functions \(\sum f_n\) converges pointwise, or uniformly, on \(S\) if its sequence of partial sums does. Theorems 8.5, 8.7, and 8.8 then say: a uniformly convergent series of continuous functions has a continuous sum; it may be integrated term by term over \([a,b]\) ; and a series of continuously differentiable functions may be differentiated term by term if the differentiated series converges uniformly and the original series converges at one point. The standard test for uniform convergence of a series is a comparison with a series of numbers.
Theorem 8.9 (Weierstrass M-test). Let \(f_n:S\to\mathbb R\) and suppose there are numbers \(M_n\) with \(\lvert f_n(x)\rvert\le M_n\) for all \(x\in S\) and \(\sum M_n<\infty\) . Then \(\sum f_n\) converges uniformly on \(S\) , and absolutely at each point.
Proof. Let \(\varepsilon>0\) . By the Cauchy criterion for \(\sum M_n\) there is \(N\) with \(M_{n+1}+\cdots+M_m<\varepsilon\) for \(m>n\ge N\) . Then for every \(x\in S\) ,
So the partial sums satisfy the uniform Cauchy criterion of Theorem 8.4. Absolute convergence at each point is the comparison test.
Example 8.5: A continuous function built from infinitely many waves
Let \(W(x)=\sum_{n=0}^\infty\cos(3^nx)/2^n\) . Since \(\lvert\cos(3^nx)/2^n\rvert\le 2^{-n}\) and \(\sum 2^{-n}\) converges, the series converges uniformly on \(\mathbb R\) by the M-test, and \(W\) is continuous by Theorem 8.5. The test also measures the quality of the approximation: the partial sum \(W_N\) through \(n=N\) satisfies
so \(W_{10}\) approximates \(W\) within \(2^{-10}<0.001\) at every point of the line simultaneously.
Term-by-term differentiation, on the other hand, is hopeless: the differentiated series \(-\sum(3/2)^n\sin(3^nx)\) has coefficients that grow without bound, so neither the M-test nor Theorem 8.8 has anything to say about it. In fact \(W\) is differentiable at no point. This is Weierstrass’s example of a continuous nowhere differentiable function; we state the fact without proof, as an indication of how far continuity is from differentiability.
A power series is a series of the form \(\sum_{n=0}^\infty a_nx^n\) . (Series in powers of \(x-c\) reduce to this case by a shift.)
Theorem 8.10 (radius of convergence). Let \(\alpha=\limsup\lvert a_n\rvert^{1/n}\) , and put \(R=1/\alpha\) , with \(R=\infty\) if \(\alpha=0\) and \(R=0\) if \(\alpha=\infty\) . Then \(\sum a_nx^n\) converges absolutely if \(\lvert x\rvert<R\) and diverges if \(\lvert x\rvert>R\) . If \(0<r<R\) , the series converges uniformly on \([-r,r]\) .
Proof. For fixed \(x\) , \(\limsup\lvert a_nx^n\rvert^{1/n}=\lvert x\rvert\alpha\) , and the root test (Theorem 3.13) gives absolute convergence when \(\lvert x\rvert\alpha<1\) and divergence when \(\lvert x\rvert\alpha>1\) . If \(0<r<R\) , then \(\sum\lvert a_n\rvert r^n\) converges, and for \(\lvert x\rvert\le r\) we have \(\lvert a_nx^n\rvert\le\lvert a_n\rvert r^n\) ; apply the M-test with \(M_n=\lvert a_n\rvert r^n\) .
The number \(R\) is the radius of convergence. When \(\lvert a_{n+1}/a_n\rvert\) has a limit, \(R\) is the reciprocal of that limit (Exercise 3.9). At the two points \(x=\pm R\) anything can happen, and the convergence on \((-R,R)\) is in general not uniform; it is uniform on each compact subinterval, and that is enough for everything that follows, because continuity and differentiability are local properties.
Theorem 8.11 (differentiating and integrating power series). Let \(f(x)=\sum_{n=0}^\infty a_nx^n\) have radius of convergence \(R>0\) . Then on \((-R,R)\) the function \(f\) is differentiable, and
both series converging for \(\lvert x\rvert<R\) . Consequently \(f\) has derivatives of all orders on \((-R,R)\) , and \(a_n=f^{(n)}(0)/n!\) .
Proof. Fix \(r\) and \(\rho\) with \(0<r<\rho<R\) . Since \(\sum\lvert a_n\rvert\rho^n\) converges, its terms are bounded: \(\lvert a_n\rvert\rho^n\le C\) for all \(n\) . For \(\lvert x\rvert\le r\) ,
and \(\sum n(r/\rho)^{n-1}\) converges by the ratio test. By the M-test the differentiated series converges uniformly on \([-r,r]\) . The partial sums of \(\sum a_nx^n\) are polynomials, they converge at \(x=0\) , and their derivatives converge uniformly on \([-r,r]\) . Theorem 8.8 gives \(f'(x)=\sum na_nx^{n-1}\) on \([-r,r]\) , and \(r<R\) was arbitrary. For the integral, the partial sums converge uniformly on the interval between \(0\) and \(x\) , so Theorem 8.7 applies. The differentiated series is again a power series converging on \((-R,R)\) , so the argument can be repeated: \(f^{(k)}(x)=\sum_{n\ge k}n(n-1)\cdots(n-k+1)a_nx^{n-k}\) , and setting \(x=0\) gives \(f^{(k)}(0)=k!\,a_k\) .
So inside its interval of convergence a power series behaves like a polynomial of infinite degree. The last statement says that a power series is the Taylor series of its sum, and that two power series with the same sum on an interval about \(0\) have the same coefficients. It does not say that every infinitely differentiable function is the sum of its Taylor series; the function \(e^{-1/x^2}\) of Chapter 6 is not.
Example 8.6: Sums obtained by differentiating the geometric series
For \(\lvert x\rvert<1\) we have \(\sum_{n=0}^\infty x^n=1/(1-x)\) , with \(R=1\) . Differentiating term by term and multiplying by \(x\) :
Differentiating the second identity and multiplying by \(x\) again:
At \(x=\tfrac12\) the right side is \(\tfrac12\cdot\tfrac32\big/\tfrac18=6\) . This is the sum \(\sum n^2/2^n=6\) that Example 3.5 could observe and not explain.
Integrating instead: from \(1/(1+t)=\sum_{n=0}^\infty(-1)^nt^n\) for \(\lvert t\rvert<1\) , Theorem 8.11 and Definition 7.17 give
The theorem says nothing about \(x=1\) , where the series is the alternating harmonic series; that its sum there is \(\log 2\) was proved separately in Example 7.6.
Proposition 8.12 (the exponential series). For every real \(x\) ,
where \(\exp\) is the inverse of the logarithm (Proposition 7.18). In particular \(e=\sum_{n=0}^\infty 1/n!\) .
Proof. The series converges for every \(x\) by the ratio test, so \(R=\infty\) ; call its sum \(E(x)\) . By Theorem 8.11, \(E'(x)=\sum_{n\ge 1}x^{n-1}/(n-1)!=E(x)\) , and \(E(0)=1\) . Since \(\exp>0\) , the quotient \(h=E/\exp\) is differentiable on \(\mathbb R\) , and
By Corollary 6.8(a), \(h\) is constant, equal to \(h(0)=1\) . So \(E=\exp\) .
With this the exponential function, used informally since Chapter 3, has been constructed twice, as the inverse of an integral and as a power series, and the two constructions agree. The sine and cosine can be constructed in the same way from their series (Exercise 16), which completes the list of functions that the book borrowed.
Example 8.7: One radius, three behaviours at the endpoints
The series \(\sum x^n\) , \(\sum x^n/n\) , and \(\sum x^n/n^2\) all have radius of convergence \(1\) , since \(n^{1/n}\to 1\) . At the endpoints they differ. The first diverges at both \(x=1\) and \(x=-1\) , its terms not tending to \(0\) . The second diverges at \(x=1\) , where it is the harmonic series, and converges at \(x=-1\) by the alternating series test. The third converges at both endpoints, and by the M-test with \(M_n=1/n^2\) it converges uniformly on the closed interval \([-1,1]\) , so its sum is continuous there. The radius determines the behaviour strictly inside and strictly outside the interval, and nothing at its ends.
8.7 Approximation by polynomials
Power series approximate only very special functions. Yet every continuous function on a closed bounded interval can be approximated uniformly by polynomials. The polynomials are not Taylor polynomials, which need derivatives, but averages of sampled values.
For a function \(f\) on \([0,1]\) , the Bernstein polynomial of degree \(n\) is
Lemma 8.13 (three sums). For every \(x\) and \(n\) : \(\sum_{k=0}^np_{n,k}(x)=1\) , \(\sum_{k=0}^nk\,p_{n,k}(x)=nx\) , and
Proof. Start from the binomial theorem \(\sum_k\binom nkx^ky^{n-k}=(x+y)^n\) . Differentiate with respect to \(x\) and multiply by \(x\) : \(\sum_kk\binom nkx^ky^{n-k}=nx(x+y)^{n-1}\) . Differentiate twice and multiply by \(x^2\) : \(\sum_kk(k-1)\binom nkx^ky^{n-k}=n(n-1)x^2(x+y)^{n-2}\) . Now put \(y=1-x\) . The three identities read \(\sum p_{n,k}=1\) , \(\sum kp_{n,k}=nx\) , and \(\sum k(k-1)p_{n,k}=n(n-1)x^2\) . Expanding \((k-nx)^2=k(k-1)+k-2nxk+n^2x^2\) and using them,
and \(x(1-x)\le\tfrac14\) .
Theorem 8.14 (Weierstrass approximation theorem). Let \(f\) be continuous on \([a,b]\) . For every \(\varepsilon>0\) there is a polynomial \(p\) with \(\lvert f(x)-p(x)\rvert<\varepsilon\) for all \(x\in[a,b]\) . For \([a,b]=[0,1]\) the Bernstein polynomials \(B_nf\) converge to \(f\) uniformly.
Proof. First let \([a,b]=[0,1]\) . Let \(M=\lVert f\rVert_\infty\) and \(\varepsilon>0\) . By the Heine–Cantor theorem there is \(\delta>0\) with \(\lvert f(s)-f(t)\rvert<\varepsilon/2\) whenever \(\lvert s-t\rvert<\delta\) . Fix \(x\in[0,1]\) . Since \(\sum_kp_{n,k}(x)=1\) and \(p_{n,k}(x)\ge 0\) ,
Split the sum. For the indices with \(\lvert k/n-x\rvert<\delta\) the factor \(\lvert f(k/n)-f(x)\rvert\) is less than \(\varepsilon/2\) , so their total is at most \(\varepsilon/2\) . For the indices with \(\lvert k/n-x\rvert\ge\delta\) we have \((k-nx)^2/(n^2\delta^2)\ge 1\) and \(\lvert f(k/n)-f(x)\rvert\le 2M\) , so by Lemma 8.13 their total is at most
Hence \(\lVert B_nf-f\rVert_\infty\le\varepsilon/2+M/(2n\delta^2)\) , which is less than \(\varepsilon\) once \(n>M/(\varepsilon\delta^2)\) . The bound does not depend on \(x\) .
For a general interval, apply this to \(g(t)=f(a+t(b-a))\) on \([0,1]\) ; if \(q\) is a polynomial within \(\varepsilon\) of \(g\) , then \(p(x)=q((x-a)/(b-a))\) is a polynomial within \(\varepsilon\) of \(f\) .
The proof uses three earlier chapters at once: uniform continuity from compactness, a supremum estimate that is uniform in \(x\) , and the idea, from the proof of Theorem 7.8, of splitting a sum into a part where the function varies little and a part that carries little weight.
Example 8.8: Polynomials approaching a corner
Let \(f(x)=\lvert x-\tfrac12\rvert\) on \([0,1]\) . It is not differentiable at \(\tfrac12\) , so it has no Taylor expansion there. Its Bernstein polynomials converge to it uniformly all the same. The largest error occurs at the corner, where \(f(\tfrac12)=0\) and \(B_nf(\tfrac12)=\sum_k\lvert k/n-\tfrac12\rvert\binom nk2^{-n}\) . Computing, \(\lVert B_nf-f\rVert_\infty\) is about \(0.1230\) for \(n=10\) , \(0.0398\) for \(n=100\) , and \(0.0126\) for \(n=1000\) . The error shrinks roughly like \(1/\sqrt n\) : a hundredfold increase in degree buys one more decimal place. Bernstein polynomials are a proof device and a poor numerical method; efficient polynomial approximation is a subject of Numerical Analysis.
In the language of Chapter 4, Theorem 8.14 says that the polynomials are dense in the metric space \(C[a,b]\) : the closure of the set of polynomials, in the supremum metric, is the whole space. Completeness of the real numbers, with which the book began, has become completeness of a space of functions; density of the rationals has an analogue in the density of the polynomials; and the questions of compactness in such spaces, which Example 4.5 showed to be subtle, are where the next course in analysis begins.
Exercises
-
Find the pointwise limit and decide whether the convergence is uniform: (a) \(f_n(x)=x/n\) on \([0,1]\) and on \(\mathbb R\) ; (b) \(f_n(x)=nx/(1+nx)\) on \([0,1]\) and on \([1,2]\) ; (c) \(f_n(x)=x^n(1-x)\) on \([0,1]\) .
Answer
(a) The limit is \(0\) . On \([0,1]\) , \(\lVert f_n\rVert_\infty=1/n\to 0\) : uniform. On \(\mathbb R\) , \(\lVert f_n\rVert_\infty=\infty\) for every \(n\) : not uniform. (b) The limit is \(0\) at \(x=0\) and \(1\) for \(x>0\) . On \([0,1]\) the limit is discontinuous, so the convergence is not uniform, by Theorem 8.5. On \([1,2]\) , \(\lvert f_n(x)-1\rvert=1/(1+nx)\le 1/(1+n)\) : uniform. (c) The limit is \(0\) . The maximum of \(x^n(1-x)\) is at \(x=n/(n+1)\) and is less than \(1/(n+1)\) : uniform.
-
Prove directly from Definition 8.2 that \(f_n(x)=x+x^2/n\) converges uniformly to \(x\) on \([0,5]\) , and find the smallest \(N\) that works for \(\varepsilon=0.01\) . Show that the convergence is not uniform on \(\mathbb R\) .
Solution
Uniform convergence on \([0,5]\) . For \(x\in[0,5]\) ,
\[ \lvert f_n(x)-x\rvert=\frac{x^2}{n}\le\frac{25}{n}. \]Let \(\varepsilon>0\) and choose \(N\) with \(N>25/\varepsilon\) . For \(n\ge N\) and every \(x\in[0,5]\) we get \(\lvert f_n(x)-x\rvert\le 25/n<\varepsilon\) . The index \(N\) was chosen without reference to \(x\) , so the convergence is uniform.
The smallest \(N\) for \(\varepsilon=0.01\) . The bound \(25/n\) is attained, at \(x=5\) . So the condition “\(\lvert f_n(x)-x\rvert<0.01\) for all \(x\in[0,5]\) ” holds exactly when \(25/n<0.01\) , that is, \(n>2500\) . For \(n=2500\) the error at \(x=5\) equals \(0.01\) , which is not less than \(0.01\) . The smallest \(N\) is \(2501\) .
Not uniform on \(\mathbb R\) . For each \(n\) , \(\sup_{x\in\mathbb R}x^2/n=\infty\) . Concretely, at the moving point \(x_n=n\) the error is \(n^2/n=n\) , which does not tend to \(0\) . By Proposition 8.3 the convergence is not uniform. The pointwise limit is the same on both sets; only the uniformity differs.
-
Let \(f_n(x)=nxe^{-nx}\) on \([0,\infty)\) . Find the pointwise limit, compute \(\lVert f_n\rVert_\infty\) , and show that the convergence is not uniform on \([0,\infty)\) but is uniform on \([a,\infty)\) for every \(a>0\) .
Solution
Pointwise limit. \(f_n(0)=0\) for all \(n\) . For \(x>0\) put \(t=nx\) ; then \(f_n(x)=te^{-t}\) , and since \(e^t\ge t^2/2\) for \(t>0\) we have \(te^{-t}\le 2/t=2/(nx)\to 0\) . So \(f_n\to 0\) pointwise on \([0,\infty)\) .
The supremum. \(f_n'(x)=ne^{-nx}(1-nx)\) , which is positive for \(x<1/n\) and negative for \(x>1/n\) . So \(f_n\) increases on \([0,1/n]\) and decreases on \([1/n,\infty)\) , and
\[ \lVert f_n\rVert_\infty=f_n(1/n)=e^{-1}\approx 0.3679\qquad\text{for every }n . \]This does not tend to \(0\) , so the convergence is not uniform on \([0,\infty)\) . Each \(f_n\) is the same hump \(te^{-t}\) , compressed horizontally by the factor \(n\) ; the hump moves towards \(0\) without getting lower.
On \([a,\infty)\) . Let \(a>0\) . For \(n>1/a\) the point \(1/n\) lies to the left of \(a\) , so \(f_n\) is decreasing on \([a,\infty)\) and its supremum there is \(f_n(a)=nae^{-na}\) , which tends to \(0\) by the first part. Hence the convergence is uniform on \([a,\infty)\) . Removing any neighbourhood of \(0\) removes the place where the hump hides.
-
Prove that if \(f_n\to f\) and \(g_n\to g\) uniformly on \(S\) , then \(f_n+g_n\to f+g\) uniformly. Show that \(f_ng_n\) need not converge uniformly to \(fg\) by taking \(f_n(x)=g_n(x)=x+1/n\) on \(\mathbb R\) , and state a hypothesis under which it does.
Hint
For the sum use \(\lvert(f_n+g_n)-(f+g)\rvert\le\lVert f_n-f\rVert_\infty+\lVert g_n-g\rVert_\infty\) . For the product, \((x+1/n)^2-x^2=2x/n+1/n^2\) is unbounded in \(x\) for each \(n\) . The product converges uniformly if \(f\) and \(g\) are bounded: write \(f_ng_n-fg=f_n(g_n-g)+g(f_n-f)\) and note that \((f_n)\) is then uniformly bounded for large \(n\) .
-
Prove that a uniform limit of bounded functions is bounded. Give an example of a sequence of bounded functions on \((0,1]\) that converges pointwise to an unbounded function.
Solution
The claim. Let \(f_n\to f\) uniformly on \(S\) , each \(f_n\) bounded, say \(\lvert f_n\rvert\le B_n\) . By uniform convergence with \(\varepsilon=1\) there is \(N\) with \(\lvert f_N(x)-f(x)\rvert<1\) for all \(x\in S\) . Then for all \(x\) ,
\[ \lvert f(x)\rvert\le\lvert f(x)-f_N(x)\rvert+\lvert f_N(x)\rvert<1+B_N . \]So \(f\) is bounded. One index \(N\) serves all points, which is where uniformity is used.
The example. On \((0,1]\) let \(f_n(x)=\min\{n,\ 1/x\}\) . Each \(f_n\) is bounded by \(n\) . For fixed \(x\) , as soon as \(n\ge 1/x\) we have \(f_n(x)=1/x\) ; so \(f_n\to f\) pointwise with \(f(x)=1/x\) , which is unbounded on \((0,1]\) . By the first part the convergence cannot be uniform, and indeed \(\lVert f_n-f\rVert_\infty=\sup_{0<x<1/n}(1/x-n)=\infty\) .
Pointwise limits can therefore destroy boundedness; this is one more property, besides continuity and integrals, that needs uniformity.
-
Let \(f_n:X\to\mathbb R\) be uniformly continuous functions on a metric space that converge uniformly to \(f\) . Prove that \(f\) is uniformly continuous.
Solution
Let \(\varepsilon>0\) . By uniform convergence choose \(N\) with \(\lvert f_N(x)-f(x)\rvert<\varepsilon/3\) for all \(x\in X\) . The single function \(f_N\) is uniformly continuous, so there is \(\delta>0\) with \(\lvert f_N(x)-f_N(y)\rvert<\varepsilon/3\) whenever \(d(x,y)<\delta\) . For such \(x,y\) ,
\[ \lvert f(x)-f(y)\rvert\le\lvert f(x)-f_N(x)\rvert+\lvert f_N(x)-f_N(y)\rvert+\lvert f_N(y)-f(y)\rvert<\varepsilon . \]The number \(\delta\) depends only on \(\varepsilon\) (through \(N\) ), not on \(x\) or \(y\) . So \(f\) is uniformly continuous.
This is the proof of Theorem 8.5 with “continuous at \(a\) ” replaced by “uniformly continuous”: the three-term splitting transfers to the limit whatever kind of control the approximant \(f_N\) has, provided the first and third terms are controlled uniformly.
-
Find the flaw: “Let \(0\le x<1\) and \(\varepsilon>0\) . Since \(x^n\to 0\) , choose \(N\) with \(x^N<\varepsilon\) . Then \(x^n<\varepsilon\) for all \(n\ge N\) . Hence \(x^n\to 0\) uniformly on \([0,1)\) .”
Answer
The index \(N\) was chosen after \(x\) was fixed, so it depends on \(x\) ; the argument proves pointwise convergence only. No single \(N\) works for all \(x\in[0,1)\) , because \(\sup_{0\le x<1}x^n=1\) for every \(n\) .
-
It is known that for each \(x\ge 0\) the sequence \((1+x/n)^n\) is increasing in \(n\) and converges to \(e^x\) . Use Dini’s theorem to conclude that the convergence is uniform on \([0,1]\) , checking each hypothesis.
Hint
Check: \([0,1]\) is compact; each \(f_n(x)=(1+x/n)^n\) is a polynomial, hence continuous; for each \(x\) the sequence is increasing in \(n\) (given); the pointwise limit \(e^x\) is continuous. Dini’s theorem in its increasing form (apply Theorem 8.6 to \(-f_n\) ) gives uniform convergence.
-
Let \(f_n(x)=nx(1-x^2)^n\) on \([0,1]\) . Find the pointwise limit, compute \(\int_0^1f_n\) , and deduce without computing a supremum that the convergence is not uniform. Then confirm this by finding \(\lVert f_n\rVert_\infty\) .
Solution
Pointwise limit. \(f_n(0)=0\) and \(f_n(1)=0\) . For \(0<x<1\) , \(f_n(x)=x\cdot nr^n\) with \(r=1-x^2\in(0,1)\) , and \(nr^n\to 0\) because \(\sum nr^n\) converges by the ratio test. So \(f_n\to 0\) pointwise on \([0,1]\) .
Integrals. With the substitution \(u=1-x^2\) , \(du=-2x\,dx\) ,
\[ \int_0^1nx(1-x^2)^n\,dx=\frac n2\int_0^1u^n\,du=\frac{n}{2(n+1)}\longrightarrow\frac12 . \]The integral of the limit function is \(0\) . If the convergence were uniform, Theorem 8.7 would force \(\int_0^1f_n\to 0\) . Since the integrals tend to \(\tfrac12\) , the convergence is not uniform.
The supremum. \(f_n'(x)=n(1-x^2)^{n-1}\bigl(1-(2n+1)x^2\bigr)\) , which vanishes in \((0,1)\) only at \(x=1/\sqrt{2n+1}\) , a maximum. So
\[ \lVert f_n\rVert_\infty=\frac{n}{\sqrt{2n+1}}\Bigl(\frac{2n}{2n+1}\Bigr)^n . \]By Bernoulli’s inequality \((1-\tfrac{1}{2n+1})^n\ge 1-\tfrac{n}{2n+1}\ge\tfrac12\) , so \(\lVert f_n\rVert_\infty\ge n/(2\sqrt{2n+1})\to\infty\) . For \(n=10\) the supremum is about \(1.340\) and for \(n=100\) about \(4.283\) .
-
Evaluate \(\lim_{n\to\infty}\int_0^1\dfrac{nx+1}{n+x}\,dx\) , justifying the interchange of limit and integral.
Solution
Let \(f_n(x)=(nx+1)/(n+x)\) on \([0,1]\) . For \(x\in[0,1]\) ,
\[ f_n(x)-x=\frac{nx+1-nx-x^2}{n+x}=\frac{1-x^2}{n+x},\qquad\text{so}\qquad\lvert f_n(x)-x\rvert\le\frac1n . \]Hence \(\lVert f_n-x\rVert_\infty\le 1/n\to 0\) : the functions \(f_n\) , which are continuous and therefore integrable, converge uniformly on \([0,1]\) to \(f(x)=x\) . By Theorem 8.7,
\[ \lim_{n\to\infty}\int_0^1\frac{nx+1}{n+x}\,dx=\int_0^1x\,dx=\frac12 . \]As a check, the integral can be computed exactly: \(\dfrac{nx+1}{n+x}=n-\dfrac{n^2-1}{n+x}\) , so it equals \(n-(n^2-1)\log\dfrac{n+1}{n}\) , which is about \(0.5643\) for \(n=10\) , \(0.5066\) for \(n=100\) , and \(0.5007\) for \(n=1000\) .
The point of the exercise is the order of the steps. One does not need the exact integral, and for most integrands one could not find it. It is enough to identify the pointwise limit, bound the difference by a quantity free of \(x\) that tends to zero, and quote the theorem; the uniform bound \(1/n\) even gives the rate, since the integrals differ from \(\tfrac12\) by at most \(1/n\) .
-
Let \(f_n(x)=x^n/n\) on \([0,1]\) . Show that \(f_n\to 0\) uniformly, that \(f_n'\) converges pointwise, and that the limit of the derivatives is not the derivative of the limit at \(x=1\) . Which hypothesis of Theorem 8.8 fails?
Answer
\(\lVert f_n\rVert_\infty=1/n\to 0\) , so \(f_n\to 0\) uniformly and the limit has derivative \(0\) everywhere. The derivatives \(f_n'(x)=x^{n-1}\) converge pointwise to \(0\) for \(x<1\) and to \(1\) at \(x=1\) . At \(x=1\) the limit of the derivatives is \(1\) and the derivative of the limit is \(0\) . Theorem 8.8 requires \(f_n'\) to converge uniformly; here the limit of \(f_n'\) is discontinuous, so the convergence is not uniform on \([0,1]\) .
-
Use the M-test to prove that \(\sum_{n=1}^\infty 1/(n^2+x^2)\) converges uniformly on \(\mathbb R\) to a continuous function. Then prove that the geometric series \(\sum x^n\) does not converge uniformly on \((-1,1)\) , although it converges at every point.
Solution
The first series. For every real \(x\) and every \(n\ge 1\) , \(0<1/(n^2+x^2)\le 1/n^2\) , and \(\sum 1/n^2\) converges. By the Weierstrass M-test with \(M_n=1/n^2\) the series converges uniformly on \(\mathbb R\) . Each term is a continuous function of \(x\) , so each partial sum is continuous, and by Theorem 8.5 the sum is continuous on \(\mathbb R\) .
The geometric series. For \(\lvert x\rvert<1\) the partial sums are \(s_N(x)=(1-x^{N+1})/(1-x)\) and the sum is \(s(x)=1/(1-x)\) , so
\[ s(x)-s_N(x)=\frac{x^{N+1}}{1-x}. \]For fixed \(N\) this is unbounded on \((-1,1)\) : as \(x\to 1^-\) the numerator tends to \(1\) and the denominator to \(0\) . So \(\lVert s-s_N\rVert_\infty=\infty\) for every \(N\) , and the convergence is not uniform on \((-1,1)\) . A second argument: each \(s_N\) is bounded on \((-1,1)\) , and a uniform limit of bounded functions is bounded (Exercise 5), but \(s\) is not.
On each smaller interval \([-r,r]\) with \(r<1\) the convergence is uniform, by the M-test with \(M_n=r^n\) ; this is the general pattern for power series.
-
Find the radius of convergence: (a) \(\sum n!\,x^n\) ; (b) \(\sum x^n/n^n\) ; (c) \(\sum 2^nx^n/n\) ; (d) \(\sum\bigl(2+(-1)^n\bigr)^nx^n\) .
Answer
(a) \(R=0\) : the ratio of consecutive terms is \((n+1)\lvert x\rvert\to\infty\) for \(x\ne 0\) . (b) \(R=\infty\) : the \(n\) th root of the \(n\) th term is \(\lvert x\rvert/n\to 0\) . (c) \(R=\tfrac12\) : the \(n\) th root of \(2^n/n\) tends to \(2\) . (d) \(R=\tfrac13\) : \(\lvert a_n\rvert^{1/n}\) is \(3\) for even \(n\) and \(1\) for odd \(n\) , so the limit superior is \(3\) .
-
Use the identities of Example 8.6 to find the sums \(\sum_{n=1}^\infty n/3^n\) and \(\sum_{n=1}^\infty n^2/3^n\) .
Solution
Both identities of Example 8.6 hold for \(\lvert x\rvert<1\) , and \(x=\tfrac13\) is in that range.
First sum. \(\displaystyle\sum_{n=1}^\infty nx^n=\frac{x}{(1-x)^2}\) gives
\[ \sum_{n=1}^\infty\frac{n}{3^n}=\frac{1/3}{(2/3)^2}=\frac13\cdot\frac94=\frac34 . \]Second sum. \(\displaystyle\sum_{n=1}^\infty n^2x^n=\frac{x(1+x)}{(1-x)^3}\) gives
\[ \sum_{n=1}^\infty\frac{n^2}{3^n}=\frac{(1/3)(4/3)}{(2/3)^3}=\frac49\cdot\frac{27}{8}=\frac32 . \]The justification is Theorem 8.11: inside the interval of convergence a power series may be differentiated term by term, so the identities obtained from the geometric series are valid for every \(x\) with \(\lvert x\rvert<1\) , not merely formal. Partial sums confirm the values: through \(n=30\) they are \(0.749999\ldots\) and \(1.499999\ldots\) .
-
Use the series for \(\log(1+x)\) to approximate \(\log(1.1)\) by its first three terms, and bound the error using the alternating series estimate of Theorem 3.15.
Solution
For \(\lvert x\rvert<1\) , \(\log(1+x)=x-\dfrac{x^2}{2}+\dfrac{x^3}{3}-\dfrac{x^4}{4}+\cdots\) . At \(x=0.1\) the first three terms give
\[ 0.1-0.005+0.000333\ldots=0.095333\ldots \]The series at \(x=0.1\) is alternating with terms \(b_n=0.1^n/n\) , which decrease to \(0\) . By Theorem 3.15 the error after three terms is at most the fourth term:
\[ \Bigl\lvert\log(1.1)-0.095333\ldots\Bigr\rvert\le\frac{0.1^4}{4}=0.000025 , \]and the sum lies between the third and fourth partial sums: \(0.095308<\log(1.1)<0.095334\) . The true value is \(0.095310\) to six places.
Compare Example 3.6, where a hundred terms of the same series at \(x=1\) gave two decimal places. At \(x=0.1\) three terms give four. The rate of convergence of a power series depends on how far the point is from the edge of the interval of convergence.
-
Define \(C(x)=\sum_{n=0}^\infty(-1)^nx^{2n}/(2n)!\) and \(S(x)=\sum_{n=0}^\infty(-1)^nx^{2n+1}/(2n+1)!\) . Show that both series have infinite radius of convergence, that \(S'=C\) and \(C'=-S\) , and that \(S(x)^2+C(x)^2=1\) for all \(x\) .
Hint
For fixed \(x\) the ratio of consecutive terms of either series is \(x^2\) divided by a product of two consecutive integers, which tends to \(0\) ; so both converge for all \(x\) . Differentiate term by term using Theorem 8.11. For the last part, \((S^2+C^2)'=2SC-2CS=0\) , so \(S^2+C^2\) is constant, equal to its value \(0+1\) at \(x=0\) .
-
Suppose \(\sum a_nx^n\) and \(\sum b_nx^n\) both converge on \((-r,r)\) , \(r>0\) , and have the same sum there. Prove that \(a_n=b_n\) for all \(n\) .
Hint
By Theorem 8.11 the coefficients are determined by the sum: \(a_n=f^{(n)}(0)/n!=b_n\) , where \(f\) is the common sum on \((-r,r)\) .
-
In the metric space \(C[0,1]\) with the supremum metric, prove that \(\{f:f(0)=0\}\) is a closed set, and that the sequence \(f_n(x)=x^n\) lies in the closed unit ball and has no convergent subsequence. What does this say about that ball?
Solution
The set is closed. Let \(A=\{f\in C[0,1]:f(0)=0\}\) , and let \(f_k\in A\) converge to \(f\) in \(C[0,1]\) , that is, \(\lVert f_k-f\rVert_\infty\to 0\) . Then
\[ \lvert f(0)\rvert=\lvert f(0)-f_k(0)\rvert\le\lVert f-f_k\rVert_\infty\to 0 , \]so \(f(0)=0\) and \(f\in A\) . By Theorem 4.12, \(A\) is closed.
The sequence of powers. \(f_n(x)=x^n\) is continuous with \(\lVert f_n\rVert_\infty=1\) , so it lies in the closed unit ball of \(C[0,1]\) . Suppose a subsequence \(f_{n_k}\) converged in \(C[0,1]\) to some \(g\) . Convergence in the supremum metric is uniform convergence, which implies pointwise convergence; so \(g(x)=\lim x^{n_k}\) , which is \(0\) for \(x<1\) and \(1\) for \(x=1\) . That function is not continuous, contradicting \(g\in C[0,1]\) . Hence no subsequence converges.
Conclusion. The closed unit ball of \(C[0,1]\) is closed and bounded, and by Theorem 4.17 it is not compact. The Heine–Borel theorem is a theorem about \(\mathbb R^n\) and fails in this space of functions, as it did for the space of bounded sequences in Example 4.5.
-
Compute the Bernstein polynomial \(B_nf\) for \(f(x)=x^2\) in closed form, using Lemma 8.13, and find \(\lVert B_nf-f\rVert_\infty\) exactly.
Solution
For \(f(x)=x^2\) , \(f(k/n)=k^2/n^2\) , and \(k^2=k(k-1)+k\) . By the identities in the proof of Lemma 8.13, \(\sum_kk(k-1)p_{n,k}(x)=n(n-1)x^2\) and \(\sum_kkp_{n,k}(x)=nx\) . Therefore
\[ B_nf(x)=\frac{1}{n^2}\bigl(n(n-1)x^2+nx\bigr)=x^2+\frac{x(1-x)}{n}. \]So \(B_nf(x)-f(x)=x(1-x)/n\ge 0\) on \([0,1]\) , largest at \(x=\tfrac12\) , and
\[ \lVert B_nf-f\rVert_\infty=\frac{1}{4n}. \]For example \(\lVert B_{10}f-f\rVert_\infty=0.025\) . Note that \(B_nf\) is a polynomial of degree \(2\) that is not equal to \(x^2\) : the Bernstein polynomial of a polynomial is not the polynomial itself. The convergence is uniform, at the slow rate \(1/n\) , in agreement with Theorem 8.14 and with the remark in Example 8.8 about efficiency.
-
Let \(f\) be continuous on \([0,1]\) with \(\int_0^1f(x)\,x^n\,dx=0\) for every integer \(n\ge 0\) . Prove that \(f\) is identically zero.
Solution
By linearity of the integral, the hypothesis gives \(\int_0^1f(x)p(x)\,dx=0\) for every polynomial \(p\) .
By the Weierstrass approximation theorem there are polynomials \(p_k\) with \(\lVert p_k-f\rVert_\infty\to 0\) . Let \(M=\lVert f\rVert_\infty\) , finite because \(f\) is continuous on a compact interval. Then
\[ \lVert fp_k-f^2\rVert_\infty\le M\,\lVert p_k-f\rVert_\infty\to 0 , \]so \(fp_k\to f^2\) uniformly on \([0,1]\) . By Theorem 8.7,
\[ \int_0^1f^2=\lim_{k\to\infty}\int_0^1fp_k=0 . \]The function \(f^2\) is continuous and nonnegative with integral \(0\) , so \(f^2\) is identically zero by Exercise 7.7. Hence \(f=0\) .
The numbers \(\int_0^1f(x)x^n\,dx\) are called the moments of \(f\) ; the exercise says that a continuous function on \([0,1]\) is determined by its moments.
-
Suppose a sequence of polynomials converges uniformly on all of \(\mathbb R\) to a function \(f\) . Prove that \(f\) is a polynomial. Why does this not contradict Theorem 8.14?
Hint
By the uniform Cauchy criterion there is \(N\) with \(\lVert p_n-p_N\rVert_\infty<1\) on \(\mathbb R\) for \(n\ge N\) . A polynomial that is bounded on \(\mathbb R\) is constant, so \(p_n=p_N+c_n\) with constants \(c_n\) , which converge. Hence \(f=p_N+\lim c_n\) . Theorem 8.14 concerns compact intervals, where polynomials of growing degree stay bounded.
-
Prove that \(f_n\to f\) uniformly on \(S\) if and only if \(f_n(x_n)-f(x_n)\to 0\) for every sequence \((x_n)\) of points of \(S\) .
Hint
If \(f_n\to f\) uniformly, then \(\lvert f_n(x_n)-f(x_n)\rvert\le\lVert f_n-f\rVert_\infty\to 0\) . If the convergence is not uniform, there are \(\varepsilon_0>0\) and infinitely many indices \(n\) with a point \(x_n\) such that \(\lvert f_n(x_n)-f(x_n)\rvert\ge\varepsilon_0\) ; choose \(x_n\) arbitrarily for the other indices.