Gradient and hessian of $\log(1+x^TAx)$

302 Views Asked by At

I want to find Gradient and hessian of $log(1+x^TAx)$ where $A$ is positive semi definite.

My attempt: $\nabla = x^T(A+A^T)/1+x^TAx$

Hessian = $(A+A^T)(1+x^TAx)-(x^T(A+A^T))^Tx^T(A+A^T)/(1+x^TAx)^2$

Is that correct?