Limit of Exponential and its Integral Consider a function $h : \mathbb{R} \rightarrow \mathbb{R}$ without singularities such that $h(x) \nearrow \infty$ with $x \rightarrow \infty$. Let $g(x)$ defined by
$$
g(x) = \exp(-h(x)) \int_0^x \exp(h(s)) ds.
$$
Playing around with Desmos, it seems that if $h(x)$ grows at approximately a linear rate, that is to say $\lim_{x \rightarrow \infty} \frac{h(x)}{x} = c \in \mathbb{R}$, then $g(x)$ remains bounded away from both $0$ and $\infty$. Meanwhile, if $h(x)$ grows faster than every line, then $g(x) \rightarrow 0$, and if $h(x)$ grows slower than every line, $g(x) \rightarrow \infty$.
I believe I have a (partial) proof in the case that $h(x)$ is strictly increasing and differentiable, but I suspect this holds in a much more general setting. How can this be shown? Does there exists results that are related to functions of this form?
Edit: This was my approach for the case $h(x)$ being differentiable and strictly increasing at some minimum rate $\alpha > 0$. Write $h(x) = ax + k(x)$, for $a > 0$ and for some $k(x)$ differentiable and $o(x)$. Since $h(x)$ is non-singular, we have that $\sup_{x \in \mathbb{R}} k'(x) \leq m_1$ (this seems questionable, actually). Thus, we have that
$$
\frac{d}{dx} e^{h(x)} \leq (a + m_1) e^{h(x)}.
$$
Integrating this becomes
$$
e^{h(x)} - e^{h(0)} \leq \int_0^x (a + m_1) e^{h(s)} ds \qquad \Rightarrow \qquad g(x) = e^{-h(x)} \int_0^x e^{h(s)} ds \geq \frac{1 - e^{h(0) - h(x)}}{a + m_1}.
$$
Since $h(x)$ is everywhere increasing with a minimum rate $\alpha > 0$, we have that $\inf_{x \in \mathbb{R}} k'(x) \geq m_2$ with $a > m_2$. Performing the same as above and taking $x \rightarrow \infty$, we finally obtain that
$$
0 < \frac{1}{a + m_1} \leq \lim_{x \rightarrow \infty} g(x) \leq \frac{1}{a + m_2} < \infty.
$$
I have yet to show that this behaves as predicted if $h(x)$ grows at non-linear rates.
Edit 2: As EnEm pointed out in the comments, it is not difficult to find a function $h(x)$ that grows faster than any line but for which $g(x)$ does not go to $0$. It still remains very likely that $h(x)$ with linear growth still forces $g(x)$ to avoid $0$ and $\infty$ under fairly weak conditions.
 A: This is a very general question, hence I present a very general answer. I hope it is somewhat satisfactory.
In its most general form, we consider a measurable function $f:[0,\infty)\rightarrow(0,\infty)$, and let $g:[0,\infty)\rightarrow\mathbb R$, $x\mapsto\frac{1}{f(x)}\int_0^xf(s)\mathrm ds$. This covers the original problem since we need that $f=\exp\circ\,h$ is measurable. The discussion of $g:(-\infty,0]\rightarrow\mathbb R$, $x\mapsto\frac{1}{f(x)}\int_0^xf(s)\mathrm{d}s$ can be reduced to the positive case using $g(x)=-\frac{1}{f_+(-x)}\int_0^{-x}f_+(-s)\mathrm{d}s$ with $f_+:[0,\infty)\rightarrow(0,\infty)$, $x\mapsto f(-x)$.
First, notice that $g(0)=0$ and $g(x)>0$ for $x>0$ since $f>0$, so the only root of $g$ (on $\mathbb R$) is $0$. Since the integral is continuous and $f>0$, $g$ has the same discontinuities as $f$.
Now, let's consider $g$ restricted to $(0,\infty)$ and let $h:(0,\infty)\rightarrow(0,\infty)$, $x\mapsto g(x)/x$. Then we have
$$h(x)=\frac{\frac{1}{x}\int_0^xf(s)\mathrm{d}s}{f(x)},$$
so $h$ is the ratio of the mean and the function value. This is exactly the desired intuition.
Switching from the space perspective $x$ to the time perspective $t$, if at the current time, the value $f(t)$ is well below the mean $\frac{1}{t}\int_0^tf(s)\mathrm{d}s$, then $h(t)$ is large (meaning greater $1$), and small if it is large. So, at this point the question is simply how the all-time mean compares to the (current) observation. Clearly, if current observations can be completely unrelated to the past, there's not much we can say, in particular when it comes to discontinuities of $f$.
So, let's consider a very well-behaved $f$, say $L$-Lipschitz for some $L\in\mathbb R_{>0}$. Is this sufficient to provide bounds for $h$? Consider a piecewise linear function $f$, starting off constant for a long time, so it coincides with its mean. Then we go up at full speed $L$ for a time, until the ratio of $f$ to its mean is huge (which we can do since we were constant for along time). Then we switch back to constant, until the mean catches up (the new value is very large).
Now, go down at full speed until you are close to $0$, the ratio of $f$ to its mean is tiny. Switch back to constant and wait till the mean catches up.
Now, we iterate and enforce. This means we go up again, to double the previous maximum (the changes of the mean are smaller and smaller since long periods of time passed), thereby essentially doubling the ratio compared to the last excursion to the top. Then we wait for the mean to catch up and long enough, go back down to the same minimum as before (recall we're positive here), the ratio being tiny, wait for the mean to catch up, ...
With the construction above we obtain a function $h$ has a subsequence converging to $c$, for every $c\in[0,\infty]$. Thus, the ratio $g(x)/x$ has no specific behavior.
In a nutshell, we make use of the fact that the mean is sluggish compared to the current value. While we can make statements on how big the change of $h$ can be, there is no determined behavior in terms of the asymptotics.
