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?