Convex Function $f: U\subset\mathbb{R}^m \to \mathbb{R}$ is a convex function if $f(tx+(1-t)y)\le tf(x)+(1-t)f(y)$, for all $x,y \in U$ and all $t \in [0,1]$. 
If $f$ is convex and continuous function, and $f$ has partial derivatives at every points of $U$, show that $f$ it is class $C^1$.
I tried to prove, what the partial derivative of each f the coordinated function was continuous, but I could not. Somebody help me?
 A: I suspect there must be a nicer way to prove this, but here's my quick go.
Without loss of generality, assume that the origin $O\in U$ with $f(O)=0$ and $\partial f/\partial x_i(O)=0$ for all $i=1,\ldots,m$ (i.e. $\nabla f(O)=0$). Otherwise, for any $x\in U$, let $g(w)=f(x+w)-w\cdot\nabla f(x)$, and we get $g(O)=0$ and $\nabla g(O)=0$, and the proof applies to $g$ instead.
Because of convexity, this makes $f(x)\ge0$ for all $x$. Otherwise, if say $f(a)<0$ for some $a\in\mathbb{R}^m$, we get $f(ta)\le tf(a)$ which makes $a\cdot\nabla f(O)\le f(a)<0$.
Next, assume that the partial derivative $\partial f/\partial x_r$ is discontinuous at $O$ for some $r$. That means there is an $\epsilon>0$ so that either $\partial f/\partial x_r>\epsilon$ or $\partial f/\partial x_r<-\epsilon$ for points arbitrarily close to $O$.
Assume it is the former: $\partial f/\partial x_r>\epsilon$ for points arbitrarily close to $O$. (Proof for the other case is similar.) Let $u_1,u_2,\ldots\in\mathbb{R}^m$ be a sequence of such points with $\partial f/\partial x_r(u_i)>\epsilon$ that converges towards $O$.
If $\partial f/\partial x_r(u)>\epsilon$ for some $u\in\mathbb{R}^m$, and $e_r$ denotes the $r$th unit vector, then
$$
f(u+te_r)
\ge f(u)+t\cdot\partial f/\partial x_r(u)
\ge f(u)+t\epsilon
\text{ for all }t.
$$
Plug in $u=u_i$ and take the limit, which we can as $f$ is continuous, giving $f(te_r)\ge t\epsilon$. This in turn implies that $\partial f/\partial x_r(O)\ge\epsilon$, which contradicts the assumption that this should be zero.
Some of these steps require that $f$ be defined in a neighbourhood of $O$: e.g., on an open ball: in particular the argument for the last limit.
