Coordinate derivatives give directional Taylor expansion for convex functions (source code)

= Coordinate derivatives give directional Taylor expansion for convex functions
{title2=$f(x+th)=f(x)+t\nabla f(x)^{\mathsf T}h+o(t)$}

Let $f$ be a finite <convex function> on a neighbourhood of $x\in\mathbb R^d$, and suppose its first <partial derivatives> exist at $x$. For any fixed <vector> $h$, convexity gives
$$
f(x+th)\le\frac1d\sum_{i=1}^d f(x+dth_i e_i)
=f(x)+t\sum_{i=1}^d h_i\partial_i f(x)+o(t).
$$
The equality uses the one-dimensional first-order <Taylor expansion> along each coordinate line; no continuity of second <partial derivatives> is assumed. Applying this upper bound to $-h$ and using $f(x)\le[f(x+th)+f(x-th)]/2$ gives the matching lower bound. Hence the displayed directional expansion holds. This supplies the expansion used in the <supporting inequality for a differentiable convex function> even when continuous second <partial derivatives> have not been postulated.