$xf(y)+yf(x)\leq 1$ for all $x,y\in[0,1]$ implies $\int_0^1 f(x) \,dx\leq\frac{\pi}{4}$

I want to show that if $f\colon [0,1]\to\mathbb{R}$ is continuous and $xf(y)+yf(x)\leq 1$ for all $x,y\in[0,1]$ then we have the following inequality: $$\int_0^1 f(x) \, dx\leq\frac{\pi}{4}.$$

The $\pi$ on the right hand side suggests we have to do something with a geometric function. Letting $f(x) = \frac{1}{1+x^2}$ we have equality but this function does not satisfy $xf(y)+yf(x)\leq 1$.


Let $I = \displaystyle\int_{0}^{1}f(x)\,dx$.

Substituting $x = \sin \theta$ yields $I = \displaystyle\int_{0}^{\pi/2}f(\sin \theta)\cos\theta\,d\theta$.

Substituting $x = \cos \theta$ yields $I = \displaystyle\int_{0}^{\pi/2}f(\cos \theta)\sin\theta\,d\theta$.

Hence, $I = \dfrac{1}{2}\displaystyle\int_{0}^{\pi/2}\left[f(\sin \theta)\cos\theta+f(\cos\theta)\sin\theta\right]\,d\theta \le \dfrac{1}{2}\displaystyle\int_{0}^{\pi/2}1\,d\theta = \dfrac{\pi}{4}$.


$$\int \limits _0 ^1 f(x) \Bbb d x = \frac 1 2 \int \limits _0 ^1 f(x) \Bbb d x + \frac 1 2 \int \limits _0 ^1 f(y) \Bbb d y = - \frac 1 2 \int \limits _{\frac \pi 2} ^0 f(\cos t) \sin t \Bbb d t + \frac 1 2 \int \limits _0 ^{\frac \pi 2} f(\sin t) \cos t \Bbb d t \le \frac 1 2 \cdot \frac \pi 2$$