$f(x)=\sum_{n=0}^{\infty} \frac{e^{-nx}}{1+n^2}$ is differentiable at $~(0, \infty)$ Let us consider a real valued function $~~f:[0 , \infty) \to \mathbb R~~$ defined by
$$f(x)=\sum_{n=0}^{\infty} \frac{e^{-nx}}{1+n^2},~~x \in [0,\infty).$$
Show that $f$ is differentiable at $~(0, \infty)~~$ but $~~\displaystyle \lim_{x \to 0+} f'(x)~$ does not exists.
My attempt: By using $~M-$test I have proved that the series of functions $~~\displaystyle \sum_{n=0}^{\infty} f_n(x)~~$ uniformly convergent to $~~f(x)~~$ as given, where
$$f_n(x)=\frac{e^{-nx}}{1+n^2},~~x \in [0,\infty).$$
Then we have $$|f_n(x)| =\left|\frac{e^{-nx}}{1+n^2}\right| \leq \frac{1}{1+n^2}.$$
So uniformly convergent. Hence $~~f'(x)=\displaystyle \sum_{n=0}^{\infty} f'_n(x)=\displaystyle \sum_{n=0}^{\infty} \frac{-ne^{-nx}}{1+n^2}.$
This follows that $~~f(x)~~$ is differentiable on $~(0,\infty).$
Now notice that
$$\lim_{x \to 0+}f'(x)=\lim_{x \to 0+} \sum \frac{-ne^{-nx}}{1+n^2} = \sum \left(\lim_{x \to 0+} \frac{-ne^{-nx}}{1+n^2}\right)=-\sum \frac{n}{1+n^2}.$$
Since the above series is not convergent, it yields that the limit does not exists.
Is my solution is all okay? Is anything I did wrong or can be solve in much simpler way please suggest me?
Thanks for your time to look in my solution.
 A: We have
$$ \frac{1}{1+n^2}=\int_{0}^{+\infty}\cos(nt)e^{-t}\,dt \tag{1}$$
so $f(x)$ can be represented in the following way:
$$ f(x)=\sum_{n\geq 0}\int_{0}^{+\infty} \cos(nt) e^{-t} e^{-nx}\,dt =\text{Re}\sum_{n\geq 0}\int_{0}^{+\infty}e^{nit} e^{-t} e^{-nx}\,dt.\tag{2}$$
We are allowed to exchange the series and the integral due to dominated convergence, so
$$ f(x)=\text{Re}\int_{0}^{+\infty}\frac{e^x}{e^x-e^{it}}\,e^{-t}\,dt =\frac{1}{2}\int_{0}^{+\infty}\frac{e^x-\cos t}{\cosh x-\cos t}\,e^{-t}\,dt.\tag{3}$$
For any $x>0$ we have $e^x > 1\geq \cos t$ and $\cosh x > 1\geq \cos t$, so the integral representation ensures the differentiability of $f(x)$ and also gives an integral representation for $f'(x)$:
$$ f'(x) = \frac{1}{2}\int_{0}^{+\infty}\frac{1-\cos(t)\cosh(x)}{(\cosh(x)-\cos(t))^2}\,e^{-t}\,dt.\tag{4} $$
On the other hand, if we consider the limit as $x\to 0^+$ of the RHS we end up with
$$ \frac{1}{2}\int_{0}^{+\infty}\frac{1}{1-\cos t}e^{-t}\,dt = \frac{1}{4}\int_{0}^{+\infty}\frac{e^{-t}}{\sin^2\left(\frac{t}{2}\right)}\,dt\tag{5} $$
which is blatantly divergent.
A: Just check that $\sum_{n\ge 0} f_n'(x)$ is normally ( so uniformly) convergent on subsets $[a, \infty)$, for any $a>0$. That, together with the normal convergence of $\sum_{n\ge 0} f_n(x)$ on $[0, \infty)$, shows that the sum $f = \sum_{n\ge 0} f_n$ has derivative $\sum_{n\ge 0} f_n'$, that is
$$f'(x) = -\sum_{n\ge 0}  \frac{n e^{-n x}}{n^2+1}$$
Now, with the monotone convergence theorem ( for series) we conclude that
$$\lim_{x\to 0^{+}} f'(x) = - \sum_{n\ge 0} \frac{n}{n^2+1}= - \infty$$
This also implies (with Lagrange intermediate value theorem) that $f'_r(0) = -\infty$.
$\bf{Added:}$ We can estimate the rate of convergence to $-\infty$ by the estimates
$$\sum_{n\ge 1}  \frac{e^{-n x}}{n+1}< \sum_{n\ge 1}  \frac{n e^{-n x}}{n^2+1}< \sum_{n\ge 1}  \frac{ e^{-n x}}{n}$$
and using that $\sum_{n\ge 1} \frac{t^n}{n} = \log \frac{1}{1-t}$, we get
$$e^x (x - \log(e^x-1))  - 1 < f'(x) < x - \log(e^x-1)$$ for $x\in (0, \infty)$.
$\bf{Added:}$
Generalization : $f(x) = \sum_{n\ge 0} a_n e^{-n x}$, where $a_n\ge 0$, the series $\sum_n a_n t^n$ has convergence radius $1$, and $\sum n a_n = \infty$.
