I have searched around, but I have not found a solution to Gaussian integrals of the following form: $$\int (x^\intercal R x)\exp\left[-\frac{1}{2} \left(x^\intercal Ax\right) + Bx\right]d^n x$$ Here, $B$ is an $n$-dimensional vector, $R$ and $A$ are $n\times n$ matrices, and we integrate over the space of $n$-dimensional vectors $x$ with real values. Explicitly, $x^\intercal R x = \sum_{i,j=1}^n x_i R_{ij} x_j$ and $B x = \sum_{i=1}^n B_i x_i$.
Presumably, $A$ must be a positive-definite matrix to assure convergence. Other than that, I think the elements of $R$, $A$, and $B$ can be arbitrary complex numbers. However, I would be interested in evaluating this integral for restrictions, e.g., if $A$ is also real-valued (and therefore symmetric).
Wikipedia evaluates the special cases of $R=0$ and $n=1$.
(Note that the above integral is not addressed by similarly-worded question 187923, which uses "quadratic term" to refer to the term with $A$ in the exponent rather than $R$ outside the exponent.)
Whoops, I missed the standard trick that is in fact listed on Wikipedia here. For matrices with real elements,
$$\begin{align} \int &(x^\intercal R x)\exp\left[-\frac{1}{2} \left(x^\intercal Ax\right) + Bx\right]d^n x \\ &= \sum_{ij} R_{ji} \partial_{B_i}\partial_{B_j}\int \exp\left[-\frac{1}{2} \left(x^\intercal Ax\right) + Bx\right]d^n x\\ &=\sum_{ij} R_{ji} \partial_{B_i}\partial_{B_j}\sqrt{\frac{(2\pi)^n}{|A|}}\exp\left[\frac{1}{2} \left(B A^{-1} B^\intercal\right)\right]\\ &=\sqrt{\frac{(2\pi)^n}{|A|}}\sum_{ij} R_{ji} \left[(A^{-1})_{ij} + (A^{-1}B^\intercal)_{i}(BA^{-1})_{j}\right]\exp\left[\frac{1}{2} \left(B A^{-1} B^\intercal\right)\right]\\ &=\sqrt{\frac{(2\pi)^n}{|A|}}\left[\mathrm{Tr}\left(R A^{-1}\right) + BA^{-1}RA^{-1}B^\intercal\right]\exp\left[\frac{1}{2} \left(B A^{-1} B^\intercal\right)\right] \end{align}$$