I need to work out the Integral $$\int \frac{1}{(x\mathbb{1}-A)^2}B\frac{1}{x\mathbb{1}-C}\ dx$$ Where $A,B,C$ are matrices which generally do not commute and $x$ is real. $\mathbb{1}$ denotes the identity matrix. I am ok with using matrix functions like $\log(x-A)$ defined by their taylor expansion.
The result in the commutative case is obvious, but I am not sure how to generalize to the non commuting case.