Tricky: Convergence This question is marked as tricky: I have a sequence of continuous functions $(f_n)$ s.t. $f_n$ converges uniformly to the continuous $F$ on $[a,b]$ and a sequence $(x_k)\subset[a,b]$ s.t. $x_k\to x$. I wish to show that $f_k(x_k)\to F(x)$.
My thoughts:
\begin{align*}\lim_{k\to\infty} [f_k(x_k)-F(x_k)] &= \lim_{k\to\infty} f_k(x_k)-\lim_{k\to\infty} F(x_k)&\\
&= F(\lim_{k\to\infty} x_k)-F(x)&\mbox{ by continuity of F}\\
&=F(x)-F(x)=0&\mbox{ by continuity of } F.
\end{align*}
I am sure that there is something worng with my argument since it does not seem 'tricky'. I must have stepped into some trap. Could someone please help me out?
 A: The problem is in the step where you assume
$$\lim_{k\to\infty}f_k(x_k)=F(\lim_{k\to\infty}x_k)\;.$$
You write "by continuity of $F$", but you don't have $F$ on the left-hand side, but $f_k$. Also, you can't simply replace this by an argument "by continuity of $f_k$" because it's a different $f_k$ for every $k$. Both the function and the argument vary with $k$ – which is what makes this slightly "tricky".
[Edit in response to the comment:]
Here's a diagram to visualize what's going on:
$$\begin{matrix}
f_j(x_k)&\rightarrow&f_j(x)\\
\downarrow&\searrow&\downarrow\\
F(x_k)&\rightarrow&F(x)
\end{matrix}
$$
The vertical arrows hold because the $f_j$ converge pointwise to $F$. The horizontal arrows hold by continuity, namely of the $f_j$ for the upper one and of $F$ for the lower one. What you're trying to prove is the diagonal arrow in the middle; that is, you're setting $j=k$, which amounts to taking the diagonal of $f_j(x_k)$, and then letting that common index go to infinity in one go. That's not simply the composition of two of the other arrows; it's a different operation. If this isn't immediately clear, I suggest going through this diagram with the counterexample that Brian gave in mind; then you should be able to see what goes wrong with the diagonal arrow if you don't have uniform convergence.
A: It seems you use the fact that $\displaystyle\lim_{k\to +\infty}f_k(x_k)=F(\lim_{k\to +\infty}x_k)$, but it's precisely what you have to show (and it doesn't clearly appear where you use the uniform convergence). Anyway, you can write \begin{align*}|f_k(x_k)-F(x)|&\leq |f_k(x_k)-F(x_k)|+|F(x_k)-F(x)|\\
&\leq \sup_{x\in\left[a,b\right]}|f_k(x)-F(x)|+|F(x_k)-F(x)|.
\end{align*}
Now, taking $\varepsilon>0$, since $(f_k)$ converges uniformly to $F$ on $\left[a,b\right]$, we can find $K_1$ such that for $k\geq K_1$ we have $\displaystyle\sup_{x\in\left[a,b\right]}|f_k(x)-F(x)|\leq\frac{\varepsilon}2$ and since $F$ is continuous as an uniform limit of such functions, we can find $K_2$ such that for $k\geq K_2$ we have $|F(x_k)-F(x)|\leq\frac{\varepsilon}2$. Finally, for $k\geq K:=\max(K_1,K_2)$ we get $|F_k(x_k)-F(x)|\leq\varepsilon$.
We notice that the result is not true if we don't have the uniform convergence. For example, take $a=0$, $b=1$, $f_k(x)=x^k$ and $x_k=1-\frac uk$ for a real number $u\geq 0$ and $k$ large enough since we need $x_k\leq 1$. We can see that $f_k(x_k)$ converges to $e^{-u}$, and the pointwise limit of $f_k$ is the function $f\colon x\mapsto 0$ for $x<1$ and $f(1)=1$.
A: The problem shows up in your first step: how do you know that $\lim\limits_{k\to\infty}f_k(x_k)$ exists? Your second step is essentially assuming what you want to prove. You know that $\lim\limits_{k\to\infty}f_k(x_n)=F(x_n)$ for each $n$, and you know that $\lim\limits_{k\to\infty}f_n(x_k)=f_n(x)$ for each $n$, but at this point you don’t know anything about $\lim\limits_{k\to\infty}f_k(x_k)$, with both indices changing as you take the limit. That’s what makes it a bit tricky.
Another way to spot that something is wrong is to notice that you’ve not used the uniform convergence of the $f_n$’s to $F$, and the result is false without it. On the interval $[0,2]$ let $f_n$ be the function whose graph is a straight line segment from the origin to $(2^{-n},1)$, another from $(2^{-n},1)$ down to $(2^{-n+1},0)$, and a third from $(2^{-n+1},0)$ to $(2,0)$. These functions converge pointwise to the constant function $F(x)\equiv 0$, and the sequence given by $x_n=2^{-n}$ converges to $0$, but $\lim\limits_{k\to\infty}f_n(x_n) =$  $1 \ne 0 = F(0)$.
