Let $H$ be a separable Hilbert space with inner product $\langle,\rangle$, let $\{e_k\}_{k=1}^\infty$ be an orthonormal basis of $H$, and let $A: H\to H$ be a symmetric, positive definite and invertible operator. Let $u\in H$ and $n\in \mathbb{N}$, I aim to evaluate the following integral $$ \int_{\mathbb{R}^n}\exp\left(-\frac{1}{2}\left\langle A \left(\sum_{k=1}^n x_k e_k-A^{-1}u\right), \sum_{k=1}^n x_k e_k -A^{-1}u\right\rangle \right)\, dx_1\ldots dx_n. $$ It would be ideal if it can be computed for general $u$, but I am happy to assume $u$ lies in the subspace $H_n$ spanned by $\{e_i\}_{i=1}^n$.
Do I have to assume $A$ or $A^{-1}$ preserves $H_n$?
My attempt:
To evaluate the integral, I try to rewrite the integral as an integral of Gaussian density. Note that \begin{align*} &\left\langle A \left(\sum_{k=1}^n x_k e_k-A^{-1}u\right), \sum_{k=1}^n x_k e_k -A^{-1}u\right\rangle \\ &=\left\langle \sum_{k=1}^n x_k A e_k- u, \sum_{k=1}^n x_k e_k -A^{-1}u\right\rangle \\ &=x^\top \mathbf{A} x- 2x^\top \mathbf{b} +\langle u, A^{-1} u\rangle, \end{align*} where $\mathbf{A}=(A_{ij})_{i,j}\in \mathbb{R}^{n\times n}$ and $\mathbf{b}=(b_i)_{i=1}^n\in \mathbb{R}^{n}$ are defined as $$ A_{ij} = \langle Ae_i, e_j\rangle, \quad b_i = \langle u, e_i\rangle. $$ As $\mathbf{A}$ is a positive definite matrix, it is invertible. Then \begin{align*} x^\top \mathbf{A} x- 2x^\top \mathbf{b} +\langle u, A^{-1} u\rangle = (x-\mathbf{A}^{-1} \mathbf{b})^\top \mathbf{A} (x-\mathbf{A}^{-1} \mathbf{b}) - \mathbf{b}^\top \mathbf{A}^{-1} \mathbf{b}+ \langle u, A^{-1} u\rangle. \end{align*} If I could show \begin{align} \tag{1} &\mathbf{b}^\top \mathbf{A}^{-1} \mathbf{b}- \langle u, A^{-1} u\rangle =0, \end{align} then I can rewrite the integral as an integration with a multivariate Gaussian density, which can be computed involving the determinant of $\mathbf{A}^{-1}$. However, I am not sure whether (1) holds or not. Even assuming $u=\sum_{k=1}^n \langle u,e_k\rangle e_k$, we still need to show $$ \sum_{k,l=1}^m \langle u, e_k\rangle \left(( \mathbf{A}^{-1})_{kl} -\langle A^{-1}e_k ,e_l\rangle \right) \langle u, e_l\rangle=0. $$ It is unclear to me whether the identity holds, since typically $A$ may not map $H_n$ into $H_n$.
This seems to be related to the matrix representation of an inverse operator, which has been asked here. However, it assumes $A$ maps $H_n$ into itself, and hence we can use the same basis for the range of $A$.