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.
 A: 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.
A: 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
A: 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$
A: 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<f(x)\}}dxdu=\int_0^1 f(u)(1-f^{-1}(u))du,$$ 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.$$
