Entropy of the multivariate Gaussian
Solution 1:
It's better to simplify the term $\mathbb{E}[(x-\mu)^T \Sigma^{-1}(x-\mu)]$ directly:
$$ \begin{align} \mathbb{E}[(x-\mu)^T \Sigma^{-1}(x-\mu)] &= \mathbb{E}[\mathrm{tr}((x-\mu)^T \Sigma^{-1}(x-\mu))]\\ &= \mathbb{E}[\mathrm{tr}(\Sigma^{-1}(x-\mu)(x-\mu)^T)]\\ &= \mathrm{tr}(\mathbb{E}[\Sigma^{-1}(x-\mu)(x-\mu)^T])\\ &= \mathrm{tr}(\Sigma^{-1}\mathbb{E}[(x-\mu)(x-\mu)^T])\\ &= \mathrm{tr}(\Sigma^{-1}\Sigma)\\ &= \mathrm{tr}(I)=D \end{align} $$