I would like to understand how Taylor expansion works on the unit sphere. Similar questions have already been asked here and here, but I did not quite understand the answers. What stopped me from understanding the answers was mostly my lack of knowledge about differential geometry and manifolds (I guess).
Maybe someone could guide me through an example.
Assume we are given a function $f: \mathbb{S}^2 \rightarrow \mathbb{R}$. To make it more precise I just assume a polynomial $f(x,y,z) = x^1y^2 z^3$.
Let $p$ be the north pole, e.g. $p=(0,0,1)^T$. Let $q$ be close to $p$ and given by $q=\epsilon \cdot (a,b,c)^T \in \mathbb{S}^2$ for $\epsilon$ small.
The previous answers were mentioning the tangent space, which, to my understanding, is the plane $\{(x,y,1) \text{ for } x,y \in\mathbb{R}\}$.
Now the part where I am unsure.
Do I simply compute $\partial_x f(x,y,z) = y^2z^3$ and $\partial_y f(x,y,z) = 2xyz^3$ And obtain $f(q) \approx f(p) + q_1\partial_x f(p) + q_2 \partial_y f(p)$ where $q_i$ represents the $i$-th entry of $q$. What about the difference in $z$? I somehow need to incorporate the curvature of my space, or (and maybe equivalently) the mapping from the sphere to the tangent space. How would this work? What would this mapping look like for the unit sphere?
Instead of $f(q) \approx f(p) + q_1\partial_x f(p) + q_2 \partial_y f(p)$, do I maybe have to use $f(q) \approx f(p) + \tilde{q}_1\partial_x f(p) + \tilde{q}_2 \partial_y f(p)$ where $\tilde{q}$ is the projection of $q$ onto the tangent space?
General idea: we want to know how the function $f$ restricted to $\mathbb{S}^2$ changes in a certain direction $v$ at the position $p \in \mathbb{S}^2$. We take a curve $\alpha $ on $\mathbb{S}^2$ that passes through $p$ and goes in the direction of $v$. We then derive the function $f$ along the curve $\alpha$.
Consider a point $p \in \mathbb{S}^2$. The tangent space $T_p \mathbb{S}^2$ at $p$ is the plane through $p$ that is orthogonal to the position vector $p$. Take a vector $v$ in $T_p \mathbb{S}^2$, i.e. $v\perp p$. Consider now the curve $$ \alpha\colon (-\epsilon, \epsilon) \to \mathbb{S}^2: t \mapsto \cos (|v|t)\, p + \sin (|v|t)\,\frac{v}{|v|}. $$ This curve is a great circle with initial position $\alpha(0)=p$ and initial velocity $\alpha'(0)=v$.
We must choose the direction of $v$ such that $\alpha$ passes through the point $q$. Take the plane $V$ through $p$, $q$ and the origin. The intersection of $V$ with the tangent plane at $p$ is a line. The direction of $v$ lies in the direction of this line. Moreover, the length $|v|$ must be equal to the distance from $p$ to $q$ along the great circle.
Define
$$ g: (-\epsilon, \epsilon) \subset \mathbb{R} \to \mathbb{R}: t \mapsto f(\alpha(t)). $$ The first derivative of $g$ is $$ \begin{align*} \Bigl.\frac{d}{dt}\Biggr|_{t=0}g(t)&= \partial_x f(\alpha(0)) \alpha'_1(0) + \partial_y f(\alpha(0)) \alpha'_2(0) + \partial_z f(\alpha(0)) \alpha'_3(0) \\ &= v_1 \partial_x f(p) + v_2 \partial_y f(p) + v_3 \partial_z f(p) \\ &= v \cdot (\mathrm{grad}\,f)(p) \end{align*} $$ We obtain $$ f(q) \approx f(p) + v_1 \partial_x f(p) + v_2\partial_y f(p) + v_3\partial_z f(p). $$