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$.