What is the $\nabla_A\log\det(A+B)$, where matrix $B$ is a constant? Obviously we have $\nabla_A\log\det(A) = A^{-1}$, but I don't see the gradient for my expression on Matrix Cookbook. We can assume that both $A$ and $B$ are positive semidefinite.
When $B$ is rank-1, I think we have: \begin{align*} &\nabla_A [\log\left(\det(A+uv^T)\right)] \\ =&\nabla_A [ \log\left(\det(A)(1+u^T A^{-1} v)\right)]\\ =&\nabla_A [ \log\det(A)+\log(1+u^T A^{-1} v)]\\ =& A^{-1} + \frac{1}{1+u^T A^{-1} v}\nabla_A[u^T A^{-1}v]\\ =& A^{-1} + \frac{1}{1+u^T A^{-1} v}(-A^{-1}uv^T A^{-1}) \quad\text{from Eq 61 Cookbook}\\ =&A^{-1} - \frac{1}{1+u^T A^{-1} v}(A^{-1}uv^T A^{-1})\\ =&(A+uv^T)^{-1} \end{align*}
Is my math correct in the rank-1 case? And can I extend this to show that $\nabla_A\log\det(A+B) = (A+B)^{-1}$?
Using the chain rule for the inner function $f(A)=f_A$ we have $[D\log\det f_A](H)=\operatorname{tr}\left((f_A)^{-1}\cdot[Df_A](H)\right)$. When $f(A)=A+B$, the derivative is $\operatorname{tr}\left((A+B)^{-1}\cdot H\right)$, and the gradient is $(A+B)^{-T}$