We consider the following function


$$f:(\mathbb S^n)^N \rightarrow \mathbb R^{n+1} \text{ such that } f(x\_1,...,x\_N)= \sum\_{i=1}^N x\_i.$$


This function can be written in Cartesian coordinates as $f(x)=(f\_1(x),..,f\_{n+1}(x))$ and I would like to know if one can find a simple expression for the derivative


$$\nabla\_{x\_1} \left(\frac{f\_1(x)}{\Vert f(x) \Vert\_{\mathbb R^{n+1}}}\right)$$
where $\nabla\_{x\_1}$ is the gradient on $\mathbb S^n$ with respect to $x\_1.$


Can one somehow carry out this differentiation? I am a bit struggeling with computing $\nabla\_{x\_1} f\_1(x)$ here.



Directional gradient on sphere
$\newcommand\R{\mathbb R}\newcommand\S{\mathbb S}$Take any $(x\_1,x\_2,\dots,x\_N)\in(\S^n)^N$.
Let $(-1,1)\ni t\mapsto X\_1(t)\in\S^n$ be any smooth curve such that $$X\_1(0)=x\_1.$$ For any $t\in(-1,1)$, let
$$X(t):=(X\_1(t),x\_2,\dots,x\_N)$$ and $$S(t):=f(X(t))=X\_1(t)+x\_2+\dots+x\_N[\in\R^{n+1}],$$
so that $X(0)=(x\_1,x\_2,\dots,x\_N)$ and
$$S(0)=s:=x\_1+x\_2+\dots+x\_N.$$ Let $v:=X'\_1(0)$, so that $S'(0)=v$. Let
$$S\_1(t):=f\_1(X(t))=e\_1\cdot S(t),$$
where $\cdot$ denotes the dot product and $e\_1$ is the first vector of the standard basis of $\R^{n+1}$. So, $S'\_1(0)=e\_1\cdot v$. So, for
$$r(t):=\frac{f\_1(X(t))}{\|f(X(t))\|}=\frac{S\_1(t)}{\|S(t)\|}$$
we have
$$r'(0)=\frac1{\|S(0)\|^2}\Big(\|S(0)\|S'\_1(0)-S\_1(0)\frac{S(0)}{\|S(0)\|}\cdot S'(0)\Big) \\ 
=\frac1{\|s\|^2}\Big(\|s\|e\_1\cdot v-(e\_1\cdot s)\frac{s}{\|s\|}\cdot v\Big).$$
Thus, the gradient in question is $g-(g\cdot x\_1)x\_1$, where
$$ g:=\frac1{\|s\|^2}\Big(\|s\|e\_1-(e\_1\cdot s)\frac{s}{\|s\|}\Big).$$
$\big($Note: $g-(g\cdot x\_1)x\_1$ is the orthogonal projection of the vector $g$ onto the tangent hyperplane to the unit sphere $\S^n$ at point $x\_1$.$\big)$


