Show that $\int_0^3 xf(x)dx \leq 2\int_0^3 f(x)dx$ when $f(0) \geq 0$ and $f''(x) \leq 0 $ Show that $\int_0^3 xf(x)dx \leq 2\int_0^3 f(x)dx$
when $f(0) \geq 0$ and $f''(x) \leq 0$
$f$ is from $\mathbb R$ to $\mathbb R$ and $f$ is twice differentiable and $f''$ is continuous.
I am pretty sure I need to use the mean value theorem for integral but really don't know where to start.
Can someone help me?
 A: $f$ is concave with $f(0) \ge 0$, so that for $0 < t < x$
$$
 f(t) \ge \frac{x-t}{x}f(0) + \frac{t}{x}f(x) \ge \frac{t}{x}f(x) \, .
$$
It follows that $F(x) = \int_0^x f(t) \, dt$ satisfies
$$
 F(x) \ge \int_0^x \frac{t}{x}f(x) \, dt = \frac 12 x f(x) \, .
$$
for all $x \ge 0$. (If $f$ is non-negative then this estimate can be interpreted graphically: The graph of $f$ lies above the line joining the origin with the point $(x, f(x))$, so that the area under the graph is larger than the area of the triangle under that line.)
Now we can do integration by parts: For $a > 0$ is
$$
 \int_0^a x f(x) \, dx = aF(a) - \int_0^a F(x) \, dx 
\le  aF(a) - \frac 12\int_0^a  x f(x) \, dx
$$
so that
$$
 \int_0^a x f(x) \, dx \le  \frac 23 aF(a) = \frac 23 a \int_0^a f(x) \, dx \, .
$$
Setting $a=3$ gives the desired inequality. Equality holds if and only if $f(0) = 0$ and $f$ is linear on $[0, a]$.
The above approach uses only the concavity of $f$ and $f(0) \ge 0$, the existence of the first or second derivative of $f$ is not needed.

An alternative approach would be to consider the function
$$
 h(a) = \frac 23 a \int_0^a f(x) - \int_0^a x f(x) \, dx
$$
for $a \ge 0$. Differentiation gives
$$
 h'(a) = \frac 23 \int_0^a f(x) \, dx - \frac 13 a f(a) \, , \\
h''(a) = \frac 13 f(a) - \frac 13 a f'(a) 
$$
and finally
$$
h'''(a) = -\frac 13 a f''(a) \ge 0 \, .
$$
Now go backwards and conclude that $h''$, $h'$, and finally $h$ are all increasing and non-negative.
