Gradient and Hessian of $x/||x||_2$?

69 Views Asked by At

I am trying to compute the gradient and the Hessian matrix of the function $f(x):= \frac{x}{||x||_2} $ for $x \in \mathbb{R}^n$ where $||x||_2$ is the Euclidean norm. I think that the gradient should be $\nabla f(x) = \frac{1}{||x||_2^3} (||x||_2^2 Id -x) $ but I have problems in computing the Hessian matrix.