Integral of $M^TM$ for matrix $M=B\exp(-At)$ For non-commuting positive definite matrices $A$,$B$, is there a simple expression for 
$$\int_{0}^{\infty} M_t^T M_t \,\mathrm d t$$ 
where $M_t:=B\exp(-At)$?
Based on the commutative case, I'd hope it's something like $\frac{1}{2}A^{-1/2}B^2A^{-1/2}$ but I cannot prove it.
 A: If you have access to the eigendecomposition of $A=UDU^{-1}$, let $C=U^{-1}B^2U$, and your integral is easily computed to be 
$$U\left(\frac{C_{i,j}}{d_i+d_j}\right)_{i,j}U^{-1}.$$
A: Let
$$\mathrm Q := \int_{0}^{\infty} \exp(-t \mathrm A^\top) \,\mathrm B^\top \mathrm B \exp(-t  \mathrm A) \,\mathrm d t$$ 
which is known as the observability Gramian in the control theory community.  Left-multiplying by $\rm A^\top$,
$$\mathrm A^\top \mathrm Q = \int_{0}^{\infty} \mathrm A^\top \exp(-t \mathrm A^\top) \,\mathrm B^\top \mathrm B \exp(-t  \mathrm A) \,\mathrm d t = - \int_{0}^{\infty} \frac{\mathrm d}{\mathrm d t} \left( \exp(-t \mathrm A^\top) \,\mathrm B^\top \right) \mathrm B \exp(-t  \mathrm A) \,\mathrm d t$$ 
Integrating by parts,
$$\mathrm A^\top \mathrm Q = \underbrace{\exp(-t \mathrm A^\top) \,\mathrm B^\top \mathrm B \exp(-t  \mathrm A) \,\Big|_\infty^0}_{= \mathrm B^\top \mathrm B} + \underbrace{\int_{0}^{\infty} \exp(-t \mathrm A^\top) \,\mathrm B^\top \frac{\mathrm d}{\mathrm d t} \left( \mathrm B \exp(-t  \mathrm A) \right) \,\mathrm d t}_{= - \mathrm Q \mathrm A}$$
where the first term is $\mathrm B^\top \mathrm B$ due to the positive definiteness of $\rm A$ (i.e., the fact that $-\rm A$ is Hurwitz). 
Hence, we obtain the following linear matrix equation
$$\rm A^\top Q + Q A = B^\top B$$
which is a Lyapunov equation. Since matrices $\rm A, B$ are symmetric,
$$\rm A Q + Q A = B^2$$
which may (or may not) have a nice solution. As a last resort, one can vectorize.
