5

In the lecture notes for a course I'm taking, the definition of a convex function is given as follows:

a function $f$ is convex if, for any $x_1$ and $x_2$, and for any $\alpha \in [0,1]$, $$\alpha f(x_1) + (1-\alpha)f(x_2) \ge f(\alpha x_1 + (1-\alpha ) x_2)$$

That is, if you draw a line segment between two points on the curve for this function, the function evaluated at any $x$ between $x_1$ and $x_2$ will be lower than the line segment.

Immediately after this definition is given, there is an exercise: "show that $f(x) = -\ln(x)$ is convex." Now, I happen to know that a function is convex if its second derivative is always greater than zero, so we can easily check the second derivative here to show that $-\ln(x)$ is convex (the second derivative is $\frac{1}{x^2}$, which is always greater than zero).

However, because of the way the exercise comes immediately after the "line segment" definition of convexity, without any mention of the second derivative test, I get the impression that it is possible to prove that $-\ln(x)$ is convex without using the second derivative test. I have attacked this problem many different ways, and I haven't been able to show convexity using only the line segment definition. Is this possible?

random_stuff
  • 175
  • 1
  • 7
  • You might find a useful answer here: http://math.stackexchange.com/questions/216705/prove-ax-x-logx-is-convex – Brenton Jan 29 '16 at 05:05
  • $g(\alpha)=RHS-LHS=0$ for $\alpha=0,1$. Show that $g'(\alpha)$ changes sign only once. – A.S. Jan 29 '16 at 05:48
  • @A.S. The OP is requesting no second derivatives. The approach you suggest is along an analogous line. In fact, we can use the weighted AM-GM and arrive at the result immediately. ;-)) - Mark – Mark Viola Jan 29 '16 at 05:50
  • @Dr.MV I am using only the first derivative ;) True to the letter - not the spirit. – A.S. Jan 29 '16 at 05:57
  • @A.S. Yes, I understand. And maybe this will suffice the OP's needs. It seemed that the OP was seeking a way that relied only on the definition as it states in the post that all that is given is the definition - nothing more. - Mark – Mark Viola Jan 29 '16 at 06:03
  • @Mark Of course weighted AM-GM is more in the spirit of the question and only uses continuity of functions - not touching differentiability at all. I just didn't think of it first. – A.S. Jan 29 '16 at 06:08

3 Answers3

9

It's convenient to apply the following result (see for example, Exercise $24$, Chapter $4$ of Rudin's Principles of Mathematical Analysis)

If $f$ is continuous in $(a, b)$ such that $$f\left(\frac{x + y}{2}\right) \leq \frac{1}{2}f(x) + \frac{1}{2}f(y)$$ for all $x, y \in (a, b)$, then $f$ is convex in $(a, b)$.

Notice that $(a, b)$ can be extended to $(0, +\infty)$.

Here, if $x, y \in (0, + \infty)$, by AM-GM inequality, $$-\ln\left(\frac{1}{2}x + \frac{1}{2}y\right) \leq -\ln(\sqrt{xy}) = \frac{1}{2}(-\ln x) + \frac{1}{2}(-\ln y).$$ Since $-\ln x$ is continuous in $(0, +\infty)$, the proof is complete.

Zhanxiong
  • 15,126
6

The Weighted AM-GM states

$$\lambda x+(1-\lambda)y\ge x^{\lambda}y^{1-\lambda}$$

Therefore, we have

$$\log(\lambda x+(1-\lambda)y)\ge \log(x^{\lambda}y^{1-\lambda})=\lambda \log(x)+(1-\lambda)\log(y)$$

Therefore the logarithm function is concave and its negative is convex.

Mark Viola
  • 184,670
4

Without the AGM nor the weighted AGM inequality. It suffices to consider the case $x> y$ and $a=\alpha \in (0,1).$ Take a fixed $y>0$ and a fixed $a\in (0,1)$ and for $x>0$ let $$g(x)=-a\log x- (1-a)\log y +\log (a x+(1-a)y).$$ We have $$g'(x)= \frac{dg(x)}{dx} = -\frac{a}{x} + \frac{a}{a x+(1-a) y} = \frac{a(1-a)(x-y)}{ax+(1-a)y}\cdot \frac {1}{x}.$$ Observe that $g'(y)=0$ and that $x>y\implies g'(x)>0.$ Therefore $$x>y\implies g(x)>g(y)=0.$$