# Means and inequalities for functions

A post on Monday looked at means an inequalities for a lists of non-negative numbers. This post looks at analogous means and inequalities for non-negative functions. We go from means defined in terms of sums to means defined in terms of integrals.

Let p(x) be a non-negative function that integrates to 1. (That makes p(x) a probability density, but you don’t have to think of this in terms of probability.) Think of p(x) as being a weighting function. The dependence on p(x) will be implicit. For a non-negative function f(x) and real number r ≠ 0, define Mr( f ) by

If r > 0 and the integral defining Mr( f ) diverges, we say Mr( f ) = ∞ and Mr( f ) = 0.

Define the geometric mean of the function f by

There are a few special cases to consider when defining G(f). See Inequalities for details.

First we give several limiting theorems.

• As r → –∞, Mr( f ) → min( f )
• As r → +∞, Mr( f ) → max( f )
• As r → 0+, Mr( f ) → G( f )

And now for the big theorem: If rs, then Mr( f ) ≤ Ms( f ).The conditions under which equality hold are a little complicated. Again, see Inequalities for details.

We could derive analogous results for infinite sums since sums are just a special case of integrals.

The assumption that the weight function p(x) has a finite integral is critical. We could change the definition of Mr( f ) slightly to accommodate the case that the integral of p(x) is finite but not equal to 1, and all the conclusions above would remain true. But if we allowed p(x) to have a divergent interval, the theorems do not hold. Suppose p(x) is constantly 1, and our region of integration is (0, ∞). Then Mr( f ) might be more or less than Ms( f ) depending on f. For example, let f(x) = b exp( – bx ) for some b > 0. M1( f ) = 1, but M( f ) = b. Then M1( f ) is less than or greater than M( f ) depending on whether b is less than or greater than 1.

# Means and inequalities

The arithmetic mean of two numbers a and b is (a + b)/2.

The geometric mean of a and b is √(ab).

The harmonic mean of a and b is 2/(1/a + 1/b).

This post will generalize these definitions of means and state a general inequality relating the generalized means.

Let x be a vector of non-negative real numbers, x = (x1, x2, x3…, xn). Define Mr( x ) to be

unless r = 0 or  r is negative and one of the xi is zero. If r = 0, define Mr( x ) to be the limit of Mr( x ) as r decreases to 0 . And if r is negative and one of the xi is zero, define Mr( x ) to be zero. The arithmetic, geometric, and harmonic means correspond to M1, M0, and M-1 respectively.

Define M( x ) to be the limit of Mr( x ) as r goes to ∞. Similarly, define M-∞( x ) to be the limit of Mr( x ) as r goes to –∞. Then M( x ) equals max(x1, x2, x3…, xn) and M-∞( x ) equals min(x1, x2, x3…, xn).

In summary, the minimum, harmonic mean, geometric mean, arithmetic mean and maximum are all special cases of Mr( x ) corresponding to r = –∞, –1, 0, 1, and ∞ respectively. Of course other values of r are possible; these five are just the most familiar. Another common example is the root-mean-square (RMS) corresponding to r = 2.

A famous theorem says that the geometric mean is never greater than the arithmetic mean. This is a very special case of the following theorem.

If r s then Mr( x ) ≤ Ms( x ).

In fact we can say a little more. If r < s then Mr( x ) < Ms( x ) unless x1 = x2 = x3 = …. = xn or s ≤ 0 and one of the xi is zero.

We could generalize the means Mr a bit more by introducing positive weights pi such that p1 + p2 + p3 + … + pn = 1. We could then define Mr( x ) as

with the same fine print as in the previous definition. The earlier definition reduces to this new definition with pi = 1/n. The above statements about the means Mr( x ) continue to hold under this more general definition.

For more on means and inequalities, see Inequalities by Hardy, Littlewood, and Pólya.

Update: Analogous results for means of functions, replacing sums with integrals. Also, physical examples of harmonic mean with springs and resistors.

Related post: Old math books