Good function's I'm trying to solve the following question:  

Let $(X,d)$ be a metric space. We call a continuous function $f:X\to \mathbb R$ "good function" if for every continuous function $g:X\to \mathbb R$, the set: $S=\{x\in X;f(x)g(x)=1\}$ be a compact subset of $X$. Prove that the the addition of two good function is good.  

My idea is the following:
Let $f:X\to \mathbb R$ be a good function and $r\neq 0$ be any real number and $g:X\to \mathbb R$ be arbitrary continuous function. Then, the set: $$S_r=\{x\in X;f(x)g(x)=r\}$$ is compact to. And when $r=0$, the set: $$S_0=\{x\in X;f(x)g(x)=0\}$$ is close in $X$. Now, let $f_1,f_2:X\to \mathbb R$ be tow good function's. Define: $$S_r(g)=\{x\in X;f_1(x)g(x)=r \,\,\,and\,\,\, f_2(x)g(x)=1-r\}$$ Then, for every $r\in \mathbb R$, the set $S_r(g)$ is compact and: $$S=\{x\in X;\,(f_1(x)+f_2(x))g(x)=1\}=\cup_{r\in \mathbb R}S_r(g)$$ Now, if $\{y_n\}_{n\in \mathbb N}\subset S$ be on arbitrary sequence. If infinitely many of $\{y_n\}_{n\in \mathbb N}$ belong to $S_{r_0}(g)$ for some $r_0 \in\mathbb R$, then because of $S_{r_0}(g)$ is compact, the sequence $\{y_n\}_{n\in \mathbb N}$ has a convergence subsequence. But when for every $r\in \mathbb R$, almost finitely term's of $\{y_n\}_{n\in \mathbb N}$ belong to $S_r(g)$, how can I prove that $\{y_n\}_{n\in \mathbb N}$ has a convergence subsequence?
 A: I don't know if this is correct, but I gave it my best shot:
Lemma: A continuous function $f:X \to \mathbb{R}$ is good if and only if it is compactly supported.
Proof: Suppose that $f$ is compactly supported, and let $C = $supp$f$ denote the support of $f$. Then for any continuous map $g:X \to \mathbb{R}$, the set $\{x : f(x)g(x)=1\}$ is a closed subset of the compact set $C$, hence compact. 
Conversely, suppose that $f$ is not compactly supported. Since supp$f$ is closed but not compact, there exists a sequence of points $x_n$ such that $x_n$ does not converge along a subsequence to any point of $X$, and such that $f(x_n)\neq 0$ for all $n$. Let $A = \{x_n: n \in \mathbb{N}\}$. Then $A$ is closed (because if $x \notin A$, then there exists some neighborhood of $x$ not containing any $x_n$, otherwise the $x_n$ would converge along a subsequence to $x$). Hence, by the Tietze extension theorem, there exists a continuous map $g:X \to \mathbb{R}$ such that $g|_A=\frac{1}{f}$. Also, $A$ is non-compact (otherwise the $x_n$ would converge along a subsequence). Therefore $\{x:f(x)g(x)=1\}$ is noncompact (since it contains the closed, noncompact set $A$), so $f$ cannot be a good function. This proves the lemma. $\Box$
Now, all we need to do is to prove that the sum of two compactly supported functions is compactly supported. Notice that if $f_1$ and $f_2$ are compactly supported, then supp$(f_1+f_2) \subset($supp$f_1) \cup($ supp$f_2$), and since closed subsets of compact sets are compact, it follows that supp$(f_1+f_2)$ is compact.
