If $\sum^n_{i=1}{f(a_i)} \leq \sum^n_{i=1}{f(b_i)}$. Then $\sum^n_{i=1}{\int_0^{a_i}{f(t)dt}} \leq \sum^n_{i=1}{\int_0^{b_i}{f(t)dt}}$? I have been puzzling over this for a few days now.  (It's not homework.) Suppose $f$ is a positive, non-decreasing, continuous, integrable function. Suppose there are two finite sequences of positive real numbers $\{a_i\}$ and $\{b_i\}$ where
$$\sum^n_{i=1}{f(a_i)} \leq \sum^n_{i=1}{f(b_i)}.$$
Is it true that
$$\sum^n_{i=1}{\int_0^{a_i}{f(t)dt}} \leq \sum^n_{i=1}{\int_0^{b_i}{f(t)dt}}$$
If the answer is no, does it improve things if $f$ is convex?

The answer is no, even for convex functions. Let $f(t)=(t)^+$ (the positive part of $t$). Then $f$ is convex, the first inequality means that $a_1+\cdots+a_n\le b_1+\cdots+b_n$, the second inequality means that $a_1^2+\cdots+a_n^2\le b_1^2+\cdots+b_n^2$. As soon as $n\ge2$, the former cannot imply the latter.
