# Given $\{f_n\}\rightarrow f$ uniformly on the compact $I$ and each $f_n$ is continuous, prove $\lim_{n\rightarrow\infty}\int_I|f_n - f|^2 = 0$

Given $\{f_n\}\rightarrow f$ uniformly on the compact $I$ and each $f_n$ is continuous, prove $\lim_{n\rightarrow\infty}\int_I|f_n - f|^2 = 0$

My proof attempt

By hypothesis given $\sqrt{\epsilon} > 0$ there exists $N(\epsilon) \in \mathbb{N}$ s.t. for all $n > N(\epsilon)$ we have for all $x\in I$:

$|f_n - f| < \sqrt{\epsilon}$

$|f_n - f|^2 < \epsilon$

At this point I don't know how to arrive to the integral equation

• You have $\int_I \lvert f_n(t) - f(t)\rvert^2\,dt < \int_I \epsilon\,dt$ for $n \geqslant N(\epsilon)$. Can you evaluate the upper bound? Nov 12 '16 at 20:12
• Could I finish the prove in this way? Say $I = [a,b]$ then$\int_{I} |f_n-f|^2 dx < \epsilon \int_{I}dx = \epsilon(b-a)$, for $n \geq N(\epsilon)$ and this prove that $\lim_{n \rightarrow \infty} \int_{I} |f_n-f|^2 dx = 0$ Nov 12 '16 at 21:45

From $f_n \rightarrow f$ uniformly we have $\sup{|f_n-f|}\rightarrow 0,$ in $\mathbb{R}^n$ compact set $I$ is bounded, so $\int_I|f_n-f|^2\le\sup{|f_n-f|}^2|I|$ where $|I|$ is the Lebesgue measure and $|I|<\infty$
• Uniform convergence ensures $\int_I f_n-f \rightarrow 0$ (from Rudin's book, Principles of Mathematical analysis), maybe you can break down $\int_I(f_n-f)^2 = \int_I(f_n-f)f_n+\int_I(f-f_n)f$ so you can move $sup|f_n-f|$ out: $\int_I(f_n-f)^2 \le sup(f_n-f)\int_I(f_n-f), is that OK? Nov 12 '16 at 20:39 • last equation :$\int_I(f_n-f)^2 \le sup(f_n-f)\int_I(f_n-f)$$Nov 12 '16 at 20:40 Since I is a compact interval, it has finite measure \lambda(I). Then, for each \epsilon>0 there exists some N such that n>N implies$$\|f_n - f\| < \sqrt{\frac{\epsilon}{\lambda(I)}} \Rightarrow \\ \|f_n - f\|^2 < \frac{\epsilon}{\lambda(I)} \Rightarrow \\ |f_n(x) - f(x)|^2 < \frac{\epsilon}{\lambda(I)} \forall x \in I\Rightarrow \\ \int_I |f_n(x) - f(x)|^2 dx < \int_I \frac{\epsilon}{\lambda(I)} dx =\epsilon