# Understanding pointwise convergence vs. uniform convergence example

I'm trying to understand the difference between pointwise convergence and uniform convergence. I read this post and the last answer on it is the following:

$f_n\to f$ pointwise on $(a,b)$ if for each fixed $x\in(a,b)$, $|f_n(x)-f(x)|\to 0$ as $n\to\infty$. Notice this is a pointwise (local) criterion.

On the other hand, $f_n\to f$ uniformly on $(a,b)$ if $\sup_{a< > x<b}|f_n(x)-f(x)|\to 0$ as $n\to\infty$. This is a "global" criterion in that is requires the maximum of all the pointwise errors on $[a,b]$ to tend to zero.

As an example, $f_n(x)=x^n$, $0\le x\le 1$ converges pointwise to $f(x)=\begin{cases} 0, &0\le x<1,\\ 1, &x=1.\end{cases}$, because the first condition above holds, but the convergence is not uniform since the second condition does not hold.

I don't fully understand why the example isn't uniformly convergent, but here is my attempt:

$x^n\rightarrow 0$ when $x\in[0,1)$, $n\rightarrow\infty$

$x^n\rightarrow 1$ when $x=1$, $n\rightarrow\infty$,

so $x^n\rightarrow f(x)$ pointwise. This is pretty clear for me, but uniform convergence is a bit more troubling. Why doesn't uniform convergence hold in this example? Is it because we can never select such an $N$ that $|x^N-f(x)|<\epsilon$, for all $x\in[0,1]$? That is there is no upper bound for N, so that the condition holds for all $x\in[0,1]$?

Thank you for any help =)

The supremum $$\sup_{0\le x\le1}|x^n-f(x)|=1$$ for each $n\ge1$ since $$\sup_{0\le x<1}|x^n-f(x)|=\sup_{0\le x<1}|x^n|=1$$ for each $n\ge1$. Hence, $$\sup_{0\le x\le1}|x^n-f(x)|\not\to0\quad\text{as}\quad n\to\infty$$ and the sequence $x^n$ isn't uniformly convergent. Actually, $$\sup_{0\le x\le1}|x^n-f(x)|\to1\quad\text{as}\quad n\to\infty.$$
We can select $N$ for each $x\in[0,1]$ such that $$|x^n-f(x)|<\varepsilon$$ for $n>N$. But we cannot select $N$ such that $$\sup_{0\le x\le1}|x^n-f(x)|<\varepsilon$$ for $n>N$.
• By the way @V.C. , silly question, but could you quickly clarify why $\sup_{0\le x\le1}|x^n-f(x)|=1$? I'm bit confused with supremum x) Because to me it seems you chose different value of $x$ for $f_n(x) (= x^n)$ and $f(x)$. I mean doesn't $\sup_{0\le x\le1}|a^n-f(b)|=1$ only if $a<1, b=1$ or when $a=1, b <0$? Confused x) Commented Apr 3, 2014 at 6:35
• @jjepsuomi You choose the same value of $x$ for $f_n(x)$ and $f(x)$. That's why it is denoted by the same letter $x$. Think about it as $\sup_{0\le x\le1}|g(x)|$, where $g(x)=x^n-f(x)$. When $0\le x<1$, $g(x)=x^n$. When $x$ is close to $1$, then $x^n$ is close to $1$ for any value of $n\ge1$. You take supremum over $x$, not over $n$. So $\sup_{0\le x\le1}|a^n-f(b)|=|a^n-f(b)|$. Commented Apr 3, 2014 at 6:45