Second fundamental theorem of calculus on the unit sphere Without being so sure, the second fundamental theorem of calculus can be written in the following form:

Let $f \in {\cal C}^1(\mathbb{R}^n)$. Then, for all $x, y \in \mathbb{R}^n$, we have 
  \begin{align}
f(y) = f(x) + \int_0^1 \langle \nabla f(x + \tau(y-x)), y-x \rangle d \tau,
\end{align}
  where $\nabla f(x)$ denotes the gradient of $f(x)$.

A use case of this formulation can be found in Nesterov's book (Introductory Lectures on Convex Programming)  (Lemma 1.2.3).
I was wondering if there is form of this equation for the case where $x$ and $y$ live on the unit sphere $\mathbb{S}^{n-1} \subset \mathbb{R}^n$.
I am guessing that the formula would contain geodesics, but I couldn't find a solution online.
 A: Thanks to Ted Shifrin, I came up with this (rather elementary) conclusion.

Let ${\cal M} \subset \mathbb{R}^n$ be a Riemannian manifold and let $\gamma : [0,1] \mapsto {\cal M}$ denote a curve (it could be the geodesic curve, cf. the comments below) between two points $x,y \in {\cal M}$, such that $\gamma(0) = x$ and $\gamma(1)=y$. 
Let us also define a differentiable function $f: {\cal M} \mapsto  \mathbb{R} $ and a function $\varphi: [0,1] \mapsto \mathbb{R}$, such that $\varphi(t) \triangleq f(\gamma(t))$. By definition, we have $\varphi(0) = f(x)$ and $\varphi(1) = f(y)$. By using the second fundamental theorem of calculus, we can write:
  \begin{align}
\varphi(1)-\varphi(0) =  \int_{0}^1 \varphi'(t) dt,
\end{align}
  where $\varphi'(t)$ denotes the derivative of $\varphi(t)$ with respect to $t$. By the theorem of derivation of composite functions, we have
  \begin{align}
\varphi'(t) = \langle \nabla f(\gamma(t)), \gamma'(t) \rangle.
\end{align}
  By combining these two equations, we obtain the following result:
  \begin{align}
f(y) = f(x) +   \int_{0}^1 \langle \nabla f(\gamma(t)), \gamma'(t)  \rangle \>dt.
\end{align}

In the Euclidean case (${\cal M = \mathbb{R}^n}$), the geodesic curve is just a simple line, such that $\gamma(t) = x + t(y-x)$. If we plug this definition of $\gamma$ in the above equation, we obtain the equation that I wrote in the original question.
