I have solved the following exercise and I would like to know if I have made any mistakes:
Let $h(x)=\sum_{n=1}^{\infty}\frac{1}{x^2+n^2}$.
(a) Show that $h$ is a continuous function defined on all of $\mathbb{R}$;
(b) Is $h$ differentiable? If so, is the derivative function $h'$ continuous?
My solution:
(a) $|h_n(x)|=\frac{1}{x^2+n^2}\leq\frac{1}{n^2}$ for all $x\in\mathbb{R}$ and $\sum_{n=1}^{\infty}\frac{1}{n^2}<\infty$ so by Weierstrass M-Test $\sum_{n=1}^{\infty}\frac{1}{x^2+n^2}$ converges uniformly on $\mathbb{R}$ and since $h_n(x)$ is continuous for all $n\geq 1$, by Term-by-term Continuity Theorem the limit function $h$ is continuous too.
(b) for $x\in [-M,M]\ (M\in\mathbb{R}^+)$, $|h'_n(x)|=|-\frac{2x}{(x^2+n^2)^2}|=\frac{2}{(x^2+n^2)^2}|x|\leq \frac{2M}{n^4}$ and $\sum_{n=1}^{\infty}\frac{2M}{n^4}<\infty$ so by Weierstrass M-Test $\sum_{n=1}^{\infty}h'_n(x)$ converges uniformly on each interval $[-M,M]$ to a function $h$ and since $0$ belongs to every such interval and $h(0)=\sum_{n=1}^{\infty}\frac{1}{n^2}<\infty$ by Term-by-Term Differentiability Theorem $h$ is differentiable; $h'$ is also continuous by Term-by-Term Continuity Theorem since each $h'_n$ is continuous and the convergence of the series of derivatives is uniform.
Note that we have using the $AM-GM$ inequality
$$\begin{align} \left|\frac{d}{dx}\left(\frac{1}{x^2+n^2}\right)\right|&=\left|\frac{-2x}{(x^2+n^2)^2}\right|\\\\ &=\left|\frac{-2x}{x^2+n^2}\right|\frac1{x^2+n^2}\\\\ &\le \frac1{n^2}\frac{2|x|}{x^2+n^2}\\\\ &\le \frac{1}{n^3} \end{align}$$
Hence, $\sum_{n=1}^\infty \frac{-2x}{(x^2+n^2)^2}$ converges uniformly for all $x$ and we conclude that the series of interest is differentiable for all $x$.