Let $u(x)$ be a smooth function from $\mathbb{R}$ to $\mathbb{R}$. Suppose that for some real numbers $a,b$ with $a < b$ the following equality is true:

\begin{equation} \frac{1}{b-a} \int_a^b u(x) \ \rm{d} x = \frac{1}{u(a)-u(b)} \int_{u(b)}^{u(a)} x \ \rm{d} x. \end{equation}

I would like to prove that, if $f$ is a non-negative convex function from $\mathbb{R}$ to $\mathbb{R}$, then the following inequality holds:

\begin{equation} \frac{1}{b-a} \int_a^b f(u(x)) \ \rm{d} x \geq \frac{1}{u(a)-u(b)} \int_{u(b)}^{u(a)}f(x) \ \rm{d} x. \end{equation}

$\bf{EDIT}$: It is clear now that, as written, the above claim is false. A related question is for what class of functions $f$ is the stated inequality true?