Continous series on $\mathbb{R}$ vs uniform convergent series I have some trouble showing that some series are continuous on all of $\mathbb{R}$, unless I use a "method" that my instructor told me, that seems to be contradicting in other cases.
I think it's easiest to explain what I mean by examples. First the relevant theorems:
Definition 1:
Let $\sum_{n=1}^{\infty} f_{n}$ be a series of functions on the set $X$. An infinite series $\sum_{n=1}^{\infty} M_{n}$, where $M_n \in [0,\infty[$, is an majorant series for $\sum_{n=1}^{\infty} f_{n}$, if the following is true for every $n\in \mathbb{N}$:
$|f_n(x)|\leq M_n$ for all $x \in X$
Theorem 1 - Weirerstrass' M-test:
Let $ \{ f_n \}$ be a sequence of functions on the set $X$. If $\sum_{n=1}^{\infty} f_{n}$ has an convergent majorant series, then:
T

*

*The series $\sum_{n=1}^{\infty} f_{n}$ is uniformly convergent on the set $X$

*The series $\sum_{n=1}^{\infty} f_{n}$ is absolute convergent $\forall x\in X$
Corollary 1:
Let $ \{ f_n \}$ be a sequence of continuous functions on the metric space $X$. If $\sum_{n=1}^{\infty} f_{n}$ has an convergent majorant series, then the series is uniformly convergent on X

*

*and the series
$s(x):=\sum_{n=1}^{\infty} f_{n}$, $x\in X$ - is also continous


Here are two problems and my approach:
Problem 1.
Show that the series $f(x)=\sum_{n=1}^{\infty} \frac{1}{\sqrt{n}}\left(\exp \left(-x^{2} / n\right)-1\right)$ is continuous on $\mathbb{R}$
I showed in a previous exercise that the following statement is true $|f_n(x)|=\left|\frac{1}{\sqrt{n}}\left(e^{\left(-\frac{x^{2}}{n}\right)}-1\right)\right| \leq \frac{x^{2}}{n^{3 / 2}}$.
So I could choose a $k<\infty$ s.t. if $|x|\leq k$ then:
$|f_n(x)|=\left|\frac{1}{\sqrt{n}}\left(e^{\left(-\frac{x^{2}}{n}\right)}-1\right)\right| \leq \frac{x^{2}}{n^{3 / 2}} \leq \frac{k^{2}}{n^{3 / 2}}=M_{n}$,  $\forall x \in[-k, k]=U$.
Since we can choose $k$ to be any real number, we could choose $k$ s.t. $U=\mathbb{R}$. This is what I'm not sure if is true)
Now the majorant series is convergent: $\sum_{n=1}^{\infty} M_{n}=\sum_{n=1}^{\infty} \frac{k^{2}}{n^{3 / 2}}<\infty$. And $ \{ f_n \}$ is a sequence of continuous functions.
So it follows from Corollary 1, that the series f(x) is continuous on the set $U$ which we chose to be $U=\mathbb{R}$.
This was my instructor's/TA approach to show continuity on $\mathbb{R}$. But is this correct? Or how would you do it?

However, the above method seems to be contradicting in the following problem:
Problem 2 - Show that the series $\sum_{n=1}^{\infty} \sin \left(\frac{x}{n^{2}}\right)$ does not converge uniformly on $\mathbb{R}$
I will not show that. However, if the arguments in the problem above are true. I would argue that this series is uniformly convergent, by using the same arguments.
It is shown in another exercise that $\left|\sin \left(\frac{x}{n^{2}}\right)\right| \leq \frac{|x|}{n^{2}}$. So again I could choose a $k<\infty$ s.t. when $|x|\leq k$:
$\left|\sin \left(\frac{x}{n^{2}}\right)\right| \leq \frac{|x|}{n^{2}} \leq \frac{k}{n^{2}}, \quad \forall x \in[-k, k]=U$.
Since the series $\sum_{n=1}^{\infty} \frac{k}{n^{2}}<\infty$ is convergent. The series  $\sum_{n=1}^{\infty} \sin \left(\frac{x}{n^{2}}\right)$ has an convergent majorant series on the set $U$.
So by Theorem 1, the series should be uniformly convergent on the set $U$. Again since k could be any real number, we could choose $k$ s.t. $U=\mathbb{R}$. Which is contradicting what I needed to show in the problem. The series shouldn't be uniformly convergent.
What is it I don't understand here?
 A: As said in the comments by Daniel Fischer you cannot choose $k$ such that $$ \mathbb R = [-k,k]$$
because then we would have $ k + 1 \not \in [-k,k] = \mathbb R$ so $k +1  \not \in \mathbb R.$
For the first problem:
Let $x \in \mathbb R.$ We will show that $f$ is continuous at $x$.
We can choose $k \in \mathbb R$ large enough such that $x \in [-k,k] = U.$ You showed that the series $\sum_n f_n$ has a convergent majorant series on $X = U$.
Since each function $f_n$ is continuous on the set $X = U$ we can use the first corollary to conclude that $f$ is continuous on $X = U.$ Since $x \in U$ it follows that $f$ is continuous at $x.$
Therefore $f$ is continuous at every point $x \in \mathbb R$ and we have that $f$ is continuous on $\mathbb R$.
For the second problem:
Yet again you cannot take $U = \mathbb R.$ Everything else you have done is correct. Therefore you've actually shown that the series is uniformly convergent on each subset $[-k,k] \neq \mathbb R$ of  $\mathbb R$.
A: Note that the goal of each problem is different. In Problem 1, you need to show that the series is a continuous function on the whole $\mathbb R$, while in Problem 2 that the convergence process itself is uniform on the whole $\mathbb R$.
If you exchange the goal in problem 1 with the goal in problem 2 (uniform convergences of the series), the argument becomes just as invalid as in problem 2 (and the result is equally incorrect).
Continuity of the sum function $f$ (the goal of Problem 1) even for each $x \in \mathbb R$ is a local problem. If it is continuous at $x=15$ has nothing to do with the value of $f$ at $x=16$ or any higher arguments. That's why you can prove that $f$ is continuous at a given argument $x_0$ by the technique demonstrated by Digitallis, using that the series converges uniformly on a possibly large but still finite interval.
Basically you prove continuity not all at once, you prove it extra (but using the same form of proof) for each different argument $x \in \mathbb R$.
In contrast, the concept of uniform convergence (the goal of Problem 2) is something that only makes sense if you consider all arguments at the same time. That's what the "uniformness" is about, that the process of covergence (the error) is roughly the same ("uniform") for all arguments. So proving uniform convergence for any finite interval (as you can do with the Weierstrass M-test in both of your problems) is just that, uniform convergence on a finite interval.
It usually doesn't follow that the convergence is uniform on the whole $\mathbb R$. For that you usually need to find an $M_n$ that's independent of $x$ und is a converging majorant (In problem 1, $M_n=\frac1{\sqrt{n}}$ fullfills the former condition but not the latter).
