Putnam 2011, Problem B-3

Let $f$ and $g$ be (real-valued) functions defined on an open interval containing $0$, with $g$ nonzero and continuous at $0$. If $fg$ and $f/g$ are differentiable at $0$, must $f$ be differentiable at $0$?

Solution:
Yes, it follows that \(f\) is differentiable.  
**First solution.** Note first that at \(0\), \(f/g\) and \(g\) are both continuous, as then is their product \(f\). If \(f(0) \neq 0\), then in some neighborhood of \(0\), \(f\) is either always positive or always negative. We can thus choose \(\varepsilon \in \{\pm 1\}\) so that \(\varepsilon f\) is the composition of the differentiable function \((f g) \cdot (f/g)\) with the square root function. By the chain rule, \(f\) is differentiable at \(0\).  
If \(f(0) = 0\), then \((f/g)(0) = 0\), so we have  
\[
(f/g)'(0) = \lim_{x \to 0} \frac{f(x)}{x g(x)}.
\]  
Since \(g\) is continuous at \(0\), we may multiply limits to deduce that \(\lim_{x \to 0} f(x)/x\) exists.  
**Second solution.** Choose a neighborhood \(N\) of \(0\) on which \(g(x) \neq 0\). Define the following functions on \(N \setminus \{0\}\): \(h_1(x) = \frac{f(x)g(x) - f(0)g(0)}{x}\); \(h_2(x) = \frac{f(x)g(0) - f(0)g(x)}{x g(0)g(x)}\); \(h_3(x) = g(0)g(x)\); \(h_4(x) = \frac{1}{g(x) + g(0)}\). Then by assumption, \(h_1, h_2, h_3, h_4\) all have limits as \(x \to 0\). On the other hand,  
\[
\frac{f(x) - f(0)}{x} = (h_1(x) + h_2(x) h_3(x)) h_4(x),
\]  
and it follows that \(\lim_{x \to 0} \frac{f(x) - f(0)}{x}\) exists, as desired.