Let $(M,g)$ be a compact connected smooth Riemannian manifold without boundary and let $\phi: M \rightarrow \mathbb{R}$ be a function on $M$. We say that $\phi$ is superdifferiantiable at $x$ with super-gradient $p$, if we have that
$$\phi(\exp_{x}(v)) \leq \phi(x)+ g(p,v)_{x}+o(|v|)_{x}$$
for all small $v \in TM_{x}$
and subdifferentiable at $x$ with sub-gradient $q$ if the reverse inequality holds:
$$\phi(\exp_{x}(v)) \geq \phi(x)+ g(q,v)_{x}+o(|v|)_{x}$$
for all small $v \in TM_{x}$
The following fact has been used in various papers I've seen:
If $\phi$ is superdifferentiable at $x$ with supergradient $p$ and $\phi$ is sub differentiable at $x$ with subgradient $q$ then $p=q$ and $\phi$ is differentiable at $x$ with $p=q$.
We can maybe just prove this locally in the Euclidean case and use normal coordinates to generalize. But I'm having trouble doing this in even Euclidean case. Sorry if this is too standard to be asked on here.