Are continuous convex functions subharmonic? We say that a continuous function $u:\mathbb{R}^d\to \mathbb{R}$ is subharmonic if it satisfies the mean value property
$$u(x)\leq \frac{1}{|\partial
 B_r(x)|}\int_{\partial B_r(x)}u(y)\,\mathrm{d}y \qquad (\star)$$  for
any ball $B_r(x)\subset \mathbb{R}^d$.

Let $u:\mathbb{R}^d\to \mathbb{R}$ be a convex function (hence,
continuous). Is $u$ subharmonic?


*

*If $u\in C^2(\mathbb{R}^d)$, this is  true. Using a second-order Taylor expansion we have
\begin{align*}\int_{\partial B_r(x)}(u(y)-u(x))\,\mathrm{d}y&=\int_{\partial B_r(x)}\left(\nabla u(x)\cdot(y-x)+\frac{1}{2}(y-x)D^2u(\xi)(y-x)^t\right)\,\mathrm{d}y.\end{align*}
The first term in the above integral vanishes by symmetry, the second is non-negative because $D^2u(\xi)$ is a positive semi-definite matrix. Therefore, ($\star$) is proven.


*If $d=1$, the statement is true when $u$ is continuous, in general. Indeed since balls reduce to intervals, ($\star$) is easily shown to be equivalent to $u$ being midpoint-convex.
I'm not sure how to attack the problem in higher dimensions. Of course $(\star)$ is true for affine functions in any dimension, and I'd like to use the fact that the graph of a convex function lies below that of an affine function, loosely speaking. However, to close the estimate I would need $u$ to be equal to the affine function at the boundary of the ball, and this is not necessarily possible.
 A: Using that $u$ is midpoint-convex works in higher dimensions as well.
$y \mapsto x - (y-x) = 2x-y$ maps the sphere $\partial B_r(x)$ bijectively onto itself (each point is mapped to the “opposite” point on the sphere). It follows that
$$
\int_{\partial B_r(x)} u(y) \, dy = \int_{\partial B_r(x)} u(2x-y) \, dy
$$
and therefore
$$
\int_{\partial B_r(x)} u(y) \, dy = \int_{\partial B_r(x)} \frac 12\bigl(u(y) + u(2x-y)\bigr) \, dy \\
\ge \int_{\partial B_r(x)} u\left(\frac{y + (2x-y)}{2}\right) \, dy = \int_{\partial B_r(x)} u(x) \, dy = |\partial 
 B_r(x)| \cdot u(x) \, .
$$
A: Martin gives a very reasonable answer extending the question's second argument; here's how to extend the first one.
If $u: \mathbb{R}^{d} \to \mathbb{R}$ is continuous and convex, then mollification of $u$ gives a family of smooth functions $(u^{\epsilon})_{\epsilon > 0}$ such that $u^{\epsilon} \to u$ locally uniformly in $\mathbb{R}^{d}$.  (Recall that mollification means that we define $u^{\epsilon} = \rho^{\epsilon} * u$, where $\rho^{\epsilon}(x) = \epsilon^{-d} \rho(\epsilon^{-1} x)$ and $\rho \in C^{\infty}_{c}(\mathbb{R}^{d})$ is a non-negative, even function with $\int_{\mathbb{R}^{d}} \rho(x) \, dx = 1$.)
It is not hard to show that, for each $\epsilon > 0$, $u^{\epsilon}$ is convex.  Indeed, if $x, y \in \mathbb{R}^{d}$ and $\lambda \in [0,1]$, then
\begin{align*}
u^{\epsilon}((1- \lambda)x + \lambda y) &= \int_{\mathbb{R}^{d}} u((1 - \lambda)x + \lambda y - \xi) \rho^{\epsilon}(\xi) \, d \xi \\
&\leq \int_{\mathbb{R}^{d}} ((1 - \lambda) u(x - \xi) + \lambda u(y - \xi)) \rho^{\epsilon}(\xi) \, d \xi \\
&= (1 - \lambda) u^{\epsilon}(x) + \lambda u^{\epsilon}(y).
\end{align*}
Thus, $u^{\epsilon}$ is subharmonic.
Now if $x \in \mathbb{R}^{d}$ and $r > 0$, then
\begin{equation*}
u(x) = \lim_{\epsilon \to 0^{+}} u^{\epsilon}(x) \leq \lim_{\epsilon \to 0^{+}} \frac{1}{|\partial B_{r}(x)|} \int_{\partial B_{r}(x)} u^{\epsilon}(y) \, dy = \frac{1}{|\partial B_{r}(x)|} \int_{\partial B_{r}(x)} u(y) \, dy.
\end{equation*}
Therefore, $u$ is also subharmonic.
