Uniform convergence on compact sets but not on $\mathbb{R}$ My professor provided an example of a triangle looking function that was zero for all points except between $\frac{1}{n}$ and $\frac{1}{n+1}$ where it steadily rose to some value then descended. He claimed that this was uniformly convergent for any compact set, but when this is on $\mathbb{R}$ the sequence has no uniformly convergent subsequence. Can someone help me see why? I don't understand both why this convergence isn't uniform, and why a non-compact set changes anything
 A: For a sequence of functions to uniformly converge, they must converge at each point $x$ in their domain, in such a way that the rate of convergence is independent of $x$.
In $\mathbb{R}$ a compact set is, in particular, closed and bounded.
With the series you gave, compact convergence should imply uniform convergence. Each $f_n$ is zero outside of $[\frac{1}{n}, \frac{1}{n+1}]$, and hence $f_n(x)=0$ for $x\not\in [0,1]$. If $f_n$ converges uniformly on the compact interval $[0,1]$, $f_n$ must then converge uniformly on any set containing $[0,1]$, including $\mathbb{R}$.
(By the sound of it, the series may not have converged even compactly, but only point-wise, since they may have converged to a discontinuous function which is impossible by the uniform limit theorem.)
One can consider other series of functions which are compactly convergent but not uniformly convergent, for instance the classic $f_n(x) = x^n$ on $(0,1)$. On any compact subset, $f_n(x)$ converges uniformly to the zero function, however the rate of convergence goes to 0 as $x$ gets closer to $1$, so $f_n$ cannot converge uniformly on $(0,1)$.
A: Any compact set is bounded, so it has no points in common with $[1/n,1/(n+1)]$ for sufficiently large. This proves that the sequence converges to the zero function uniformly on K. It does not converge uniformly on the whole line because it has a fixed positive value at the mid-point of $[1/n,1/(n+1)]$. Most likely, you teacher took the value at the mid-point of the interval as 1.
