Let $B$ be a symmetric invertible matrix and let $A$ be a diagonal matrix with non-zero entries on the main diagonal.
I am trying to simplify the following expression \begin{align} {\rm Tr} \left( (I- D^{-1} BA^2) B (I- D^{-1} BA^2)^T \right) \end{align} where $D=I+ ABA$
Case that I did:
In the one dimensional case we get \begin{align} \frac{B}{(1+BA^2)^2}. \end{align}
Also in the case that $A = a I$ (all diagonal elements are the same) we get
\begin{align} (I- D^{-1} BA^2) B (I- D^{-1} BA^2)^T = (I+ BA^2)^{-1} B (I+ BA^2)^{-1} \end{align} and therefore the trace becomes \begin{align} {\rm Tr} \left( (I- D^{-1} BA^2) B (I- D^{-1} BA^2)^T \right)= {\rm Tr} \left( (1+ABA)^{-1} B(1+ABA)^{-1} \right)= {\rm Tr} \left( B(1+ABA)^{-2} \right). \end{align}
My question is what can we say about a more general diagonal $A$? Can we show also that \begin{align} {\rm Tr} \left( (I- D^{-1} BA^2) B (I- D^{-1} BA^2)^T \right)= {\rm Tr} \left( (1+ABA)^{-1} B(1+ABA)^{-1} \right)= {\rm Tr} \left( B(1+ABA)^{-2} \right) \end{align}
Note that another way to look at this problem is to look through the norm operator \begin{align} \| I- D^{-1} BA^2 \| \end{align}
I wounder if there is a software that can take care of this simplification.