Problem concerning pointwise and uniform continuity I have this problem I'm working on:
Suppose $(f_n)_n$ is a sequence of functions $f_n: \mathbb{R} \rightarrow \mathbb{R}$ that converges pointwise to a function $f: \mathbb{R} \rightarrow \mathbb{R}$. We don't know if the convergence is uniform on all of $\mathbb{R}$, but it is given that the convergence is uniform on every interval of the form $[-M, M]$ with $M \in \mathbb{R}^+$.
a) Now suppose that $f_n$ is continuous in an $a \in \mathbb{R}$ for all $n$. Is it then true or false that $f$ is continuous in $a$?
b) Suppose that $f_n$ is uniformly continuous on $\mathbb{R}$ for all $n$. Is then true or false that $f$ is uniformly continuous on $\mathbb{R}$? 
Attempt: a) We know that if the $f_n$ were uniformly continuous on all of $\mathbb{R}$, then this would certainly be true. Now I was trying to prove the statement as it stands. If $a \in [-M, M]$, then $f$ is indeed continuous in $a$. If $a \notin [-M, M]$ then either $a \in (M, \infty)$ or $a \in (- \infty, -M)$. Suppose the first is the case. Since $f_n$ is continuous in $a$ for every $n$, it holds that $$ \forall \epsilon > 0, \exists \delta > 0, \forall x \in \mathbb{R}: | x- a | < \delta \Rightarrow |f_n(x) - f_n(a) | < \epsilon. $$ To prove $f$ is continuous in $a$, we need to get $| f(x) - f(a) | $ small. Now I was thinking of using the triangle inequality to write $$ |f(x) - f(a) | \leq | f(x) - f_n(x) | + | f_n(x) - f_n(a) | + | f_n(a) - f(a) | . $$ Since $(f_n)_n$ converges pointwise to $f$, I can get the last term smaller than $\epsilon/3$. Since every $f_n$ is continuous in $a$, I can also get the middle term smaller than $\epsilon/3$. But I'm not sure what to do with the first term? 
Help would be appreciated!
 A: b) is not necessarily true. Consider $f:\mathbb{R}\to\mathbb{R}$ given by $f(x)=x^2$ and the sequence $f_n:\mathbb{R}\to\mathbb{R}$ given by 
$$
f_n(x)=
\begin{cases}
x^2 & x\in [-n,n]\\
n^2 & \vert x\vert >n
\end{cases}
$$
Then:


*

*$f_n$ is uniformly continuous for any $n$. This is because, since it is continuous on the closed interval (compact set) $[-n,n]$, then it is uniformly continuous there, and outside this interval the function $f_n$ is constant.

*Let $M>0$. For $n>M$, $f_n\equiv f$ on $[-M,M]$, so $f_n$ converges uniformly to $f$ on $[-M,M]$ (for any such $M$). 


Yet $f$ is not uniformly continuous. 
A: Here is a sketch.
If $f_n$ converges uniformly to $f$ then $|f_n(x) - f(x)| < \epsilon^*$ for all x.
And if all $f_n$ is continuous are at $a$ then $|x-a|<\delta\implies |f_n(x) - f_n(a)|<\epsilon^*$.
$|f(x) - f(a)| \leq |f(x)-f_n(x)| + |f_n(x) - f_n(a)| + |f_n(a) - f(a)|$ by the triangle in equality.
$|f(x) - f(a)| \leq 3\epsilon^*$
Let $\epsilon^* < \epsilon$/3
$\forall \epsilon>0, \exists \delta>0$ such that $|x-a|<\delta \implies |f(x) - f(a)|<\epsilon$.
