This is a follow-up on the [previous question](https://mathoverflow.net/questions/353002/smoothness-of-f-sqrt1g2-and-fg-sqrt1g2-for-functions-f-and-g-suc). 


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, for some function $h\colon\mathbb R\to\{-1,1\}$, the 
functions $hf\sqrt{1+g^2}$ and $hfg\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$; if $f$ has no zeroes, then one can obviously take $h=1$. 


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



Are $\pm f\sqrt{1+g^2}$ and $\pm fg\sqrt{1+g^2}$ smooth if $f,fg,fg^2$ are smooth?
Still *no*. Consider the function $f(x)=(x^2+r^2)^2$, $g(x)=\frac x{x^2+r^2}$ with small $r>0$. Then $f$, $fg$, $fg^2$ are polynomials of degree $\le 4$ with bounded coefficients but $f\sqrt{1+g^2}$ is very close to $x^2|x|\sqrt{1+x^2}$ as close to $0$ as you wish when $r$ is small enough, so the maximum of the fourth derivative in an arbitrarily small neighborhood of the origin can be forced to be very large by choosing $r$ small enough. Now just take your favorite $C^\infty$ function $\psi$ that is $1$ on $[-1,1]$ and is supported on $[-2,2]$ and use $\psi f$ and $\psi g$ instead of $f$ and $g$. You'll get a compactly supported building block that you can scale and translate with the possibility to blow up the fourth derivative by choosing $r$ last. So just scale to some disjoint intervals $I\_j$ accumulating to $0$ with sufficiently fast decaying heights to make individual multiplications by controlled polynomials irrelevant after which choose $r\_j$. Near the center of each interval $I\_j$ the function $f$ is strictly positive, so $h$ is of no use there. What may really help (no guarantee though) is to assume that $g$ is continuous, but that is, probably, too much for your purposes.


