How to perform integration over product of matrices? My goal is to express the result of the following integral in closed-form (using for example traces of the matrices):
$$ \int_{-\infty}^{\infty} b^T G(x)^T H G(x) b dx $$
where
$$ b \in \mathbb{R}^{m \times 1} $$
$$ H \in \mathbb{R}^{m \times m} $$
$$ G = (xI - H)^{-1} $$

You may decompose the non-Hermitian operator $H$:
$$ H = \sum_m h_m \vert m \rangle \langle \tilde{m} \vert $$
and express the result in terms of the pseudoeigenvalues.
