uniform convergence of series of functions 
Prove that $f(x)=\displaystyle{\sum_{n=1}^{\infty}} \dfrac{e^x \sin (n^2x)}{n^2}$ is convergent for every $x \in \mathbb{R}$ and that its sum $f(x)$ is a continuous function on $\mathbb{R}$.

This is my tentative to solve the problem:
$f(x)= e^x \sum {\frac{\sin (n^2x)}{n^2}}$. So, to prove that $f(x)$ is convergent, I only need to prove that $\sum {\frac{\sin(n^2x)}{n^2}}$ is convergent. 
since  absolute value of $\frac {\sin (n^2x)}{n^2} \le \frac{1}{n^2}$ because absolute value of $\sin (n^2x)$ is $\le 1$ and the series: $\sum {\frac{1}{n^2}}$ is convergent, then by the $M$-test the series $\sum {\frac{\sin (n^2x)}{n^2}}$ is uniformly convergent and thus $f(x)$ is continuous on $\mathbb{R}$.
Please let me know whether my solution is true? Also, do I have to distinguish the two cases where $x=0$ and $x \ne 0$? Do I have to prove that $f$ is continuous at $x=0$ separately? 
 A: You're very close.  Minor notes:


*

*No, you don't have to consider $x=0$ as a special case, because $|\sin(0)|\leq 1$ is still true.

*$f(x)= e^x  \sum(\sin(n^2x)/n^2)$ is true, but note now that the series is different.  You gave an argument for why the series here converges uniformly, but note that this does not imply that the initial series defining $f(x)$ converges uniformly (and it does not).

*Related to the last point, you technically never addressed why the original series converges for every $x$.  This follows from the absolute convergence test, or from the work you already did and the fact that if $\sum a_n$ converges and $b\in \mathbb R$, then $\sum ba_n$ converges to $b\sum a_n$.  (In other words, you could just make a little more explicit some of the work you already did.  How much detail to include is largely a matter of taste.)

*Other details that may be mentioned to finish this off (perhaps intentionally omitted in your question because they are straightforward): 

*

*For each $n$, $x\mapsto \sin(n^2x)/n^2$ is continuous, which is why you can conclude that the uniformly convergent series $\sum\sin(n^2 x)/n^2$ is continuous.

*$x\mapsto e^x$ is continuous.

*The product of 2 continuous functions is continuous.


