# A comparison test for uniform convergence — counterexample

In light of the Weirstrass M-test it seems like a comparison theorem for uniform convergence of a series of functions (say $[0,1]\to\mathbb{R}$) won't hold. Specifically, I am curious if the following statement holds:

Let $\{f_n\},\{g_n\}\subset C([0,1])$ be two sequences of continuous functions such that $f_n\leq g_n$. If $\sum_{n=1}^{\infty}g_n$ converges uniformly then $\sum_{n=1}^{\infty}f_n$ also converges uniformly.

I think this result will hold if these are sequences of positive functions. However, I don't think it will hold in general. Is there a simple counterexample (or, I guess, a proof) of this statement (for the general case).

• Do you mean to assume both $f_n,g_n$ are positive functions? – coffeemath Apr 2 '18 at 4:27
• I am interested in a counterexample of the original result, regardless of the sign of $f_n$ and $g_n$ for all $n$. I edited my post to hopefully be more clear – mmmath-beginner Apr 2 '18 at 4:32

If $f_n, g_n$ are not required to be nonnegative, you have the trivial counterexample of $g_n = 0$ for all $n$, and $f_n = -1$ for all $n$. Then the sum of the $g_n$ converges uniformly to the zero function, but the sum of the f_n does not converge at any point.