Let (X,d) be a metric space. For each n $\epsilon$ N let $g_n$:X$\rightarrow$R be a continuous function. Let ($a_n$) be a sequence of positive real numbers such that the series $\sum_n_=_1^\infty a_n$ converges. Suppose that for a fixed M>0 we have |$g_n$(x)|$\leq$M$a_n$ for each x$\epsilon$X and n$\epsilon$N. Show that the function g:X$\rightarrow$R defined by g(x)= $\sum_n_=_1^\infty g_n (x)$; x$\epsilon$X is continuous.
This is a little different than Weierstrass M-test. I could not make the proof of Weierstrass M-test according to this question.