Skip to content
ISEGORIABenjamin Haire

Daily Mathematics / Solutions

Solution for 27 October 2026

The card that day was an original math olympiad problem. Try it first; the solution is folded away below.

Math Olympiad problem

A function against its inverse

Card: A function against its inverse

Let \(f\colon[0,1]\to[0,1]\) be continuous and strictly increasing, with \(f(0)=0\) and \(f(1)=1\). Find the largest possible value of

\[\int_0^1 f(x)\,f^{-1}(x)\,dx,\]

and determine every \(f\) that attains it.

Show the solution

Write \(g=f^{-1}\) and \(I=\int_0^1 f(x)g(x)\,dx\). Then \(g\) is also a continuous strictly increasing bijection of \([0,1]\). The answer is \(I_{\max}=\tfrac13\), attained only by \(f(x)=x\).

Why the obvious routes fail. AM-GM gives \(fg\le\tfrac12(f^2+g^2)\), and since \(\int_0^1 g^2=1-2\int_0^1 xf(x)\,dx\) this becomes \(I\le\tfrac13+\tfrac12\int_0^1(f(x)-x)^2\,dx\), which points the wrong way. Cauchy-Schwarz gives \(I^2\le\int f^2\int g^2\), but that product can exceed \(\tfrac19\) (about \(0.144\) for a suitable piecewise linear \(f\)). Rearrangement settles the discrete analogue for permutations at once, but here \(f(X)\) and \(g(X)\) do not have the same distribution, so it says nothing. A new idea is needed.

Step 1: the integral is a probability. Let \(X,Y,Z\) be independent and uniform on \([0,1]\). For fixed \(x\), \(g(Y)<x\) holds exactly when \(Y<f(x)\), so \(\Pr(g(Y)<x)=f(x)\); and \(\Pr(Z<g(x))=g(x)\). Conditioning on \(X\) and using independence,

\[I=\Pr\bigl(g(Y)<X\ \text{and}\ Z<g(X)\bigr).\]

Step 2: three rotated events. Introduce the three comparisons \(r_1=[g(Y)<X]\), \(r_2=[g(X)<Z]\), \(r_3=[g(Z)<Y]\). Up to a null set (ties have probability zero), the event of Step 1 is \(A=\{r_1\ \text{true},\ r_2\ \text{false}\}\). Applying the relabelling \(X\to Y\to Z\to X\), which does not change the joint law of \((X,Y,Z)\), turns \(A\) into \(B=\{r_3\ \text{true},\ r_1\ \text{false}\}\), and once more into \(C=\{r_2\ \text{true},\ r_3\ \text{false}\}\). Hence \(\Pr(A)=\Pr(B)=\Pr(C)=I\).

The three events are pairwise disjoint: \(A\) needs \(r_1\) true and \(B\) needs it false; \(B\) needs \(r_3\) true and \(C\) needs it false; \(C\) needs \(r_2\) true and \(A\) needs it false. Therefore \(3I=\Pr(A\cup B\cup C)\le 1\), that is, \(I\le\tfrac13\).

More precisely, a triple of truth values lies outside \(A\cup B\cup C\) exactly when \(r_1=r_2=r_3\): if \(r_1\) is true, avoiding \(A\) forces \(r_2\) true and then avoiding \(C\) forces \(r_3\) true; if \(r_1\) is false, avoiding \(B\) forces \(r_3\) false and then avoiding \(C\) forces \(r_2\) false. So, for every admissible \(f\),

\[I=\frac{1-\Pr(r_1=r_2=r_3)}{3}.\]

Step 3: the identity attains the bound. For \(f(x)=x\), all three comparisons true would mean \(Y<X<Z<Y\), which is impossible, and all false would mean \(Y\ge X\ge Z\ge Y\), a null event. So \(I=\tfrac13\), as also follows from \(\int_0^1x^2\,dx\).

Step 4: no other function attains it. If \(f\) is not the identity, neither is \(g\), so \(g(t)\ne t\) for some \(t\in(0,1)\). Suppose \(g(t)<t\) and put \(\varepsilon=(t-g(t))/3\). By continuity choose \(\delta\in(0,\varepsilon)\) with \(|g(u)-g(t)|<\varepsilon\) for \(|u-t|<\delta\), and with \((t-\delta,t+\delta)\subset[0,1]\). Then for \(u,v\) in this interval, \(g(u)<g(t)+\varepsilon=t-2\varepsilon<t-\delta<v\). So whenever \(X,Y,Z\) all fall in the interval, all three comparisons are true, and \(\Pr(r_1=r_2=r_3)\ge(2\delta)^3>0\). If \(g(t)>t\) the same argument shows \(g(u)>v\) for \(u,v\) near \(t\), so all three comparisons are false on a set of positive probability. Either way \(I<\tfrac13\).

Conclusion. The largest value is \(\tfrac13\), and it is attained only by \(f(x)=x\). For comparison, \(f(x)=x^a\) gives \(1/(a+1/a+1)\), and the infimum over all admissible \(f\) is \(0\) (not attained).

Check. A random search over 3000 piecewise linear increasing bijections never exceeded \(0.33333\), with the best near the identity; the exact identity \(I=(1-\Pr(r_1=r_2=r_3))/3\) was confirmed by Monte Carlo with \(4\times10^6\) samples for four random \(f\) (agreement within \(3\times10^{-4}\)); and the power family matched \(1/(a+1/a+1)\) by quadrature.

Answer. \(\displaystyle \max\int_0^1 f\,f^{-1}=\tfrac13\), attained only by \(f(x)=x\).

All solutions · 日本語