TITLE: Prove or disprove: if $f$ and $fg$ are continuous then $g$ is continuous.
QUESTION [5 upvotes]: Prove of provide a counterexample:
Suppose that $f$ and $g$ are defined and finite valued on an open interval $I$ which contains $a$, that $f$ is continuous at $a$, and that $f(a)\neq 0$. Then $g$ is continuous at $a$ if and only if $fg$ is continuous at $a$.
I don't suppose it's true, based on the fact that the common theorem '$f, g$ continuous implies $fg$ continuous' is not stated as true both ways; obviously, this implies exceptions. The only ones I can think of, however, are one's that don't fit the "open interval" or "$f(a)\neq 0$" parts, or ones where both f and g are discontinuous.
I've also tried proving it, but with no luck.
Help? :-S

REPLY [9 votes]: $f$ is continuous and nonzero at $a$, hence $1/f$ is continuous at $a$.  Since $fg$ is continuous at $a$ as well, so is their product $(fg)(1/f)=g$.
(the other direction doesn't need a trick).