How many critical points does a product of two monotonic/antimonotonic functions have? Let $f : [a, b] \to \mathbb{R}$ be either strictly monotonic or strictly antimonotonic, continuous, and differentiable and let $g : [a, b] \to \mathbb{R}$ also be either strictly monotonic or strictly antimonotonic, continuous and differentiable. How many non-trivial (e.g. excluding $a$ and $b$) critical points does $h(x) = f(x) \cdot g(x)$ have? I think the answer is "either 0 or 1" but I'm not sure how to reason about that. We can quickly find that both 0 and 1 are possible values using $f(x) = g(x) = x$ and then just shifting $[a, b]$ around a bit. For instance if $[a, b] = [-1, 1]$ then there is 1 non-trivial critical point in $f \cdot g$ but if $[a, b] = [1, 2]$ then there are no non-trivial critical points.
My intuition is that if $f$ and $g$ are both (anti)monotonic then there exists $f^{-1}$ and $g^{-1}$ such that $f^{-1}(f(x)) = x$ and $g^{-1}(g(x)) = x$ so there's a sense in which they "behave like linear functions" with respect to critical points. We know that $f^{-1}(f(x)) \cdot g^{-1}(g(x)) = x^2$ and thus has exactly 1 non-trivial critical point at $x=0$. If $0 \not\in [a, b]$ then no non-trivial critical points exist. It seems to me like there should be someway to explain that $f^{-1}(f(x)) \cdot g^{-1}(g(x))$ and $f(x) \cdot g(x)$ have a related number of critical points. It seems like I'm missing some helpful insight about the structure of $f^{-1}$ that might help out here or something.
We know that $f$ and $g$ have no non-trivial critical points. There seems to be a case by case analysis that looks at the signs of $f$, $g$, $f'$, and $g'$ that would let you prove that for all such cases $f(x)g'(x) + f'(x)g(x)$ has either 0 or 1 solutions. I started to fill this table out but its got 16 cases even if you assume that $f$ and $g$ are everywhere positive or everywhere negative. The full table for all cases would also include the cases where $f$ and $g$ have both positive and negative values. My thought for handling that is that you could break up $f$ and $g$ into their positive and negative parts and then at least get an upper bound of 3 since each of the 3 segments that you split $f \cdot g$ into would have 0 or 1. I decided to temporarily give up this path feeling that it was either doomed or needlessly tedious.
Are there any tools I'm missing or theorems available for dealing with this?
 A: $\newcommand{\Reals}{\mathbf{R}}$Proposition: Let $C$ be a closed subset of the real line with empty interior. There exists a strictly increasing smooth function $f$ on $\Reals$ whose derivative is non-negative, and equal to $0$ precisely on $C$.
Sketch of proof: The complement of $C$ is open, so is a disjoint union of open intervals. For each interval $(a, b)$, pick a smooth, positive function $\phi_{(a, b)}$ that vanishes (together with all its derivatives, see below) at $a$ and $b$. Define the smooth, non-negative function $\phi:\Reals \to \Reals$ by
$$
\phi(x) = \begin{cases}
  \phi_{(a, b)}(x) & a < x < b, \\
  0 & x \in C.
\end{cases}
$$
Finally, put
$$
f(x) = \int_{0}^{x} \phi(t)\, dt.
$$
If $x < y$, there is some point $z$ with $x < z < y$ and $0 < \phi(z)$ (because the set $C$ has empty interior). Since $\phi$ is continuous,
$$
f(y) - f(x) = \int_{x}^{y} \phi(t)\, dt > 0.
$$
That is, $f$ is strictly increasing.
A standard choice of smooth, positive function as in the proof is to use $\phi_{0}(t) = e^{-1/t}$ (extended to be $0$ at $0$), and then $\phi_{(a, b)}(t) = \phi_{0}(t - a)\phi_{0}(b - t)$, with the corresponding factor omitted if $a = -\infty$ or $b = +\infty$.

In theory, the preceding construction gives us a smooth, strictly increasing (or decreasing) function having, as critical point set $C$, a Cantor set, or the set $C = \{0\} \cup \{\pm\frac{1}{n} : n \geq 1\}$ consisting of $0$ together with the reciprocals of integers. For the latter set, we can be more explicit: If we put
$$
f(x) = \int_{0}^{x} e^{-1/t^{2}}\sin^{2}(\pi/t)\, dt,
$$
with the integrand extended to be $0$ at $0$, then $f'(x) =  e^{-1/x^{2}}\sin^{2}(\pi/x)$ is non-negative, and $0$ precisely when $1/x$ is an integer or $x = 0$. Since this set is closed and has empty interior, $f$ is strictly increasing.

Just so your question has a proper answer here (and not just in the comments): If we pick such an $f$, and let $g = -f$, then $g$ is strictly decreasing, but $fg = -f^{2}$ has a critical point at each critical point of $f$, i.e., at every point of $C$. Since $C$ is an arbitrary closed set with empty interior, there is no bound on the number of critical points (in any open interval) of the product of a strictly increasing and a strictly decreasing function.
