For the past few days I've been studying Analysis and more specifcally the topic of continuïty. I was making some exercices on this topic and got stuck with a problem which goes as follows. Let $(f_n)_n$ be a sequence of function $f_n : \mathbb{R} \rightarrow \mathbb{R}$ which converges pointwise to a function $f : \mathbb{R} \rightarrow \mathbb{R}$. We don't know if the converges in uniformly on the whole of $\mathbb{R}$, but we do know the convergence is uniform on any interval of the form $[-M,M]$ where $M \in \mathbb{R}^+$. The question then is: if $f_n$ is continuous in a point $a \in \mathbb{R}$ for every $n$, can we then conclude that $f$ is continuous in $a$? A follow up question is the same question but with $f_n$ uniformly continuous for every n instead of continuous and the question if f is then uniformly continuous or not.
Now, the first thing I tried was to find a upperbound for $|f(x) - f(a)|$ and I found the following $$|f(x) - f(a)| = |f(x) - f_n(x)| + |f_n(x) - f_n(a)| + |f_n(a) - f(a)|$$ But I could not find a way to make both the first and third term on the right side to be less then $\epsilon /3$, because it seemed like I needed the sequence $(f_n)_n$ to converge uniformly to $f$ on the whole of $\mathbb{R}$. Does anyone have tips in order to solve this problem? Any help would be greatly appreciated :)).
For the first and third terms you don't need uniform convergence on all of $\mathbb R$. You only need uniform convergence on some interval that contains $a$.
Properly, fix $\def\e{\varepsilon}\e>0$. Since the sequence converges uniformly on $[a-1,a+1]$, there exists $n$ such that $|f(z)-f_n(z)|<\e/3$ for all $z\in[a-1,a+1]$. Since $f_n$ is continuous at $a$, there exists $\delta>0$ such that $|f_n(z)-f_n(a)|<\e/3$ if $z\in(a-\delta,a+\delta)$. By shrinking $\delta$ if needed so that it is less than $1$, now the condition $|x-y|<\delta$ guarantees that all three terms are less than $\e/3$.