Suppose that $f$ and $g$ are functions from $\mathbb R$ to $\mathbb R$ such that the functions $f,fg,fg^2$ are smooth, that is, are in $C^\infty(\mathbb R)$. Does it then necessarily follow that the 
functions $f\sqrt{1+g^2}$ and $fg\sqrt{1+g^2}$ are smooth? 


Of course, the problem here is that the function $g$ does not have to be smooth, or even continuous, at zeroes of the function $f$. 


One may also note that the continuity of the 
functions $f\sqrt{1+g^2}$ and $fg\sqrt{1+g^2}$ (at the zeroes of $f$ and hence everywhere) follows easily from the inequalities $|f\sqrt{1+g^2}|\le|f|+|fg|$ and $|fg\sqrt{1+g^2}|\le|fg|+|fg^2|$. 



Are $f\sqrt{1+g^2}$ and $fg\sqrt{1+g^2}$ smooth if $f,fg,fg^2$ are smooth?
**No.**


Set
$$ f(x) = \exp(-2/|x|^2) \operatorname{sign} x, \qquad g(x) = \exp(1/|x|^2) \sqrt{|x|} \operatorname{sign} x $$
for $x \ne 0$, and, of course, $f(0) = g(0) = 0$. Then clearly
$$ \begin{aligned}
f(x) & = \exp(-2/|x|^2) \operatorname{sign} x , \\
f(x) g(x) & = \exp(-1/|x|^2) \sqrt{|x|} , \\
f(x) (g(x))^2 & = x
\end{aligned} $$
are infinitely smooth, but
$$ f(x) g(x) \sqrt{1 + (g(x))^2} = \sqrt{|x| \exp(-2/|x|^2) + |x|^2} = |x| (1 + o(1)) $$
is not even differentiable at $0$.


