Let $g_n(x) = \frac{x^{n+1} + 2 \cos(x)}{(n^2+1)(x^n+1)}$, I want to show $\sum_{n=1}^{\infty} g_n(x)$ converges uniformly on $[0,\infty)$.
My trial is using Weierstrass M test,
\begin{align} |g_n(x)| = \left|\frac{x^{n+1} + 2 \cos(x)|}{(n^2+1) |(x^n+1)} \right| \leq \frac{|x^{n+1}| + 2}{(n^2+1)(|x^n| +1)} \end{align} and it seems RHS depends on $x$, so Weierstrass M-test seems not working.
How to show the uniform convergence of $\sum g_n(x)$?
The series is not uniformly convergent. Note: The fact that the numerator has a higher power of $x$ than the denominator gives a clue.
If it is uniformly convergent then there exist $n_0$ such that $\sup_{x \geq 0}\frac {x^{n+1}+2\cos x}{(n^{2}+1)(x^{n}+1)} <1$ for $n \geq n_0$. Put $n=n_0$ and let $x \to \infty$ in $\frac {x^{n+1}+2\cos x}{(n^{2}+1)(x^{n}+1)} $ to see that this inequality fails.
[$\frac {x^{n_0+1}}{(n_0^{2}+1)(x^{n_0}+1)}\to \infty$ and $\frac {2\cos x}{(n_0^{2}+1)(x^{n_0}+1)} \to 0$ as $x \to \infty$].