Convex function

Revision as of 21:21, 8 April 2007 by Boy Soprano II (talk | contribs) (People! Not all functions are twice differentiable!!!)

A function $f: I \mapsto \mathbb{R}$ for some interval $\displaystyle I \subseteq \mathbb{R}$ is convex (sometimes written concave up) over $\displaystyle I$ if and only if the set of all points $\displaystyle (x,y)$ such that $\displaystyle y \ge f(x)$ is convex. Equivalently, $\displaystyle f$ is convex if for every $\lambda \in [0,1]$ and every $x,y \in I$,

$\displaystyle \lambda f(x) + (1-\lambda)f(y) \ge f\left( \lambda x + (1-\lambda) y \right)$.

Usually, when we do not specify $\displaystyle I$, we mean $I = \mathbb{R}$.

We say that $\displaystyle f$ is concave (or, occasionally, that it is concave down) if $\displaystyle -f$ is convex.

If $\displaystyle f$ is differentiable, then it is convex if and only if $\displaystyle f'$ is non-decreasing. Similarly, if $\displaystyle f$ is twice differentiable, we say it is convex over an interval $\displaystyle I$ if and only if $f(x) \ge 0$ for all $x \in I$.

Note that in our previous paragraph, our requirements that $\displaystyle f$ is differentiable and twice differentiable are crucial. For a simple example, consider the function

$f(x) = \lfloor x \rfloor (x - \lfloor x \rfloor ) + {\lfloor x \rfloor \choose 2}$,

defined over the non-negative reals. It is piecewise differentiable, but at infinitely many points (for all natural numbers $\displaystyle x$, to be exact) it is not differentiable. Nevertheless, it is convex. More significantly, consider the function

$f(x) = \left( |x| - 1 \right)^2$

over the interval $\displaystyle [-2, 2]$. It is continuous, and twice differentiable at every point except $\displaystyle{} (0, 1)$. Furthermore, its second derivative is greater than 0, wherever it is defined. But its graph is shaped like a curvy W, and it is not convex over $\displaystyle [-2,2]$, although it is convex over $\displaystyle [-2,0]$ and over $\displaystyle [0,2]$.

This article is a stub. Help us out by expanding it.