# Non-trivial examples of taking the exponential of an integral

This question is inspired by a recent course I did on random matrix theory and also from common mistakes high-schoolers make in algebra :).

In random matrix theory, one often encounters somewhat intractable integrals involving a logarithmic term that are often made more amenable to analysis using the replica trick, that is, say, in the case of trying to find the expectation of logarithm of a partition function, $Z(x)$, one can use the identity:

$$\mathbb{E}\big[\log Z(x)\big] = \lim_{n\to 0} \frac{1}{n}\log \mathbb{E}\big[Z(x)\big]^n.$$

This helps to evaluate integral more easily because the partition function usually takes the form of an exponential multiplied by another function.

My question is much simpler than this. Under what conditions would it just justifiable, or through the use of what technique would it be possible that either of the following relations

$$\int \exp(f(x)) dx = \exp\left(\int f(x) dx\right)$$

or

$$\int \log(f(x)) dx = \log\left(\int f(x) dx\right)$$

holds. Here $f\in \mathbb{C}^{\infty}$ and the integral denotes the Riemann integral.

• you're asking when $e^a+e^b=e^{a+b}$? – Carlo Beenakker May 3 '17 at 12:20
• Could you specify better what is $f$ and the meaning of the integral? – Pietro Majer May 3 '17 at 12:21
• Not exactly. I'm asking for which non-trivial functions or which non-trivial conditions does the relation $int\exp(f(x)) = exp(\int f(x))$ hold. – user119264 May 3 '17 at 12:23
• @PietroMajer Edited. – user119264 May 3 '17 at 12:25
• For any strictly convex function $g$ and any probability measure $\mu$, $g\left(\int f(x) d\mu(x)\right) \le \int g(f(x)) d\mu(x)$, with equality only when $f$ is a.s. constant. Similarly for strictly concave functions, with $\le$ replaced by $\ge$. – Robert Israel May 3 '17 at 15:53

Here's one way to get lots of examples.

Start with a finite interval $[a,b]$ and a function $g$ on this interval such that $\int_a^b g(x)\; dx > 0$, and for $c > 0$ and $d > 0$ consider $f$ defined on $[ca, cb]$ by $f(x) = d g(x/c)$. Then $$A(c,d) := \exp\int_{ca}^{cb} f(x)\; dx = \exp\left(c d \int_a^b g(t)\; dt\right)$$ $$B(c,d) := \int_{ca}^{cb} \exp(f(x))\; dx = c \int_a^b \exp(d g(t))\; dt$$ We have $A(0,d) = 1$ and $B(0,d) = 0$, while for any fixed $d > 0$, $A(c,d) > B(c,d)$ if $c$ is sufficiently large. Thus by the Intermediate Value Theorem, there will be some $c$ that makes $A(c,d) = B(c,d)$.

Given $f(x)>0$ for $x>0$, we could extend the function to negative $x$ by demanding that: $$f(-x)=f(x)-\log(e^{f(x)}-1)$$ then $$e^{f(x)}+e^{f(-x)}=\exp[f(x)+f(-x)],$$ hence $\int e^f\,dx = \exp\left(\int f\,dx\right)$. A discontinuity at $x=0$ can avoided if $f(0)=\log 2$.

As pointed out by Pietro Majer, this construction needs a finite domain $-a<x<a$ for a convergent integral. [Alternatively, the domain could be displaced to $(a,b)$ by relating $f(x)$ to $f(a+b-x)$.]

• Is the integral finite? Since $u(x):=e^{f(x)}$ and $v(x):=e^{f(-x)}$ satisfy $u+v=uv$, hence $(u-1)(v-1)=1$, we have $\mathbb{R}=\{|u-1|\ge1\}\cup\{|v-1|\ge1\}$, so either $\int_{\mathbb{R}} u$ or $\int_{\mathbb{R}} v$ should be infinite... – Pietro Majer May 3 '17 at 14:22
• true, I need a finite domain --- thanks for correcting me. – Carlo Beenakker May 3 '17 at 14:55