Is there a sequence of functions on $\mathbb {R} $ which is uniformly convergent only on compact subsets of $\mathbb {R} $?

144 Views Asked by At

Actually am new to this concept of uniform convergence. I have learned a result (Dini's Theorem) which states that if a sequence of continuous real-valued functions $\{\,f_n\}_{n=1}^\infty$ converges pointwise and monotonously $\left(\text{ie} \,f_j(x) \leq f_{j+1}(x) \right)$ to a continuous function $f$ on a compact metric space $(K,d)$, then the convergence is uniform. Now my doubt is, is there a sequence of functions which is uniformly convergent on every compact subsets while non-uniformly convergent on $\mathbb {R} $ itself? Whichever function I try out doesn't fit into my requirement. Can someone help me please? Thanks in advance.