# Multivariate inequality of floor function

Define $$f(x,a) := (2x-a)\lfloor\frac{x}{a}\rfloor-a\lfloor\frac{x}{a}\rfloor^2.$$ It seems that $$f(x,a)+f(x,b)\geq 2f(x,c),\forall a,b \in [1,x],a+b=2c.$$

I have written a program that has checked this equality for $$x \leq 1000$$

however, I have struggled with this inequality for many days and found no research papers involving multivariate inequality of floor function ( only basic properties )

Any help is appreciated

For $$1 \le a \le x$$ is $$f(x, a) = x \cdot g\left( \frac a x\right)$$ where $$g$$ is defined as $$g(u) = (2-u) \left\lfloor \frac 1u \right\rfloor - u \left\lfloor \frac 1u \right\rfloor ^2$$ for $$0 < u \le 1$$. It is a straightforward calculation to show that $$g$$ is convex (it is continuous, piecewise linear, with non-decreasing slope).
• @HaoHuang: As I said: The function is continuous, piecewise linear, with non-decreasing slope. Or to put it differently: The function is continuous, and differentiable everywhere except at the points $u=1/n$, and the derivative is non-decreasing. That is sufficient to prove convexity. Commented Apr 30, 2022 at 14:30