Gradient of $\frac{<Ax,x>}{|x|^2}$

99 Views Asked by At

Compute the gradient of $f(x) = \frac{<Ax,x>}{|x|_2}$, where $x\in R^n$ and $|x|_2$ is Euclid norm.

$f(x) = (x^TA^Tx)/|x|_2$

$f'(x) = \frac{(A^Tx+(Ax)^T)|x|_2-\frac{x}{|x|^2}(Ax)^Tx}{|x|_2^2}=\frac{(A^Tx+(Ax)^T)}{|x|_2}-\frac{x(Ax)^Tx}{|x|_2^3}$

So the gradient will be the expression obtained. Is the logic plausible? Please, can you also check the computations because I am not fluent at vector/matrix differentiation?

If everything is correct then this must be the Hessian:

$f''(x) = \frac{(A^T+A^T)|x|_2}{|x|_2^2}-\frac{(|x|_2^3)(x(Ax)^Tx)'-(|x|_2^3)'(x(Ax)^Tx)}{|x|_2^6}$

Here I don't know how to compute $(|x|_2^3)'$ and $(x(Ax)^Tx)'$