I am attempting to derive the marginal PDF for an application of the Gibbs Sampler. My joint PDF contains:
$P(b,x) = frac{1}{sigma^{n}}exp left( -frac{1}{2sigma^2}leftlVert b-AxrightrVert^2-frac{alpha^2}{2sigma^2}leftlVert Lx rightrVert^2right)$
Or, as I can obtain a covariance matrix:
$P(b,x) = frac{1}{(2pi)^{n}vertSigmavert^2}expleft(-frac{1}{2}(b-Ax)^{mathrm{T}}Sigma(b-Ax) – frac{alpha^2}{2} (Lx)^{mathrm{T}}Sigma(Lx)right)$
Where $b$ is an n-by-1 vector representing observed data, $x$ is an m-by-1 vector that is a parameter to be estimated, $A$ is an n-by-m matrix containing the physical model, $L$ is an n-by-m second-derivative operator matrix, and $alpha$ is a scalar. In my particular case, m=n, and is on the order of 100-500. I wish to marginalize over $x$,
$P(xvert b) = frac{P(x,b)}{int P(x,b) mathrm{d}x}$
and therefore am attempting to evaluate the integral:
$frac{1}{sigma^{n}}int_0^texp left( -frac{1}{2sigma^2}leftlVert b-AxrightrVert^2-frac{alpha^2}{2sigma^2}leftlVert Lx rightrVert^2right)mathrm{d}x$
or
$frac{1}{(2pi)^{n}vertSigmavert^2}int_0^texpleft(-frac{1}{2}(b-Ax)^{mathrm{T}}Sigma(b-Ax) – frac{alpha^2}{2} (Lx)^{mathrm{T}}Sigma(Lx)right)mathrm{d}x$
where $t$ is either positive $infty$ or a scalar determined by the dimension $n$. The vector $x = x(r)$ is itself a PDF of unknown shape that integrates to unity over $r$, so it is non-negative and the maximum value is $frac{1}{Delta r}$. Integrating from 0 to $infty$ is probably more simple, but it may be an approximation in this case. Rewriting the integral as:
$frac{1}{(2pi)^{n}vertSigmavert^2}expleft(-frac{1}{2} b^{mathrm{T}}Sigma bright) int_0^t expleft(-frac{1}{2}x^{mathrm{T}}(A^{mathrm{T}}Sigma A + alpha^2 L^{mathrm{T}} Sigma L)x – b^{mathrm{T}}Sigma A x right)mathrm{d}x $
I recognize similarity to the expression given on wikipedia:
$int expleft(-frac{1}{2} x^{mathrm{T}}Ax + B^{mathrm{T}}xright)mathrm{d}x = sqrt{frac{(2 pi)^n}{vert Avert}}expleft(frac{1}{2}B^{mathrm{T}}A^{-1}Bright)$.
My issue is that the matrix $(A^{mathrm{T}}Sigma A + alpha^2 L^{mathrm{T}} Sigma L)$ is not symmetric positive definite. The $(A^{mathrm{T}} A + alpha^2 L^{mathrm{T}} L)$ is symmetric positive definite. Plugging the result into MatLab for my particular matrices returns either 0 or NaN, depending on the value of n.
I need to obtain the properly normalized conditional PDF, so I need the correct marginal PDF as a normalization constant. Is this the right approach to be taking? What else should I try?
Thanks in advance.