You are on page 1of 7

New Zealand Mathematical Olympiad Committee

Convex Functions
Heather Macbeth

1 Introduction
This lecture is about three tricks, two theorems, and one idea. The idea is that of convex functions. We
formulate this idea more precisely for a function f on an interval I (this can be closed or open, bounded or
unbounded) as follows:
Definition. A function f : I R is convex, if for all x, y I and all [0, 1],

f (x) + [1 ]f (y) f (x + [1 ]y) .

(a) convex (b) not convex

Figure 1: Functions

For example, lets show that the function f (x) = 1/x is convex. Indeed, for any x, y (0, ) and [0, 1],
(x y)2 0 and hence

(y + [1 ]x) (x + [1 ]y) = xy + [1 ](x y)2 xy,

which means
1 1 y + [1 ]x 1
+ [1 ] = .
x y xy x + [1 ]y
Exercise 1. Let f : I R be a convex function. Show that for all x, y I and all R \ [0, 1] such that
x + [1 ]y I,
f (x) + [1 ]f (y) f (x + [1 ]y) .
Exercise 2 (Jensens inequality). Let f : I R be a convex function. Show that for any integer n, any real
numbers x1 , x2 , . . . xn I, and any positive real numbers 1 , 2 , . . . n such that 1 + + n = 1,

1 f (x1 ) + 2 f (x2 ) + + n f (xn ) f (1 x1 + 2 x2 + + n xn ) .

1
Among the nice consequences of Jensens inequality are the power mean inequalities. For instance, the AM-HM
inequality is obtained by setting f (x) = 1/x and 1 = = n = n1 : for all x1 , . . . xn (0, ),
x1 + x2 + + xn n
1 1 .
n x1 + + xn

You may have encountered the following related geometrical concept:


Definition. A set A R2 of points in the plane is convex, if for all x, y A and all [0, 1],
x + [1 ]y A.

(a) convex (b) convex (c) not convex

Figure 2: Shapes

How are these concepts related? A function f : R R is convex precisely if the region above its graph is
convex.

2 Not everyone is below average


Theorem 1. A convex function on a closed bounded interval attains its maximum at one of its endpoints.

Proof. Suppose f : [a, b] R is strongly convex. Then for any t [a, b], taking x, y, to be a, b, (b t)/(b a)
respectively, we find
        
bt bt bt bt
f (t) = f a+ 1 b f (a) + 1 f (b).
ba ba ba ba
That is, f (t) is at most some weighted average of f (a) and f (b). This means that at least one of f (a) and f (b)
is greater than or equal to f (t):
   
bt bt
f (t) f (a) + 1 f (b)
ba ba
   
bt bt
+ 1 max [f (a), f (b)]
ba ba
= max [f (a), f (b)] .
It follows that
max f (t) = max[f (a), f (b)].
t[a,b]

2
The idea here is:

If the average of a set of numbers is m, then at least one of the numbers is at least m.

The Pigeonhole Principle is another version of this same trick.

Exercise 3. Show that there is some pair of Londoners, who have the same number of hairs on their heads.
Exercise 4 (APMO 2002). Let a1 , a2 , . . . an be natural numbers, and set
a1 + + an
A= .
n
Show that
a1 !a2 ! an ! (bAc!)n .

3 Iterate and pad


The rest of these notes are a diversion into the land of midpoint-convex functions.
Definition. The function f : I R is midpoint-convex, if for all x, y I,
 
f (x) + f (y) x+y
f .
2 2

Clearly convexity implies midpoint-convexity. However, there exist midpoint-convex functions that are not
convex. Such functions can be very strange and interesting. We will explore this distinction further in the next
section.
In this section, we will prove a version of Jensens inequality for midpoint-convex functions. We need a much
cleverer argument here than we did for standard Jensens in the previous section. Heres the idea, a variant of
standard induction:

Suppose that we are given a sequence S1 , S2 , . . . of statements and an increasing sequence


a1 , a2 , . . . of natural numbers, and that
1. S1 is true;

2. if Sak is true then Sak+1 is true; and,


3. if Sn is true, then for all m < n, Sm is also true.
Then Sn is true for all n.

Theorem 2. Let f : I R be a midpoint-convex function. Then for any integer n and any real numbers
x1 , x2 , . . . xn I,  
f (x1 ) + f (x2 ) + + f (xn ) x1 + x2 + + xn
f .
n n

Proof. We are given a midpoint-convex function f : I R. Let Sn be the statement,

For any real numbers x1 , x2 , . . . xn I,


 
f (x1 ) + f (x2 ) + + f (xn ) x1 + x2 + + xn
f .
n n

3
S1 says that f (x1 ) f (x1 ) for all x1 I, and this is certainly true.
For the second step, suppose that S2k is true. Well deduce S2k+1 by applying the definition of midpoint-
convexity to two copies of S2k . Indeed, take any real numbers x1 , x2 , . . . x2k+1 I; then

f (x1 ) + f (x2 ) + + f (x2k+1 )


 2k+1  
x1 +x2 ++x2k x2k +1 +x2k +2 ++x2k+1
f 2k
+f 2k

 2 
x1 + x2 + + x2k+1
f .
2k+1

Finally, suppose that Sn is true. Well show that Sm is true for all m n, by applying Sn to some m variables
x1 , . . . xm I that we care about, plus n m copies of the filler variable
x1 + + xm
X= .
m
Indeed, Sn gives
 
f (x1 ) + f (x2 ) + + f (xm ) + (n m)f (X) x1 + x2 + + xm + (n m)X
f .
n n

Simplifying the left-hand side,

f (x1 ) + f (x2 ) + + f (xm ) + (n m)f (X)


n  
f (x1 ) + f (x2 ) + + f (xm ) nm
= + f (X).
n n

In the right-hand side bracket,

x1 + x2 + + xm + (n m)X
n  
x1 + x2 + + xm nm
= + X
n n
 
m nm
= + X = X.
n n

Substituting back, multiplying by n/m and subtracting a term, we get


 
f (x1 ) + f (x2 ) + + f (xm ) x1 + + xm
f (X) = f .
m m

Exercise 5. A sequence a0 , a1 , a2 . . . of whole numbers is given, such that for any whole number k, there is
exactly one pair i, j of whole numbers for which ai + 2aj = k. Find all possible values for a2009 .
Exercise 6. For each natural number n, define rad (n) to be the product of the primes which divide n. Pick
some natural number a, and define a sequence a0 = a, a1 , a2 , . . . by the recurrence

an+1 = an + rad (an ).

Show that the sequence contains arbitrarily long arithmetic progressions.

4
4 Approximation by rationals
In this section, well explore some situations in which midpoint-convexity does imply convexity.
So assume f is midpoint-convex. First, for any 0 k n, applying Theorem 2 to the n real numbers
x1 = x2 = = xk = x, xk+1 = = xn = y gives
kf (x) + [n k]f (y)
f (kx + [n k]f (y));
n
that is,      
k k k k
f (x) + 1 f (y) f x+ 1 y .
n n n n
So midpoint-convexity implies that for all x, y I and all rational [0, 1],

f (x) + [1 ]f (y) f (x + [1 ]y).

Going further requires a new tool approximation of reals by rationals which is based on the following fact:

The rationals are dense in the line.

More precisely, for any real number x R and any real  > 0, there is a rational number Q for which
|x | < . Equivalently, for any real number x R, there is a sequence (j )jN Q of rational numbers with
limit x.
For a quick justification, note that we can approximate, say, , by its sequence 3, 3.1, 3.14, 3.141, . . . of
truncated decimal representations, in which the j-th term differs by at most 10j1 from . Of course, there are
many other sequences of rationals with limit .

Now well show that either of two quite natural conditions on a midpoint-convex function imply convexity. The
first is boundedness.
Lemma 3. If f : I R is midpoint-convex and bounded above, then it is convex.

Proof. Ross Atkins showed me this. Let f be bounded above by M . Take any x, y I. Without loss of
generality, x < y. For shorthand, for any real number , write t for the expression x + [1 ]y.
Suppose for the sake of contradiction that for some ,

f (t ) > f (x) + [1 ]f (y).

Say that
f (t ) f (x) [1 ]f (y) = h,
where h > 0. Choose n N big enough that M min[f (x), f (y)] < nh. Let a R be any real number for which

1. a is rational; and,
2. a is small enough (in absolute value) that a and + na are in [0, 1].

Since the rationals are dense in the line, such an a exists.


Then    
1 n
t+na + ta = t ,
n+1 n+1
and so by Jensens inequality
   
1 n
f (t+na ) + f (ta ) f (t );
n+1 n+1

5
that is,

f (t+na ) (n + 1)f (t ) nf (ta )


= (n + 1) (f (x) + [1 ]f (y) + h) nf (ta ).

Also since a is rational,


f (ta ) ( a)f (x) + [1 ( a)]f (y).

Combining the last two equations gives

f (t+na ) ( + na)f (x) + [1 ( + na)]f (y) + (n + 1)h


min[f (x), f (y)] + (n + 1)h
> M,

a contradiction. Hence the convexity condition must hold for all .

The other condition in question is continuity; that is:


Definition. A function f : I R is continuous, if for all convergent sequences (xj )jN I,

lim f (xj ) = f ( lim xj ).


j j

Lemma 4. If f : I R is midpoint-convex and continuous, then it is convex.

Proof. Let f : I R be midpoint-convex and continuous. Since the rationals are dense in the line, we can
choose a sequence (j )jN [0, 1] of rational numbers with limit . Let us do so. Then

x + [1 ]y = lim [j x + [1 j ]y]
j

and
f (x) + [1 ]f (y) = lim [j f (x) + [1 j ]f (y)] .
j

So if f is continuous, then we can conclude that

f (x) + [1 ]f (y) = lim [j f (x) + [1 j ]f (y)]


j
lim f (j x + [1 j ]y)
j
= f ( lim [j x + [1 j ]y])
j
= f (x + [1 ]y).

That is, f is convex.


Exercise 7. Find all continuous functions f : R R, such that for all x, y R,

f (x) + f (y) = f (x + y).

Exercise 8. Find all functions f : R R, which are bounded above on some interval, and which for all x, y R
satisfy
f (x) + f (y) = f (x + y).
Exercise 9. Construct an increasing function f : Q+ Q+ , so that for all x Q+ ,

f (f (x)) = 3x.

6
5 Problems
1. (IMO 2004) Let n 3 be an integer. Let x1 , x2 , . . . xn be positive real numbers such that
 
2 1 1 1
n + 1 > (x1 + x2 + + xn ) + + + .
x1 x2 xn

Show that xi , xj , xk are side lengths of a triangle for all i, j, k with 1 i < j < k n.
2. (All-Union Olympiad 1978) Real numbers x1 , x2 , . . . xn lie on the segment [a, b], where 0 < a < b. Prove
that
(a + b)2 2
 
1 1 1
(x1 + x2 + + xn ) + + + n .
x1 x2 xn 4ab

April 9, 2010
http://www.mathsolympiad.org.nz

You might also like