I need to show that the following function is continuous over $(0, \infty)$:
$$f(x) = \sum_{n=1}^{\infty}{(\cos(nx))^{n^2}\over{(e^x + x)^n}}$$
I have tried showing that the series is uniformly convergent over said interval, using the Weierstrass M-test:
$${(\cos(nx))^{n^2}\over{(e^x + x)^n}} \le {1\over (e^x + x)^n} $$
And since $x \ge 0$, we have:
$${1\over (e^x + x)^n} \le {1\over (e^x)^n}$$
Now, since $\sum_{n=1}^{\infty}{ {1\over (e^x)^n}} $ is a convergent geometric series, as I understand it, it is enough to claim that $f(x)$ is uniformly convergent, and thus continuous over $(0,\infty)$.
But it seems that I am mistaken. The formal solution I was given included showing that
$${1\over (e^x + x)^n} \le {1\over (e^b)^n + b}$$ in the interval $[b,\infty) $ for every $b \ge 0$.
I would appreciate if someone can explain to me why my solution is wrong, or isn't enough.
Thanks.
For the Weierstraß -M -test you need an estimation of the form
${1\over (e^x + x)^n} \le a_n$ such that the sequence $(a_n) $ is independent of $x$ !!
(and such that $\sum_{n=1}^{\infty} a_n$ is convergent).