Uniform convergence on every bounded closed intervals implies uniform convergence on $\Bbb R$ When I read my lecture notes, I found that  the outline of the proof for uniform convergence of cosine function$$\cos x =1-\frac{x^2}{2!}+\frac{x^4}{4!}+\cdots$$on $\Bbb R$ is as  the following:

On $[-M,M]\ (M>0)$, the cosine function is uniformly convergent on $[-M,M]$ by M-Test. Since $M$ is arbitrary, it follows that it is uniformly convergent on $\Bbb R$.

But I am doubting that although I can adjust $N$ such that $||f_n-f||\lt ε$ for $n\ge N$ on $[-M,M]$, where $\{f_n\}$ is the sequence of functions and $f_n$ converges uniformly to $f$, I need to choose a bigger $N$ for lager interval, like I get $N$ for $[-M,M]$ and I may need to take $N+1$ or even lager for $[-M-1,M+1]$, so it seems that I cannot find a $N$ such that  $||f_n-f||\lt ε$ for $n\ge N$ on $\Bbb R$.
 A: Uniform convergence on every $[-M,M]$ means
$$
\forall M>0 ~ \forall\varepsilon>0 ~ \exists n_0 ~ \forall n\ge n_0 ~ \forall x\in[-M,M] ~ |f_n(x)-f(x)| < \varepsilon
$$
or equivalently,
$$
\forall\varepsilon>0 ~
\color{red}{\forall M>0 ~ \exists n_0} ~ 
\forall x\in[-M,M] ~ 
\forall n\ge n_0 ~ 
|f_n(x)-f(x)| < \varepsilon.
$$
Uniform convergence on $\mathbb{R}$ means
$$
\forall\varepsilon>0 ~ \exists n_0 ~ \forall n\ge n_0 ~ \forall x\in\mathbb{R} ~ |f_n(x)-f(x)| < \varepsilon
$$
or equivalently,
$$
\forall\varepsilon>0 ~ 
\color{red}{\exists n_0 ~ \forall M>0 ~}
\forall x\in[-M,M] ~ 
\forall n\ge n_0 ~ 
|f_n(x)-f(x)| < \varepsilon.
$$
In the first case, for every $M$ there is a suitable $n_0$; for different values of $M$, different values for $n_0$. In the second case, there is a common $n_0$ which is suitable for all $M$.
Instead of uniform convergence, you may try simpler concepts: for example the function $x\mapsto x$ is bounded on every interval $[-M,M]$, but this does not imply that the function is bounded on the entire real line.
A: In your example, the uniform convergence in $\Bbb R$ is impossible: the $n$-th partial sum is a polynomial (unbounded in $\Bbb R$) while the $\cos$ is bounded: the difference is unbounded in $\Bbb R$.
But is true that the convergence is uniform in any bounded interval. This is enough to prove the continuity of the sum in $\Bbb R$ because the continuity is a local property.
A: As it can be seen from the other answers the cosine series is certainly not uniformly convergent on $\mathbb R.$ However I did not read the lecture notes myself, but as I can see from the question the lecture notes states something wrong. But it might also be the case that the lecture notes is just sloppy or had a typo and actually  wanted to state that the cosine function is continuous on every compact interval as a conclusion instead of concluding uniform convergence.  Because being continuous on every compact interval means continuity on $\mathbb R$, since $\mathbb{R}$ can be partitioned in compact intervals. That makes sense I think. 
That is if it would have a typo. It could be sloppy as well. What I mean with that is one is, most of the cases, interested in uniform convergence to show that the series can be differentiated term by term or integrated term by term for $x\in \mathbb R$. That is true in this case also applicable and indeed one gets the sine series (with some constant in front of course). Maybe that is why it was saying "uniform" convergent on $\mathbb R$, very sloppy, indeed. 
