Skip to main content

Section 3.4 \(L^2([a,b])\)

In this section we define an inner product on \(C^0([a,b])\) (and hence a norm and a metric) in terms of integrals.
Unlike in Section 3.1 and Section 3.2, however, the resulting space is not complete!

Proof.

It is enough to find a sequence \(\seq fn\) in \(\big(C^0([a,b]),\scp\blank\blank_{L^2([a,b])}\big)\) which is Cauchy in this space but not convergent.
Suppose for simplicity that \([a,b]=[-1,1]\text{,}\) and consider the functions \(f_n \in C^0([-1,1])\) defined by
\begin{equation*} f_n(t) = \begin{cases} 0 \amp \text{if } {-1} \le t \le 0, \\ nt \amp \text{if } 0 \lt t \le 1/n, \\ 1 \amp \text{if } 1/n \lt t \le 1 \end{cases} \end{equation*}
shown in Figure 3.2 below.
Figure 3.2. The functions \(f_n \in C^0([-1,1])\) in the proof of Lemma 3.11.
For \(m,n \in \N\) with \(n \gt m\text{,}\) Part b of Exercise 3.4.2 gives
\begin{equation*} \n{f_m-f_n}_{L^2([-1,1])} \le \sqrt{\frac 1m}. \end{equation*}
Since the right hand side vanishes as \(m \to \infty\text{,}\) we conclude that \(\seq fn\) is Cauchy in \(\big(C^0([-1,1]),\scp\blank\blank_{L^2([-1,1])}\big)\text{.}\) We claim that it is not convergent in this space.
Suppose for contradiction that there exists a limit \(f \in C^0([-1,1])\) with
\begin{equation} \n{f_n-f}_{L^2([-1,1])} \to 0 \text{ as } n \to \infty \text{.}\tag{3.5} \end{equation}
Looking at the graph of \(f_n\text{,}\) we intuitively would expect \(f\) to be a discontinuous function, which would be a contradiction. The challenge is to use the limited information (3.5) to make this rigorous, and for this we use Lemma 3.9.
Since \(f_n(t)=0\) for all \(t \in [-1,0]\) and all \(n \in \N\text{,}\) we have
\begin{align*} \int_{-1}^0 (f(t))^2 \, dt \amp = \int_{-1}^0 (f(t)-f_n(t))^2 \, dt\\ \amp \le \int_{-1}^1 (f(t)-f_n(t))^2 \, dt\\ \amp = \n{f-f_n}_{L^2([-1,1])}^2\\ \amp \to 0 \end{align*}
as \(n \to \infty\) by (3.5). By Lemma 3.9, we conclude that
\begin{equation} f(t)=0 \text{ for } t \in [-1,0]\text{.}\tag{3.6} \end{equation}
Similarly, for any \(d \in (0,1)\text{,}\) we can fix \(N \in \N\) large enough that \(f_n(t)=1\) for all \(t \in [d,1]\) and \(n \ge N\text{.}\) For \(n \ge N\) we can therefore estimate
\begin{align*} \int_d^1 (f(t)-1)^2 \, dt \amp = \int_d^1 (f(t)-f_n(t))^2 \, dt\\ \amp \le \int_{-1}^1 (f(t)-f_n(t))^2 \, dt\\ \amp = \n{f-f_n}_{L^2([-1,1])}^2\text{.} \end{align*}
Sending \(n \to \infty\) and applying Lemma 3.9, we deduce that \(f(t)=1\) for \(t \in [d,1]\text{.}\) Since \(d \in (0,1)\) was arbitrary, we conclude that \(f(t)=1\) for \(t \in (0,1]\text{.}\) Combining with (3.6), we see that \(f\) is not continuous at \(0\text{,}\) which is a contradiction.
While we have only given an example for special \([a,b]=[-1,1]\text{,}\) the general case follows by a similar argument. Alternatively, one can use the isometry defined in Exercise 3.4.4.
Since \(\big(C^0([a,b]),\scp\blank\blank_{L^2([a,b])}\big)\) is not complete, it makes sense to talk about its completion, which exists thanks to Theorem 2.12.

Definition 3.12.

The space \(L^2([a,b])\) is the completion of the inner product space \(\big(C^0([a,b]),\scp\blank\blank_{L^2([a,b])}\big)\text{.}\) Following common practice, we abuse notation and write \(\scp\blank\blank_{L^2([a,b])}\) for the inner product on this completion.

Convention 3.13.

To avoid the explosion of brackets in definition Definition 3.12, we can instead write “\(L^2([a,b])\) is the completion of \(C^0([a,b])\) with respect to the inner product \(\scp\blank\blank_{L^2([a,b])}\)”.
Recalling how we constructed completions in the proof of Theorem 2.12, we see that elements of \(L^2([a,b])\) can be thought of as equivalence classes of Cauchy sequences in \(\big(C^0([a,b]),\scp\blank\blank_{L^2([a,b])}\big)\text{.}\) In particular, they are not obviously functions in the ordinary sense of the word. At the same time, according to Remark 2.8 we can identify \(C^0([a,b])\) with a proper subset of \(L^2([a,b])\text{.}\) An analogy would be that, while it makes no sense to talk about the ‘denominator in lowest terms’ of a real number, this makes perfect sense for rational numbers, which are of course also real numbers.
Students taking Measure theory & integration will learn that elements of \(L^2([a,b])\) can be viewed as equivalence classes of ‘measurable’ functions.

Exercises Exercises

1. \(L^2\) inner product on \(C^0\).

2. (PS7) Calculating and estimating \(L^2\) norms.

For any \(c \in (0,1]\text{,}\) let \(g_c \in C^0([0,1])\) be the function defined in Exercise 3.3.1,
\begin{equation*} g_c(t) = \begin{cases} 0 \amp \text{if } {-1} \le t \le 0, \\ t/c \amp \text{if } 0 \lt t \le c, \\ 1 \amp \text{if } c \lt t \le 1 \end{cases}\text{.} \end{equation*}
(a)
Calculate the \(L^2\) norm
\begin{equation*} \n{g_c}_{L^2([-1,1])} = \sqrt{\scp{g_c}{g_c}_{L^2([-1,1])}}\text{.} \end{equation*}
Hint.
To avoid having to write too many square roots, it is convenient to first calculate \(\n{g_c}_{L^2([-1,1])}^2\) and then take a square root.
Solution.
We calculate
\begin{align*} \n{g_c}_{L^2([-1,1])}^2 \amp = \int_{-1}^1 (g_c(t))^2\, dt\\ \amp = \int_{-1}^0 0\, dt + \int_0^c \left( \frac tc \right)^2\, dt + \int_c^1 1\, dt\\ \amp = \frac c3 + (1-c)\\ \amp = 1 - \frac {2c}3 \text{,} \end{align*}
so that taking square roots gives
\begin{equation*} \n{g_c}_{L^2([-1,1])} = \sqrt{1-\frac {2c}3}\text{.} \end{equation*}
(b)
For \(c,d \in (0,1]\) with \(c \le d\text{,}\) conclude from Part c of Exercise 3.3.1 that
\begin{equation*} \n{g_c-g_d}_{L^2([-1,1])} \le \sqrt d\text{.} \end{equation*}
Solution.
Let \(f = g_c - g_d\text{.}\) Then by Part c of Exercise 3.3.1 we have
\begin{equation*} \n f_{L^2([-1,1])}^2 = \int_{-1}^1 (f(t))^2\, dt \le d\text{.} \end{equation*}
The desired inequality follows by taking square roots.

3. (PS8) \(L^2\) convergence is not pointwise convergence.

Consider the sequence of functions \(\seq fn\) in \(C^0([0,1]) \subset L^2([0,1])\) defined by \(f_n(t)=t^n\text{.}\)
(a)
Calculate the pointwise limit of \(\seq fn\text{.}\) That is, find a function \(f \maps [0,1] \to \R\) such that, for all \(t \in [0,1]\text{,}\) \(f_n(t) \to f(t)\) as \(n \to \infty\text{.}\)
Solution.
For \(t \in [0,1)\) we have \(t^n \to 0\) as \(n \to \infty\text{,}\) while for \(t=1\) we have \(t^n = 1\) for all \(n\in \N\text{.}\) Thus, for any \(t \in [0,1]\text{,}\) we have
\begin{equation*} f_n(t) \to f(t) = \begin{cases} 0 \amp \text{if } 0 \le t \lt 1 \\ 1 \amp \text{if } t = 1 \end{cases}\text{.} \end{equation*}
Comment.
One or two students wrote something like
\begin{equation*} f = \begin{cases} 0 \amp \text{if } 0 \le t \lt 1 \\ 1 \amp \text{if } t = 1 \end{cases}\text{.} \end{equation*}
If we’re being very picky about notation for functions, this isn’t quite correct. The left hand side is a function, while the right hand side is a formula involving some variable \(t\) which hasn’t been properly introduced. One way to avoid this ambiguity is to use the symbol \(\mapsto\text{,}\) as in
\begin{equation*} f \maps t \mapsto \begin{cases} 0 \amp \text{if } 0 \le t \lt 1 \\ 1 \amp \text{if } t = 1 \end{cases}\text{,} \end{equation*}
or even
\begin{equation*} f = \left( t \mapsto \begin{cases} 0 \amp \text{if } 0 \le t \lt 1 \\ 1 \amp \text{if } t = 1 \end{cases}\right)\text{.} \end{equation*}
Alternatively, we could give up on writing things down in a single line of symbols, and say that \(f \maps [0,1] \to \R\) is the function defined by
\begin{equation*} f(t) = \begin{cases} 0 \amp \text{if } 0 \le t \lt 1 \\ 1 \amp \text{if } t = 1 \end{cases}\text{.} \end{equation*}
As the problem statement here already tells us that we’re looking for a function \(f \maps [0,1] \to \R\text{,}\) the official solutions here skip that part and just give the formula.
(b)
Show that, as a sequence in \(L^2([0,1])\text{,}\) \(f_n \to 0\) as \(n \to \infty\text{.}\)
Solution.
We simply calculate
\begin{align*} \n{f_n-0}_{L^2([0,1])}^2 \amp = \int_0^1 (t^n)^2\, dt\\ \amp = \frac 1{2n+1}\\ \amp \to 0 \end{align*}
as \(n \to \infty\text{.}\)
Comment.
Note that the pointwise convergence \(f_n \to f\) alone is not enough to justify commuting limits and integrals to get
\begin{gather*} \lim_{n\to\infty} \int_0^1 f_n(t)\, dt = \int_0^1 \lim_{n\to\infty} f_n(t)\, dt = \int_0^1 f(t)\, dt = 0\text{.} \end{gather*}
Indeed, it is possible to find an explicit sequences \(\seq gn\) in \(C^0([0,1])\) with \(g_n \to 0\) pointwise but \(\int_0^1 g_n(t)\, dt = 1\) for all \(n \in \N\text{.}\)
From Analysis 1 and 2 you know that uniform convergence is enough to interchange limits and integrals (over bounded intervals).
(c)
How does this not contradict the uniqueness of limits (Theorem 1.34)?
Solution.
Limits are only unique once we have fixed which metric space we are talking about. In Part b, we showed that \(\seq fn\) was convergent in the metric space \(L^2([0,1])\text{.}\) In Part a, on the other hand, we were talking about a very different notion of pointwise convergence.
Comment 1.
An interesting (but non-examinable) fact is that there is no metric \(d\) on the set \(C^0([a,b])\) for which convergence in \(\big(C^0([a,b]),d\big)\) is the same thing as pointwise convergence. In this sense pointwise convergence is really quite different than convergence in the spaces we studied in Chapter 3.
Comment 2.
Note that pointwise convergence is very much not the same thing as convergence in \(C^0([0,1])\text{.}\) Indeed, the latter is the same as uniform convergence, and a substantial portion of Analysis 2A is devoted to the differences between these two concepts.

4. \(L^2\) on different intervals.

Let \(a,b \in \R\) with \(a \lt b\text{,}\) and define a mapping \(\Phi \maps C^0([0,1]) \to C^0([a,b])\) by
\begin{equation*} \Phi(f)(t) = \frac 1{\sqrt{b-a}} f\Big(\frac{t-a}{b-a}\Big)\text{.} \end{equation*}
(a)
Show that, for all \(f \in C^0([0,1])\text{,}\)
\begin{equation*} \n{\Phi(f)}_{L^2([a,b])} = \n{f}_{L^2([0,1])}\text{.} \end{equation*}
(b)
Show that \(\Phi\) is therefore an isometry between \(\big(C^0([0,1]),\scp\blank\blank_{L^2([0,1])}\big)\) and \(\big(C^0([a,b]),\scp\blank\blank_{L^2([a,b])}\big)\text{.}\)
(c)
Conclude that \(\Phi\) has a continuous extension \(\hat \Phi \maps L^2([0,1]) \to L^2([a,b])\text{.}\)