For $i=1,\ldots,n$, let $f_i\colon(0,\infty)\to(0,1)$ and $g_i\colon(0,\infty)\to(0,1)$ be $C^{\infty}$ functions.
Define $h\colon(0,\infty)\to(0,\infty)$ as follows: $$h(t)=\max_{i=1,\ldots,n} \frac{f_i(t)}{g_i(t)}\qquad \forall t\in(0,\infty).$$
I am wondering if the following is true:
The function $h$ is differentiable almost everywhere, and there exists $f,g\colon(0,\infty)\to(0,1)$ differentiable almost everywhere such that $h(t)=\frac{f(t)}{g(t)}$ for every $t\in (0,\infty)$.
I am pretty sure it is true, but I would like to have confirmation (and, if possible, a reference).
This question is quite related however it is not exactly the same. Still the answer of @Alex R. seems to confirm my belief that the affirmation is indeed true.
Note: I don't know if it helps, but the case I am interested in have the additional properties that $h$ is strictly decreasing, $\lim_{t\to 0}h(t)=\infty$ and $\lim_{t\to \infty}h(t)=1$.
As @Christian Blatter noticed, the problem can be easily reduced to functions $h$ of the form $$h(t)=\max_{1\leq i \leq n} h_i(t)$$ where $h_i\colon (0,\infty)\to (0,\infty)$ is smooth ($h_i=f_i/g_i$ in OP). Now, as $h_i$ is smooth, it is Lipschitz continuous on every closed interval. It follows that $h$ is locally Lipschitz on $(0,\infty)$.
Now, @Anthony Carapetis suggested to use Rademacher's theorem which in facts, implies that $h$ is differentiable almost everywhere in $(0,\infty)$.
Finally, @G. Sassatelli noticed that one can always construct $f,g\colon (0,\infty)\to(0,1)$ with the same regularity as $h$ and such that $h(t)=\frac{f(t)}{g(t)}$ for every $t>0$. Take for instance $$f(t)=e^{-h(t)}, \qquad g(t)=\frac{e^{-h(t)}}{h(t)}.$$