TITLE: Integrate $ \int_0^\infty \left( ( x A+I)^{-1} A - \frac{1}{c+x} I \right)\, \mathrm dx $ where $A$ is positive-definite and $c>0$
QUESTION [6 upvotes]: $\def\d{\mathrm{d}}$Can someone outline for me have to integrate the following expression:
\begin{align}
\int_0^\infty \left( ( x A+I)^{-1} A - \frac{1}{c+x} I \right) \,\d x
\end{align}
where $A$ is a positive definte  matrix and $c>0$. The integration is done element-wise.  
In the scalar case, this inegral becomes $\log(a)+\log(c)$. 
One of the responses suggests that the answer is $\log(A)+\log(c)I$.
However, I am not very sure how this was shown. 
Thanks.

REPLY [3 votes]: As $A$ is PSD, by a (constant) change of basis, all of the integrands in the family
$$
\left\{(xA+I)^{-1}A-\frac1{c+x}I:\ x\ge0\right\}
$$
are simultaneously diagonalisable. Hence the integral reduces to the scalar case and it exists if and only if $A$ is positive definite (i.e. $A$ is also nonsingular). Also, when it exists, the integral is equal to $\log A+\log(c)I$.