1

A function is convex if $(1-t)f(x_1)+tf(x_2)\ge f((1-t)x_1+tx_2)$ for $t \in [0,1]$, which is odd because I was taught (very young age) that concave shapes were like caves, they go inwards. Convex was the other one.

A bucket shaped curve, say $x^2$, is convex by this definition.

Now I remember reading a combinatorial optimisation book and that had a good reason for convex functions looking concave but I have forgotten what it was, can someone remind me, or give an alternative reason?

I am looking this up because a proof I saw used the "fact $y=\ln(x)$ is concave" and I cannot prove this. I've tried but I can't get anywhere meaningful (for example $(1-t)\ln(x_1)+t\ln(x_2)=\ln(x_1^{1-t}x_2^t)$ not sure how to get from there to $\le\ln((1-t)x_1+tx_2)$

ViktorStein
  • 5,024
Alec Teal
  • 5,590

2 Answers2

3

Statement 1: Let $f$ be twice differentiable. Then $f:\mathbb{R}\rightarrow\mathbb{R}$ is convex iff for all $x\in \mathbb{R}$ $$f''(x)\ge0.$$ Proof: Suppose $f$ convex. As $f$ is convex, for all $t\in(0,1]$ and for all $x,y\in\mathbb{R}$ holds, $$f(x+t(y-x))=f(ty+(1-t)x)\le tf(y)+(1-t)f(x),$$ we have, $$t(f(y)-f(x))\ge f(x+t(y-x))-f(x).$$ So, $$f(y)-f(x)\ge\lim_{t\rightarrow0^{+}}\frac{f(x+t(y-x))-f(x)}{t}=f'(x)(y-x),$$ i.e., \begin{equation} f(y)-f(x)\ge f'(x)(y-x).\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(1) \end{equation} By Taylor formula and by $(1)$, replace $y$ by $x+t(y-x)$, $x\neq y$, $t\in(0,1]$, we have $$0\le f(x+t(y-x))-f(x)-tf'(x)(y-x)=\frac{t^{2}}{2}f''(x)(y-x)^{2}+o(t^{2}).$$ Dividing for $t^{2}$ e making $t\rightarrow 0^{+}$ we have, $$f''(x)\ge0.$$ Now suppose $f''(x)\ge0$ for all $x\in\mathbb{R}.$ By fundamental theorem of calculus, for all $x, y\in\mathbb{R}$, $$f'(y)-f'(x)=\int_{0}^{1}f''(x+t(y-x))(y-x)dt$$, then $$(f'(y)-f'(x))(y-x)=\int_{0}^{1}f''(x+t(y-x))(y-x)^{2}dt\ge 0,$$ therefore $(f'(y)-f'(x))(y-x)\ge 0$ for all $x,y\in\mathbb{R}$. So, again by fundamental theorem of calculus, $$f(y)-f(x)=\int_{0}^{1}f'(x+t(y-x))(y-x)dt$$ and $$f(y)-f(x)-f'(x)(y-x)=\int_{0}^{1}f'(x+t(y-x))(y-x)dt-f'(x)(y-x)$$ $$f(y)-f(x)-f'(x)(y-x)=\int_{0}^{1}[f'(x+t(y-x))(y-x)-f'(x)(y-x)]dt$$ $$f(y)-f(x)-f'(x)(y-x)=\int_{0}^{1}{[f'(x+t(y-x))-f'(x)](y-x)}dt\ge0,$$ then \begin{equation} f(y)-f(x)\ge f'(x)(y-x)\,\,\,\,\,\,\,(2) \end{equation} for all $x, y\in\mathbb{R}$. So, we have, for all $t\in[0,1]$, $$f(x)\ge f(x+t(y-x))-tf'(x+t(y-x))(y-x)$$ and $$f(y)\ge f(x+t(y-x))-(1-t)f'(x+t(y-x))(y-x),$$ we use $(2)$ to the points $x$ and $x+t(y-x)$; $y$ and $x+t(y-x)$ points respectively. Multiplicand the first inequality by $1-t$ and the second inequality by $t$ and adding both, we have, $$(1-t)f(x)+tf(y)\ge f((1-t)x+ty),$$ for all $x,y\in\mathbb{R}$ and for all $t\in[0,1]$. Therefore $f$ is convex.

VJunior
  • 807
0

There is a condition: $f$ is convex iff $f''(x)\ge0$ and $f$ is concave iff $f''(x)\le0$. So, if $f(x)=\ln x$, then $f'(x)=\frac{1}{x}$ and $f''(x)=-\frac{1}{x^{2}}\le0$. Therefore $\ln x$ is a concave function.

idpd15
  • 2,012
  • 1
  • 18
  • 40
VJunior
  • 807