# Homework Help: Convexity of functions

1. Dec 13, 2006

### barksdalemc

1. The problem statement, all variables and given/known data
Let f be differentiable on (a,b). Show that f is convex if and only if for every x,y in (a,b), f(y)-f(x)>= (y-x)f'(x)

3. The attempt at a solution
The mean value theorem says that there exists an x' in (a,b) such that f'(x') is the average rate of change of the functions. So I have the equation for that tangent line. I am stuck there.

2. Dec 13, 2006

### StatusX

There's two directions to prove, so which one are you asking about? And what is the definition of a convex function?

3. Dec 13, 2006

### barksdalemc

If I prove one direction, is the proof in the other direction just the logic going the other way? In any case, let's say I want to show it is convex given for every x,y in (a,b), f(y)-f(x)>= (y-x)f'(x)

4. Dec 13, 2006

### HallsofIvy

I'm not sure what you mean here. You want to prove that the straight line between (a,f(a)) and (b,f(b)), which is y= (f(b)-f(a))/(b-a) (x- a)+ f(a) lies above the curve y= f(x). That is, that (f(b)-f(a))/(b-a) (x- a)+ f(a)> f(x) for all x between a and b.

Good heaven's no! There are plenty of theorems that are true in one direction but false in the other!

5. Dec 13, 2006

### StatusX

That's certainly not true in general. If we stick to the direction you mentioned, you can rearrange and get:

$$f(x) \geq f(x_0) + f'(x_0)(x-x_0)$$

Or in other words, f lies above every line tangent to f. From here it's easy to show the function is convex, it's just a matter of plugging in to the defintion (which I'm not going to copy for you). The other direction will be a little harder.

6. Dec 13, 2006

### barksdalemc

Halls of Ivy,

I meant for theorems which state if and only if. Are there if and only if statements where the logic cannot backwards?