# Proof on showing $\frac{(b-a)}{2}(f(a) + f(b)) \leq \int_a^b f \leq (b-a) f(\frac{a+b}{2})$ for class $C^2$ function $f$

Given:

(a) function $f \in C^2$

(b) $f \geq 0$ and (c) $f'' \leq 0$ on $[a,b]$

Goal:

Show

$$\frac{(b-a)}{2}(f(a) + f(b)) \leq \int_a^b f \leq (b-a) f(\frac{a+b}{2})$$

To get an understanding of the problem, I tried specific function $f(x) = \sqrt x$ on interval $[ 1, 4 ]$

(1) For the first area (triangle with base $b-a$):

$\frac{(b-a)}{2}(f(a) + f(b))$ = $\frac{(4-1)}{2}(f(1) + f(4))$ = $\frac{9}{2}$

(2) For the second area (integral):

$\int_1^4 \sqrt x$ = $\frac{14}{3}$

I also tried adding up areas of sub-rectangles for this one, using right rectangles.

(3) For the third area = rectangle with length $b-a$ and width $f(\frac{a+b}{2})$ = $4.7$ (approximately)

So the conclusion clearly holds for this specific case.

But I have issue on how to generalize my example >_<

Well, by given information, I break function $f$ into 3 cases:

Case 1: If $f = 0$ i.e: zero function

Then there is nothing to prove, since area is always 0

Case 2: If $f = c$ i.e: constant function

Then the proof is quite easy, since all the 3 areas "shrink" down to be the area of the "big rectangle" with base $b-a$ and width $c$

Case 3: $f$ is convex or concave

This is the part that I don't know how to generalize what I found from my example.

My thoughts:

• When I do the first area, I'm dealing with a triangle, thus I'm going below (or exactly on) the function $f$

• When I do the second area, I'm thinking about the upper Darboux sum. Thus the sub-rectangles exceed the original curve by some little fractional area, namely the upper left of the rectangles

• When I do the third area, I'm also exceed the original curve by some fractional area, but I think this extra part is a bit more than the fractional areas formed by the sub-rectangles. Or thinking another way, if I double up this rectangle, I get an area which is way bigger than the other two areas.

But then... how should I generalize all these ideas ?

-

You already know that function is concave down ($f'' \leq 0$), therefore area of trapezoid is less than the integral.

$$\frac{(b-a)}{2}(f(a) + f(b)) \leq \int_a^b f$$

Now the second part: You can write the integral as: $$\int _{ a }^{ b }{ f } =\int _{ a }^{ (a+b)/2 }{ f } +\int _{ (a+b)/2 }^{ b }{ f }$$

The function is increasing ($f'\ge0$), therefore $$\int _{ (a+b)/2 }^{ b }{ f } \ge \int _{ a }^{ (a+b)/2 }{ f }$$

In the first middle the rectangle has bigger area: $$\\ \int _{ a }^{ (a+b)/2 }{ f } \le \left( \frac { a+b }{ 2 } -a \right) f\left( \frac { a+b }{ 2 } \right)$$ As a result: $$\\ 2\int _{ a }^{ (a+b)/2 }{ f } \le \int _{ a }^{ b }{ f } \le \left( b-a \right) f\left( \frac { a+b }{ 2 } \right)$$

-
Thank you so much! I didn't recognize the trapezoid >_< I viewed it as triangle and got stuck. –  Cecile May 21 '13 at 4:50
Are you assuming that the function is increasing? –  Sean Eberhard May 21 '13 at 8:43
Your final conclusion does not follow from the previous line. –  Sean Eberhard May 21 '13 at 8:47
Function is increasing or is a constant. I multiply both sides with 2 in the previous line and finally compare them with $\int _{ a }^{ b }{ f }$ –  nikamed May 21 '13 at 8:57
No, of course concave functions can be decreasing, e.g., $f(x) = 1-x$. You can observe the result is true with equality for linear functions, and therefore take $f$ to be increasing without loss of generality, but this seems irrelevant. The real issue is your final line. You seem to be using "$x\leq y$ and $x\leq z$ implies $y\leq z$", which is clearly bogus. –  Sean Eberhard May 22 '13 at 19:38

This is a nice application of the slogan "convex functions lie above their tangents and below their secants", or rather its mirror image "concave functions lie below their tangents and above their secants".

Specifically this slogan says that for any $x\in[a,b]$ we have

$\frac{f(a)(b-x) + f(b)(x-a)}{b-a}\leq f(x) \leq f\left(\frac{a+b}{2}\right) + f'\left(\frac{a+b}{2}\right)\left(x-\frac{a+b}{2}\right)$.

Integrating $x$ from $a$ to $b$ now gives the result.

-