About a Morse function on the euclidean $n$-sphere. If you are in a hurry feel free to jump directly to the emphasized parts. 
Setup. Let $A$ be a real invertible symmetric square matrix of size $n+1$ whose eigenvalues are:
$$\lambda_0>\lambda_1>\cdots>\lambda_n.$$
Let $\{v_0,\ldots,v_n\}$ be an orthonormal basis of $\mathbb{R}^{n+1}$ formed by eigenvectors of $A$ with $v_i$ associated to $\lambda_i$. From now all vectors of $\mathbb{R}^{n+1}$ will be written in this basis, namely, one has:
$$(x_0,\ldots,x_n):=x_iv^i.$$
Furthermore, let $F\colon\mathbb{S}^n\rightarrow\mathbb{R}$ defined by:
$$F(x):={}^\intercal xAx.$$

Proposition. $F$ defines a Morse function on $\mathbb{S}^n$.

I have already computed the critical points of $F$, there set is $\{\pm v_0,\cdots,\pm v_n\}$, namely, one has:
$$\textrm{Crit}(F)=\{(\pm 1,0,\ldots,0),(0,\pm 1,0,\ldots,0),\ldots,(0,\ldots,0,\pm 1)\}.$$
Let $x\in\textrm{Crit}(F)$ and let $\varphi$ a chart of $\mathbb{S}^n$ centered at $x$, I am supposed to prove that:
$$\textrm{Hess}_0(F\circ\varphi^{-1})\in\textrm{GL}_{n+1}(\mathbb{R}).$$ I have been strongly advised to use the following charts:
$$U_p^{\pm}:=\{x\in\mathbb{S}^n;\pm x_p>0\},\varphi_p^{\pm}\colon x\mapsto\left(\frac{x_i}{x_p}\right)_{i\in\{0,\ldots,n\}\setminus\{p\}}.$$
I have computed the inverse of $\varphi_p^{\pm}$ and found that:
$$(\varphi_p^{\pm})^{-1}(x):=\frac{\pm 1}{\sqrt{1+\sum\limits_{i=0}^{n-1}{x_i}^2}}(x_0,\cdots,x_{p-1},1,x_p,\ldots,x_{n-1}).$$
Therefore, one has:

$$F\circ(\varphi_p^{\pm})^{-1}(x)=\frac{\lambda_p+\sum\limits_{i=0}^{p-1}\lambda_i{x_i}^2+\sum\limits_{j=p}^{n-1}\lambda_{j+1}{x_j}^2}{1+\sum\limits_{i=0}^{n-1}{x_i}^2}.$$

Questions. 


*

*I do not feel too confident in the above expression, I do not like those $1$ and $\lambda_p$ being apart. Can someone tell me if have made a mistake in my computations?

*I can see that $\textrm{Hess}_{0}(F\circ{\varphi_p^{\pm}}^{-1})$ will be diagonal and therefore the index of the critical point $\pm v_p$ will be easy to compute, but is there a clever way to conduct the computations?
Any help will be greatly appreciated.
 A: Let $p\in\{0,\ldots,n\}$, one has that:
$$\left(F\circ(\varphi_p^{\pm})^{-1}\right)(x)-\left(F\circ(\varphi_p^{\pm})^{-1}\right)(0)=\frac{\sum\limits_{i=0}^{p-1}(\lambda_i-\lambda_p){x_i}^2+\sum\limits_{j=p}^{n-1}(\lambda_{j+1}-\lambda_p){x_j}^2}{1+\sum\limits_{i=0}^{n-1}{x_i}^2}.$$
Besides, recall that one has the following asymptotic:
$$\frac{1}{1+\sum\limits_{i=0}^{n-1}{x_i}^2}=1+O(\|x\|^2).$$
Therefore, one gets:
$$\left(F\circ(\varphi_p^{\pm})^{-1}\right)(x)-\left(F\circ(\varphi_p^{\pm})^{-1}\right)(0)=\sum\limits_{i=0}^{p-1}(\lambda_i-\lambda_p){x_i}^2+\sum\limits_{j=p}^{n-1}(\lambda_{j+1}-\lambda_p){x_j}^2+O(\|x\|^3).$$
Finally, one has:
$$\textrm{Hess}_0(F\circ(\varphi_p^{\pm})^{-1})=2\textrm{diag}(\lambda_0-\lambda_p,\ldots,\lambda_{p-1}-\lambda_p,\lambda_{p+1}-\lambda_p,\ldots,\lambda_n-\lambda_p).$$
Hence, $\pm v_p$ is a non-degenerated critical point of $F$ whose index is $n-p$. Whence the result.
A: (1) If $f(x)=(x,Ax)$ and $x$ is a curve in $S^n$ with a unit speed,
then
$df\ w =2\ (x,Aw),\ x'=w$.
(2) If $v_i$ are eigenvectors of $A$ with unit length, then
$(v_i,Av_j)=
\delta_{ij}\lambda_j$ where $\lambda_i$ is an eigenvalue.
When we returned to (1), if $x=\sum_i x_iv_i,\ w=\sum_i w_iv_i$,
then
$$ (x,Aw)=\sum_{i,j} \delta_{ij}x_iw_j\lambda_j =\sum_i
x_iw_i\lambda_i$$
If $x$ is a critical point, then define $$ H:=\{ y\in S^n| (x,y)=0
\} $$
If $y=x_{i} v_1- x_1v_{i} $, then $$0=(x,Ay)=x_{1} x_i (\lambda_1
-\lambda_{i}) $$
By an assumption on $\lambda_i$, we have $x=\pm v_i$.
(3) If $x(t)=\cos\ tv_i +\sin\ tv_j$ is a curve at $v_i$ with
$x'=v_j,\ x''=-v_i$, then $f'=2(x',Ax)$ and
$$ B:={\rm Hess}_{v_i}\ f,\ B\ (v_j,v_j)=
f'' =2(x',Ax') + 2(x'',Ax) =2( \lambda_j-\lambda_i)$$
If $x(t)=\cos\ tv_i +\frac{1}{\sqrt{2}}\sin\ t(v_j+v_k)$, then $$ B
\bigg(\frac{1}{\sqrt{2}} (v_j+v_k),\frac{1}{\sqrt{2}}
(v_j+v_k)\bigg) = v_j+v_k-2v_i $$
Hence $B\ (v_{j},v_{k})=0$ for $j\neq k$.
A: This seems to answer your question :
Let $f(x)=x^TAx/2$ (dividing by 2 doesn't change the Mose aspect of your function) be a function on $\mathbb R^{n+1}$.
Let $\{v_i\}_{i=1...n+1}$ be the eigenvectors. They form a basis of $\mathbb R^{n+1}$. Let $\{v^i\}_{i=1...n+1}$ be its dual basis. Consider coordinates $y^i :=v^i$ on $\mathbb R^{n+1}$. Then the Hessian of $f$ is a diagonal matrix with the eigenvalues on the diagonal. Restrict this matrix to the vector space perpendicular to one of the $v_i$. Its determinant is $\Pi_{j\ne i}\lambda_i \ne 0$. Hence you have a Morse function on $S^n$.
**** But it doesn't. ****
Indeed, I used the (false) "fact" that given an embedding $\iota : M\hookrightarrow N$ of a manifold into another and given a function $f:N\rightarrow \mathbb R$ we could use this (false) identity $$H_{f\circ \iota} = \iota^*H_f$$
where $H$ denotes the Hessian and where $\iota^*H_f = H_f|_\iota(\iota_*\cdot,\iota_*\cdot)$ is $H_f$'s pull-back by $\iota$. The problem here is that $H_{f\circ \iota}$ detects the second derivative of $\iota$ but $\iota^*H_f$ only its first derivative.
