extending a limit to an integral case For a finite set of postitive real numbers $\{g_i\}$, it's clear that
$$
\lim_{\lambda->\infty} \frac{1}{\lambda} \ln\left(\sum_i e^{\lambda g_i} \right) = \max \{g_i\},
$$
since the argument of the logarithm becomes dominated by the largest of the $e^{\lambda g_i}$ terms. In the case where there are $n$ $g_i$'s that all share the same maximum value, the limit becomes $\frac{1}{\lambda}(\ln e^{\lambda g_\text{max}} + \ln n)$, and the $\ln n$ term vanishes.
Intuitively, this should generalise to the case where the sum becomes an integral, yielding
$$
\lim_{\lambda->\infty} \frac{1}{\lambda} \ln\left(\int_{0}^{\infty} e^{\lambda f(x)}dx \right) = \max_x f(x),
$$
where $f(x) \ge 0$ for all $x\ge 0$.
However, I don't know how to show this formally, and I'm uncertain what properties $f(x)$ must have in order for this limit to hold. For example, does it still work if the second derivative vanishes at the maximum point?
If anyone has any insight into how to prove this formula, and how to determine the class of functions for which it holds, it would be much appreciated.
 A: Actually the result makes no sense for integrals on $[0,\infty)$, thanks to @AntonioVargas for having spotted that. Rather, the following holds:

Let $B$ denote a Borel set of finite Lebesgue measure $m$, and $f$ a measurable function defined on $B$ and bounded from above by $S=\sup\{f(x)\mid x\in B\}$. For every positive $\lambda$, consider
  $$
L(\lambda)=\frac{1}{\lambda} \ln\left(\int_B\mathrm e^{\lambda f(x)}\mathrm dx \right).
$$

Then $f(x)\leqslant S$ for every $x$ in $B$ hence
$$
L(\lambda)\leqslant\frac{1}{\lambda} \ln\left(\mathrm e^{\lambda S}m \right) =S+\frac{1}{\lambda}\log m,
$$
In particular,
$$
\limsup_{\lambda\to+\infty}L(\lambda)\leqslant S.
$$
In the other direction, assume that:

$(\dagger)$ For every $\varepsilon\gt0$, the set $\{x\in B\mid f(x)\geqslant S-\varepsilon\}$ has positive measure.

Then, calling $B_\varepsilon$ this set and $m_\varepsilon$ its measure, one sees that
$$
\int_{B}\mathrm e^{\lambda f(x)}\mathrm dx\geqslant\int_{B_\varepsilon}\mathrm e^{\lambda f(x)}\mathrm dx\geqslant\int_{B_\varepsilon}\mathrm e^{\lambda (S-\varepsilon)}\mathrm dx\geqslant m_\varepsilon\mathrm e^{\lambda(S-\varepsilon)},
$$
hence
$$
L(\lambda)\geqslant S-\varepsilon+\frac1{\lambda}\ln m_\varepsilon.
$$
In particular,
$$
\liminf_{\lambda\to+\infty}L(\lambda)\geqslant S-\varepsilon.
$$
This proves that $\lim\limits_{\lambda\to+\infty}L(\lambda)=S$.
Finally, note that if $f$ is continuous, then $(\dagger)$ holds.
