# Maximizing the value of $\int_0^1 f(x)f^{-1}(x)\ \mathrm dx$

I am trying to find the maximum size of the integral $$\int_0^1 f(x)f^{-1}(x)\ \mathrm dx$$ for differentiable, increasing $$f$$ with $$f(0)=0$$ and $$f(1)=1$$. I made up this exercise for myself and thought it would be easy, but I can't do it.

I feel the answer should be $$\frac 1 3$$ intuitively, which comes from $$f(x)=x$$. So far I've tried integration by parts but then I don't know what to do.

Edit: here is the integration by parts I tried, though I think it doesn't lead anywhere: $$\int^1_0 f(x)f^{-1}(x)\ \mathrm dx=\int_0^1f^{-1}(x)\ \mathrm dx-\int_0^1f'(x)\left(\int_0^x f^{-1}(t)\ \mathrm dt\right)\ \mathrm dx\text.$$ I thought this could help because $$f'(x)>0$$ since $$f$$ is increasing and the other factor in this integral is also positive by default.

• Interesting question, nicely presented, which I do not know the answer to. The only reason that I did not upvote is because you haven't shown any work. Please edit your query to show your work. For example, if you have tried integration by parts, show it. In fact, show anything that you have tried. – user2661923 Oct 13 at 23:51
• Just an observation: for $f(x)=x^{1/a}, \; a \in \mathbb{R}^+$, where $f^{-1}(x)=x^{a}$, the integral evaluates to $\frac{1}{a+1/a+1}$ which is maximized at $a=1$ or $f(x)=x$. – Ty. Oct 14 at 1:31
• With the substitution $x = f(t)$, it becomes $$\int_{0}^{1}f\left(f\left(t\right)\right)f'\left(t\right)t\ \mathrm{d}t$$ but I don't know how much that helps. – Varun Vejalla Oct 14 at 2:42

The answer is indeed 1/3, which can be proved using the Fenchel-Young inequality for Legendre transforms.

Define $$F(t):=\int_0^t f(x)dx$$ so that $$F$$ is convex on $$[0,1]$$. The Legendre transform of $$F$$ is given by $$G(t)=\sup_{u\in [0,1]} (tu-F(u))=\int_0^t f^{-1}(x)dx$$ for $$t \in [0,1]$$.

Young's inequality (also called Fenchel's inequality) says that $$ab \leq F(a)+G(b)$$ for any $$a,b \in [0,1]$$.

Consequently we see that $$f(x)f^{-1}(x)\leq F(f(x))+G(f^{-1}(x))$$. Now notice from Fubini that $$\int_0^1F(f(x))dx = \int_0^1\int_0^{f(x)}f(u)dudx$$$$= \int_0^1 \int_0^1 f(u)1_{\{u and symmetrically we obtain that $$\int_0^1G(f^{-1}(x))dx = \int_0^1 f^{-1}(u)(1-f(u))du.$$ Now integrating the identity $$f(x)f^{-1}(x)\leq F(f(x))+G(f^{-1}(x))$$ from $$0$$ to $$1$$, we get that $$\int_0^1 f(x)f^{-1}(x)dx \leq \int_0^1 f(u)(1-f^{-1}(u))du+\int_0^1 f^{-1}(u)(1-f(u))du.$$ Since $$\int_0^1f(u)du+\int_0^1 f^{-1}(u)du=1$$, the previous expression reduces to $$3\int_0^1 f(x)f^{-1}(x)dx\leq 1.$$

• In case anyone is wondering why $\sup_{u\in [0,1]} (tu-F(u))=\int_0^t f^{-1}(x)dx$, this is because the supremum must be attained wherever the derivative of the thing being maximized equals zero, which is at $F'(u)=t$, i.e., $u=f^{-1}(t)$. Consequently the sup equals $tf^{-1}(t)-F(f^{-1}(t))$, which (using integration by parts or just drawing a picture) conicides with $\int_0^t f^{-1}(x)dx$. – shalop Oct 14 at 4:09

Prove $$\int_0^1 f(x)f^{-1}(x)dx \leq \frac{1}{3}$$.

First we notice that $$f(x) \leq x$$ leads to $$x \leq f^{-1}(x)$$, and $$f(x) \geq x$$ leads to $$x \geq f^{-1}(x)$$, so $$[f(x)-x][f^{-1}(x)-x] \leq 0$$.

Integrate it.Then we get $$\int_0^1 f(x)f^{-1}(x)dx+\int_0^1 x^2 dx \leq \int_0^1 x(f(x)+f^{-1}(x))dx=\int_0^1 xf(x) dx+\int_0^1 xf^{-1}(x)dx$$.

Let $$y=f^{-1}(x)$$,then the second integral in the right is$$\int_0^1 yf(y)df(y)=\frac{1}{2}\int_0^1 ydf^2(y)=\frac{1}{2}[1-\int_0^1 f^2(y)dy]$$.

So$$\int_0^1 f(x)f^{-1}(x)dx+\int_0^1 x^2 dx \leq \frac{1}{2}[1+\int_0^1 f(x)(2x-f(x))dx] \leq \frac{1}{2}[1+\int_0^1 x^2 dx]$$.

done.

"=" iff $$2x-f(x)=f(x)$$,i.e. $$f(x)=x$$

• Really nice solution! – Bennett Gardiner Oct 14 at 5:22
• It took me an embarrassingly long time to figure this out, but the reason why $f(x)(2x-f(x))\leq x^2$ is that $2xy-y^2 \leq x^2$ where $y=f(x)$. Nice. – shalop Oct 14 at 6:44
• And if anyone else was stumped by $\int_0^1 y\,df^2(y) = 1-\int_0^1f^2(y)\,dy$, it follows from en.wikipedia.org/wiki/Integral_of_inverse_functions. – Milten Oct 14 at 9:28

I believe you can prove it using the calculus of variations. Here is a sketch of how it would go.

Consider $$h(x) = f(x) + \delta g(x)$$ where $$g(x)$$ is a function in some class of nicely-behaved functions and $$\delta$$ is a small number. Then $$h^{-1}(x) \approx f^{-1}(x) - \delta g(x)$$. Now consider

$$u(\delta) := \int_0^1 h(x)h^{-1}(x) = \int_0^1 (f(x) + \delta g(x)) (f^{-1}(x) - \delta g(x))$$

Then

$$u'(\delta)|_{\delta = 0} = \int_0^1 (g(x)f^{-1}(x) - g(x) f(x)) = \int_0^1 g(x)(f(x) - f^{-1}(x))dx$$

Since this must be zero for all $$g$$, you get $$f^{-1}(x) = f(x)$$. But since $$f$$ is increasing, you get

$$x \le f(x) \le f(f(x)) = x$$

and therefore $$f(x) = x$$, so your answer is correct.

• Slight subtlety: It seems like you proved that if a maximizer exists then it must be the identity function. However we don’t know a priori that a maximizer does in fact exist. Something like Arzela Ascoli should work in this regard. – shalop Oct 14 at 4:39
• I am having trouble seeing why $h^{-1}(x)$ is close to $f^{-1}(x)-\delta g(x)$. When I take the derivative of $h^{-1}(x)$ with respect to $\delta$ I get $g(f^{-1}(x))/f’(f^{-1}(x))$ which doesn’t seem compatible. – 83964 Oct 14 at 5:20
• @83964 I'm having trouble seeing it too. Maybe I was too careless there! Luckily people have already come up with nicer solutions. – Flounderer Oct 14 at 5:36

We can make rigorous the argument given by Flounderer using the comment given by Varun Vejalla. Also we can prove that the identity function is indeed a maximizer computing the second variation which turns out to be strongly concave.

Using the change of variable $$x=f(t)$$ we have $$\int_0^1 f(x) f^{-1}(x)\,dx=\int_0^1 f(f(t))f'(t) t \,dt.$$ We compute the Euler-Lagrange equation: let $$h(t)=f(t)+\delta g(t)$$ where $$g\in S:=\{G \in C^1[0,1] : g(0)=g(1)=0\}$$ and $$\delta$$ real number. We $$u[g](\delta)=\int_0^1 t (f(t)+\delta g(t))(f(f(t)+\delta g(t))+\delta g(f(t)+\delta g(t)))\,dt$$ Now the Euler-Lagrange equations is $$0=\frac{d}{d\delta}u[g](0)=\int_0^1 t \{ g'(t) f(f(t))+ f'(t) f'(f(t)) g(t)+f'(t) g(f(t)) \}\,dt=\int_0^1 t [f(f(t))g(t)]' \,dt+ \int_0^1 t f'(t) g(f(t)) \,dt.$$ Integrate by parts the first integral and substitute $$f(t)=x$$ to obtain $$-\int_0^1 f(f(t)) g(t)+\int_0^1 g(x) f^{-1}(x) dx=\int_0^1 g(t) \lvert f^{-1}(t)-f(f(t))\rvert\, dt \quad \forall g\in S.$$ An application of the fundamental lemma gives $$f^{-1}(t)=f(f(t)),\quad \text{that is} \quad t=f(f(f(t))).$$ By symmetry we can suppose $$t\leq f(t)$$ and since $$f$$ increases we obtain $$t\leq f(t)\leq f(f(t))\leq f(f(f(t))=t$$. Hence $$f(t)=t$$ is the unique critical point for the functional.

We can prove that $$f(t)=t$$ is indeed a maximum since $$u''[g](0) \leq - \alpha \int_0^1 g^2(t)\,dt$$ for some $$\alpha>0$$.

If we compute the second variation in $$\delta=0$$ in Flounderer's argument we obtain $$-2 \int_0^1 g^2(t)\, dt$$, namely the strongly concave condition with $$\alpha =2$$. We can make the argument rigorous using the approach above

• I am still confused why this argument says that $f(x)=x$ should give the maximum. It might just be a local maximum, right? When finding the maximum of a function on an interval we also have to check the boundary points. Is there an analogue to that here? – 83964 16 hours ago