Hunter Liu's Website

9. Week 8: The Method of Uniform Approximations

≪ 8. Week 7: Metrising the Space of Continuous Functions | Table of Contents | 10. Week 9: On Convolutions and On Derivatives ≫

Last week, we described two examples of dense subsets of \(C([0, 1], \mathbb{R})\): piecewise linear functions and polynomials (the latter implying that smooth functions, differentiable functions, etc. are also dense). Today, we’ll focus on some ways in which we can leverage this structure.

The idea is as follows: you want to prove some statement \(P(f)\) for all continuous functions \(f\). Maybe when \(f\) is “very nice” (e.g. smooth, a polynomial, etc.), \(P(f)\) is easy to prove, or perhaps this is given as an assumption in the problem. Then one performs an approximation argument. Given some nasty continuous function \(f\), approximate it uniformly by a sequence of “easy” functions \(f_n\), then argue somehow that since \(P \left( f_n \right)\) is true for all \(n\), \(P(f)\) must be true too.

For instance,

Problem 1.

Show that for every \(f\in C([0, 2 \pi ], \mathbb{R})\), one has \[\lim _{n\to\infty} \int _{0}^{2\pi} f(x) \sin \left( nx \right)dx = 0.\]

Let’s begin by considering the toy example \(f(x) = x\): how can one prove that \[\lim _{n\to\infty} \int _{0}^{2\pi }x \sin(nx) dx = 0?\] This integral is not terribly difficult to evaluate: just integrate by parts. One gets \[\lim _{n\to\infty}\int _{0}^{2\pi }x \sin(nx) dx = \lim _{n\to\infty} \frac{1}{n} \left( -x\cos(nx)\Big\rvert_{0} ^{2\pi} + \int _{0}^{2\pi}\cos(nx) dx \right).\] The quantity in parentheses is bounded independently of \(n\) in magnitude, hence the limit is \(0\).

Here, integration by parts works because \(f\) is continuously differentiable, and this argument fails when \(f\) is continuous. Hence, the idea is to argue that the conclusion holds for every smooth function first, then use limits to pass to arbitrary continuous functions. We’ll have to be very careful with how these limits interact with each other.

Solution, Part 1: Smooth functions

Suppose first \(f\) is smooth. Then, we have \[\int _{0}^{2\pi }f(x) \sin(nx) dx = \frac{1}{n}\left( -f(x)\cos(nx) \Big \rvert _{0}^{2\pi} + \int _{0}^{2\pi} f’(x) \cos(nx) dx \right). \] Then, by using the triangle inequality, we have \[\left\lvert \int _{0}^{2\pi} f(x) \sin(nx) dx\right\rvert \leq \frac{1}{n} \left( \left\lvert f(2\pi) \right\rvert+ \left\lvert f(0) \right\rvert + \int _{0}^{2\pi} \left\lvert f’(x) \right\rvert dx \right),\] where we’ve used the fact that \(\left\lvert \cos(nx) \right\rvert \leq 1\) for any \(n, x\).

Now the term in parentheses does not depend on \(n\), and taking limits yields \[\lim _{n\to\infty} \left\lvert \int _{0}^{2\pi} f(x) \sin(nx) dx \right\rvert = 0.\] \(\square\)

Solution, Part 2: Continuous functions
Now suppose \(f(x)\) is merely continuous and not smooth. We’ll instead show that for all \(\epsilon > 0\), one has \[\limsup _{n\to\infty} \left\lvert \int _{0}^{2\pi} f(x) \sin(nx) dx \right\rvert \leq \epsilon.\] Since the corresponding \(\liminf _{n\to\infty}\) is nonnegative, this implies that the limit \[\lim _{n\to\infty} \left\lvert \int _{0}^{2\pi} f(x) \sin(nx) dx \right\rvert = 0.\] So, let \(\epsilon > 0\). Then, there exists some \(f_ \epsilon (x)\) a polynomial (in particular, smooth) such that \(\left\lvert f(x) - f _ \epsilon (x) \right\rvert < \frac{\epsilon }{2 \pi } \) for all \(x\). Then, we have \[\begin{align*} \left\lvert \int _{0}^{2\pi }f(x) \sin(nx) dx \right\rvert &\leq \left\lvert \int _{0}^{2\pi} f _ \epsilon (x)\sin(nx) dx \right\rvert + \left\lvert \int _{0}^{2\pi } \left( f(x) - f _ \epsilon (x) \right) \sin(nx) dx \right\rvert \\ & \leq \left\lvert \int _{0}^{2\pi }f_ \epsilon (x) \sin(nx) dx \right\rvert + \int _{0}^{2\pi} \left\lvert f(x) - f_ \epsilon (x) \right\rvert dx \\ & < \left\lvert \int _{0}^{2\pi} f_ \epsilon (x)\sin(nx) dx \right\rvert + \epsilon . \end{align*} \] Thus, taking the \(\limsup\) of both sides yields \[\limsup _{n\to\infty} \left\lvert \int _{0}^{2\pi} f(x) \sin(nx) dx \right\rvert < \limsup _{n\to\infty} \left\lvert \int _{0}^{2\pi} f_ \epsilon (x) \sin(nx) dx \right\rvert + \epsilon = \epsilon,\] where the \(\limsup\) in the middle term is \(0\) by our previous argument. This concludes the proof. \(\square\)

To reiterate, we’ve proven the conclusion for the “nice” class of smooth functions, then extended this to the broader class of continuous functions via uniform approximations.

Remark 2.

The above is a special case of the Riemann-Lebesgue lemma, which states that as long as \(f\) is integrable, not even continuous, then the above statement still holds true. This is really a statement about the Fourier coefficients of a “well-behaved” function.

Problem 3.

Show that for any continuous function \(f\in C([0, 1], \mathbb{R})\), one has \[\lim _{n\to\infty} (n+1)\int _{0}^{1}x^n f(x) dx = f(1).\]

Hint
Try showing this identity when \(f\) is a polynomial.

Sometimes, the path forward may not be so clear, as in the following example:

Problem 4.

If \(f\in C([0, 1], \mathbb{R})\) and \[\int _{0}^{1} f(x) x^n dx = 0\] for every integer \(n \geq 0\), show that \(f(x) = 0\) for all \(x\).

One may possibly attempt the same sort of strategy: approximate \(f\) by a smooth function, show that this smooth function must be zero, and conclude that \(f\) itself is zero. But even when \(f\) is smooth, it’s not particularly obvious why \(f\) should be zero.

Instead, we should juice the \(x^n\).

Solution
By linearity, one has for any polynomial \(p(x)\) that \[\int _{0}^{1}f(x) p(x) dx = 0.\] Now let \(p_n(x)\) be a sequence of polynomials such that \(p_n\to f\) uniformly — this is possible since polynomials are dense in \(C([0, 1], \mathbb{R})\)! Then, one has \[\int _{0}^{1} f(x)^2 dx = \int _{0}^{1} \lim _{n\to\infty} f(x) p_n(x) dx = \lim _{n\to\infty} \int _{0}^{1} f(x) p_n(x) dx = 0.\] We are able to swap the limit with the integral since the convergence is uniform. But since \(\int _{0}^{1}f(x)^2 dx = 0\) and \(f\) is continuous, this implies that \(f(x) = 0\) for all \(x\). \(\square\)

In other problems yet, one has to first use the Stone-Weierstrass theorem to demonstrate the density of a “nice” set of functions before extending an argument to all continuous functions. For instance,

Problem 5.

Let \(f\in C \left( [-1, 1], \mathbb{R} \right)\), and suppose that for every \(n \geq 0\) that \[\int _{-1}^{1} f(x) x ^{2n} dx = 0.\] Show that \(f\) is odd, i.e. that \(f(x) = - f(-x)\) for all \(x\).

I’ll only outline the proof.

  1. Decompose \(f\) into “even” and “odd” parts: let \(f_e(x) = \frac{1}{2} \left( f(x) + f(-x) \right)\) and \(f_o(x) = \frac{1}{2} \left( f(x) - f(-x) \right)\). One can easily verify that \(f_e\) is even and \(f_o\) is odd, and that \(f_e(x) + f_o(x) = f(x)\).
  2. By a standard change-of-variables, one can show that \[\int _{-1}^{1} f_o(x) x ^{2n} dx = 0\] for all \(n \geq 0\). Thus, we know that \[\int _{-1}^{1}f_e(x) x ^{2n}dx = 0\] for all \(n \geq 0\), and it suffices to show that \(f_e(x) = 0\).
  3. By another change of variables, one can show that \[\int _{-1}^{1} f_e(x) x ^{2n} dx = 2 \int _{0}^{1} f_e(x) x ^{2n} dx.\] Hence, we have \[\int _{0}^{1} f_e(x) p(x) dx = 0\] for all even polynomials \(p\).
  4. Applying Stone-Weierstrass, the set of all even polynomials is dense in \(C([0, 1], \mathbb{R})\), hence by an argument similar to the preceeding problem, we have \(f_e(x) = 0\) for all \(x\).

Remark 6.

In these last two problems, there’s some linear algebra hiding in the background. \(\mathcal{P}\), the subspace of \(C([0, 1], \mathbb{R})\) comprised of all polynomials, is dense in both the uniform metric and in the \(L^2\) metric coming from the inner product. The second-to-last problem says that the only thing orthogonal to \(\mathcal{P}\) is \(\left\lbrace 0 \right\rbrace\), and this is essentially saying \[\mathcal{P}^\perp = \overline{\mathcal{P}}^\perp = \left\lbrace 0 \right\rbrace.\] Likewise, the last problem says that the subspaces of even and odd functions are orthogonal to each other in \(L^2\), with even and odd polynomials serving as an intermediary.