modern analysis: integrals and continuity Let $$f(x) = \sum_1 ^\infty n*e^{-nx}$$ Where is $f$ continuous? Compute  $$\int_1^2f(x) dx$$
I am having trouble proving where $f$ is continuous. For the second part, so far I have been able to compute the derivative.. although I basically had to move the summation from inside the integral to outside the integral and I am not sure why I am allowed to do that.

The series $\sum_{n=1}^\infty ne^{-nx}$ converges uniformly on any interval $[a, \infty)$ with $a>0$ since $\sum_{n=1}^\infty ne^{-na}$ is convergent and  $$\sum_{n=1}^\infty ne^{-nx}\leq\sum_{n=1}^\infty ne^{-na}.$$
The latter series converges by integral test and the result follows from the Weirstrass-M test. Since the series converges uniformly on $[a, \infty)$  and hence is convergent on any subset of this interval, and each partial sum of the series is continuous on $[a, \infty)$, the series converges to a continuous function, say $f(x)=\sum_{n=1}^\infty ne^{-nx}$, on $[a, \infty)$. Thus as a result of uniform convergence we have $$\int_1^2f(x) dx=\sum_{n=1}^\infty\int_1^2 ne^{-nx}dx=\sum_{n=1}^\infty\big(e^{-n}-e^{-2n})=\frac{1}{1-1/e}-\frac{1}{1-1/e^2}.$$
