# convex functions and geometic mean

every convex function $f$ preserves arithmetic mean: $f(\frac{x+y}{2})\le\frac{f(x)+f(y)}{2}$, this is a particular case of the convexity condition.

Does convex function $f$ preserve geometic mean: $f(\sqrt{xy})\le\sqrt{f(x)f(y)}$ ? (of course here $f\colon(0,\infty)\to(0,\infty)$)

the answer is no, but there is no increasing function among counterexampes I know.

so the question is: does every increasing convex function $f\colon(0,\infty)\to(0,\infty)$ preserve geometic mean?

In general, you have exact equality if the function is of the form $x^\alpha$ for some $\alpha >1$. So, every function that increases slower than an exponential type function is a good candidate: for example, choose $f(t)=t \ln(t+1)$. This works because $\sqrt{f(x)f(y)} = \sqrt{xy}\sqrt{\ln(x+1)\ln(y+1)}$ and $f(\sqrt{xy}) = \sqrt{xy} \ln(\sqrt{xy}+1)>\sqrt{xy}\ln(\sqrt{xy}) = \sqrt{xy}{\ln x + \ln y\over 2}$. So the result follows from the arithmetico-geometric inequality for $x$ and $y$ sufficiently large.

Let $f$ be an increasing convex function. $$\sqrt{xy}\le \frac{x+y}{2}\implies f(\sqrt{xy})\le f\left(\frac{x+y}{2}\right)\le \frac{f(x)+f(y)}{2}$$ Now, if we define $g(x)=e^{f(x)}$, then $g$ has the property that $$g(\sqrt{xy})\le \sqrt{g(x)g(y)}$$ Now, $g$ is increasing and $g'(x)=f'(x)g(x)\implies g''(x)=f''(x)g(x)+f'(x)g'(x)>0\implies g$ is convex. Thus $g$ is an increasing convex function that has the desired property.

So, for example, if we take $f(x)=x^2$, then $g(x)=e^{x^2}\implies g(\sqrt{xy})=e^{xy}\le e^{(x^2+y^2)/2}=\sqrt{g(x)g(y)}$ as desired.

So every convex function of the form $e^{f(x)}$ where $f$ is a convex increasing function preserves geometric mean.

• Nice observation. – Michael Feb 11 '15 at 17:25

The condition is equivalent to $g(t) = \ln (f(e^t))$ being convex. Assuming twice differentiability, and with $x = e^t$, we get $$g''(t) = \dfrac{f''(x) x^2}{f(x)} + \dfrac{f'(x) x}{f(x)} - \dfrac{f'(x)^2 x^2}{f(x)^2}$$ For a counterexample it suffices to have (at some point) $f''(x) = 0$ with $f'(x) x > f(x) > 0$. For example, $f(x) = x - 1$ would do for $x > 1$.
To make $f$ convex, increasing and positive on $(0,\infty)$, take $f(x) = \max(\epsilon x, x - 1)$ for some $\epsilon \in (0,1)$.

EDIT: We can then show directly: if $y - 1 > \epsilon y$ and $y < x$, $f(\sqrt{xy}) = \sqrt{xy} - 1 > \sqrt{f(x) f(y)} = \sqrt{(x-1)(y-1)}$ since $\sqrt{xy} > 1$ and $$(\sqrt{xy}-1)^2 = (x-1)(y-1) + (\sqrt{x}-\sqrt{y})^2 > (x-1)(y-1)$$

Counterexample: Take any convex increasing function $f:(0,1)\rightarrow (0,1)$ that satisfies:

\begin{align} &f(1) = 0.1\\ &f(2) = 1 \\ &f(4) = 3 \end{align}

Then $f(\sqrt{1}\sqrt{4}) > \sqrt{f(1)f(4)}$ because $1 > \sqrt{0.3}$. You can get such a function by assuming $f(0)=0$ and filling in peicewise linearly. Note that the slopes over the intervals $(0,1]$, $[1,2]$, $[2,\infty)$ are $0.1, 0.9, 1$, respectively, and so the function $f(x)$ is indeed convex increasing.