Let $f: \Bbb R \to [0,\infty)$ be continuous and assume that for any $x \in \Bbb R$, $$g(x) := \sum_{k=1}^\infty (f(x))^k < \infty.$$ Show that $g$ is continuous.
My try: For any interval $[-k,k]$, we have $\sup_{\{x\in [-k,k]\}}f(x)=f(y)$ for some $y \in [-k,k]$ and $f(y)<1$ otherwise $$ g(y) := \sum_{k=1}^\infty (f(y))^k = \infty. $$ a contradiction. Hence on $[-k,k]$ $$ g(x) := \sum_{k=1}^\infty (f(x))^k \leq \sum_{k=1}^\infty (f(y))^k =\frac{1}{1-f(y)}< \infty.$$ So we can take $M_k:=\sum_{k=1}^\infty (f(y))^k $ and use Weirstrass M test to conclude $S_n(x)=\sum_{k=1}^n (f(x))^k$ converges uniformly to a continuous function $g(x)$ for all $x\in [-k,k]$ now taking $k \to \infty$ we are done.
Is there any other proof that you can think of?
You can do it more directly, otherwise it's ok except for a missing $f(x)$ in the numerator.
The hypothesis about the pointwise convergence series is equivalent to $\forall x\in\Bbb{R}$, $0\leq f(x)<1$. Then for all $x\in\Bbb{R}$, $g(x)=\frac{f(x)}{1-f(x)}$ which is continuous as a composite of continuous maps.