TITLE: Relationship between $\int_a^b f(x)\,dx$ and $\int_a^bxf(x)\,dx$
QUESTION [9 upvotes]: I was working a problem, and came to a point where it would help greatly if there was a relationship between the following two expressions:
1) The numeric value of $\int_a^b f(x)\,dx$, and
2) The numeric value of $\int_a^bxf(x)\,dx$.
That is, if I know the numeric value for the first integral, but nothing about $f(x)$, is it possible to determine the numeric value for the second?
I've tried experimenting with integration by parts, but that always seems to need the indefinite integral of $F(x)$.
EDIT: In response to Calvin Lin's comment: I'm looking to compute the second integral, so equalities are the type of relationship that I'm looking for.
EDIT 2: In response to JoeHobbit's comment: The particular problem that I'm trying to solve is really this one here.  However, this sprung off some other thoughts, not necessarily tied to specific problems.

REPLY [4 votes]: For estimation if $f(x)$ is non-decreasing and non-negative, Steffensen's inequality came into my mind:
$$
\int_{b - k}^{b} f(x) \, dx \leq \int_{a}^{b} f(x) g(x) \, dx \leq \int_{a}^{a + k} f(x) \, dx,$$
where $g: [a,b]\to [0,1]$ is integrable, and $k = \int^a_b g(x) \,dx$. So we can let $g(x) = (x-a)/(b-a)$, then $k = (b-a)/2$:
$$
\int_{(b+a)/2}^{b} f(x) \, dx \leq \int_{a}^{b} f(x) \frac{x-a}{b-a} \, dx \leq \int_{a}^{(b+a)/2} f(x) \, dx,$$
which gives us the bound:
$$
b\int_{m}^{b} f(x)\, dx  + a\int_{a}^{m} f(x) \, dx \leq \int_{a}^{b} xf(x)  \, dx \leq b\int_{a}^{m} f(x) \, dx + a\int_{m}^{b} f(x)\, dx,$$
where $m$ is the midpoint of $[a,b]$. Above bound is sharper than Cauchy-Schwarz by looking at the error term of Steffensen. For the curious, if $f(x)$ is a polynomial, above bound is very very sharp. The bound also implies, if $f(x)$ is not changing very fast on the interval, then
$$
\frac{a+b}{2}\int^b_a f(x) \,dx 
$$
is a very good approximation to the integral (Midpoint rule in disguise...).
For general $f(x)$, I don't know if there is any good method on estimating the first moment based on the zeroth moment...