Let $f_d$ is the $d^{th}$ element of a $D$-dimensional vector $\mathbf{f}$. SImilarly, $\hat{f_d}$ is the $d^{th}$ element of its unit normalized form: $\hat{\mathbf{f}} = \frac{\mathbf{f}}{||\mathbf{f}||}$.
I wanted to compute $\frac{\partial \hat{f_d}}{\partial f_d}$ and found:
\begin{equation} \frac{\partial \hat{f_d}}{\partial f_d} = \frac{1 - \hat{f_d^2}}{||\mathbf{f}||} \end{equation}
However, this paper (in Page 4, Eq. 9) provides the following form: \begin{equation} \frac{\partial \hat{f_d}}{\partial f_d} = \frac{1 - (\mathbf{\hat{f}}^T . \bigtriangledown \mathbf{\hat{f}}) \hat{f_d}}{||\mathbf{f}||} \end{equation}
Can anyone please help me to find what did I miss?
Thanks.
Let $s$ denote the length of the vector, and note that $$\eqalign{ s^2 &= f^Tf \cr s\,ds &= f^Tdf \cr }$$ Let's denote the unit vector as $n$ and then find its differential and gradient $$\eqalign{ n &= \frac{f}{s} \cr\cr dn &= \frac{s\,df-f\,ds}{s^2} \cr &= \frac{s^2I\,df-ff^Tdf}{s^3} \cr &= \frac{1}{s}\Big(I-nn^T\Big)\,df \cr\cr \frac{\partial n}{\partial f} &= \frac{1}{s}\Big(I-nn^T\Big) \cr\cr }$$ Extracting the $(k,k)$ element of this matrix is $$\eqalign{ \frac{\partial n_k}{\partial f_k} &= \frac{1}{s}\Big(I_{kk}-n_kn_k^T\Big) \cr &= \frac{1}{\|f\|}\Big(1-n_k^2\Big) \cr\cr }$$ So your result looks correct to me.