# If $f_n\to f$ pointwise, $f$ is continuous and $f$ is continuous, then $f_n \to f$ uniformly.

Let $$(f_n)$$ a sequence of continuous function on $$[a,b]$$ that converges pointwise to $$f$$. We suppose that $$f$$ is continuous on $$[a,b]$$. Prove that the convergence is uniform.

I'm stuck at some point :

Since $$|f_n(x)-f(x)|$$ is continuous on $$[a,b]$$, for all $$n$$, there is $$x_n\in [a,b]$$ s.t. $$\sup_{[a,b]}|f_n(x)-f(x)|=|f_n(x_n)-f(x_n)|.$$ Since $$(x_n)$$ is bounded, there is a subsequence that convergence (let denote $$x\in [a,b]$$ the limit, and still denote the subsequence $$(x_n)$$). Now $$|f_n(x_n)-f(x_n)|\leq |f_n(x_n)-f_n(x)|+|f_n(x)-f(x_n)|+|f(x_n)-f(x)|.$$ The fact that $$|f_n(x)-f(x_n)|\to 0$$ and $$|f(x_n)-f(x)|\to 0$$ is clear. But I can't manage to prove that $$|f_n(x_n)-f_n(x)|\to 0$$. Any idea ?

• How is the $x$ you use on the triangle inequality defined? You seem to assume $x_n \to x$ but a priori there is no need for $\{x_n\}_n$ to converge. – Guido A. Mar 30 at 16:00
• @GuidoA.: I updated. – user657324 Mar 30 at 16:01
• Okay, that's fair enough, but careful when reindexing: now if we can prove your statement, it will be for a subsequence of $(f_n)_n$. We should still say something for it to hold in the general case. – Guido A. Mar 30 at 16:02

## 2 Answers

The statement cannot be proved, since it is false. Suppose, for instance, that you define, for each $$n\in\mathbb N$$,$$\begin{array}{rccc}f_n\colon&[0,1]&\longrightarrow&\mathbb R\\&x&\mapsto&x^n-x^{2n}.\end{array}$$Then each $$f_n$$ is continuous and $$(f_n)_{n\in\mathbb N}$$ converges pointwise to the null function (which is continuous too), but the convergence is not uniform:$$(\forall n\in\mathbb N):f_n\left(\sqrt[n]{\dfrac12}\right)=\frac14.$$

• So the 1st Dini theorem in wikipedia is wrong ? (it's in the french wiki only, I hope you can read it) – user657324 Mar 30 at 16:06
• @user657324: You need some form of monotonicity to use Dini's theorem. The chances of a straightforward theorem like this being incorrect are pretty small :-). – copper.hat Mar 30 at 16:07
• Sorry, indeed, I didn't see this detail. Thank you. – user657324 Mar 30 at 16:08
• Yes, I can read it. I wrote my PhD dissertation in French. And you missed the hypothesis that the sequence $(f_n(x))_{n\in\mathbb N}$ is monotonic. – José Carlos Santos Mar 30 at 16:09
• If you define $f(x)$ as $\lim_{n\to\infty}f_n(x)$, then that's trivial (even without assuming that $(f_n(x))_{n\in\mathbb N}$ increases). The problem lies in proving that the convergence is uniform. – José Carlos Santos Mar 30 at 16:28

Let $$f=0$$ and $$f_n$$ be the function whose graph is given by the line joining the points $$(0,0),({1 \over 2n}, 0)$$, $$({1 \over n}, 1), ({3 \over 2n}, 0), (1,0)$$. The $$f,f_n$$ are continuous, and $$f_n(x) \to f(x)$$ everywhere, but the convergence is not uniform since $$f_n({1 \over n})-f({1 \over n}) = 1$$ for all $$n$$.