# Azimuthal and polar integration of a 3D Gaussian

1. Sep 28, 2012

### Wox

Numerical evaluation of the following integral of a 3D gaussian $G$ seems to result in a 1D Gaussian $g$ (or at least very close to one)
$$\int_{0}^{2\pi}\!\!\int_{0}^{\pi}G(R,\phi,\theta) \sin\theta\ \text{d}\theta \ \text{d}\phi= g(R)$$
where the 3D Gaussian in spherical coordinates with mean $\mu$ and covariance matrix $\Sigma$
$$G(R,\phi,\theta)=H \exp\left[-\frac{1}{2}(X-\mu)^{T}\cdot \Sigma^{-1}\cdot (X-\mu)\right]$$
$$X=\begin{bmatrix}R\cos\phi\sin\theta\\\ R\sin\phi\sin\theta\\\ R\cos\theta\end{bmatrix}$$
and the 1D Gaussian with mean $R_\mu$ and variance $\sigma^2$
$$g(R)=H'\exp\left[-\frac{(R-R_\mu)}{2\sigma^2}\right]$$
The question is: is this true and how do the parameters of $g$ relate to the parameters of $G$?

My attempt to solve this problem involved transforming $G$ so that $\mu=(0\ 0\ R_\mu)$ (adapting $\Sigma$ in the process) and substitute $z=\cos\theta$. After some basic math I get the following
$$\int_{0}^{2\pi}\!\!\int_{0}^{\pi}G(R,\phi,\theta) \sin\theta\ \text{d}\theta \ \text{d}\phi=\int_{0}^{2\pi}\!\!\int_{-1}^{1}\exp(Az^2 + (Bz+C)\sqrt{1-z^2}+Dz+E) \text{d}z \ \text{d}\phi$$
where $A,\ldots,E$ depend on azimuth $\phi$. Alternatively this can be written as
$$\int_{0}^{2\pi}\!\!\int_{0}^{\pi}G(R,\phi,\theta) \sin\theta\ \text{d}\theta \ \text{d}\phi=\int_{-1}^{1}\!\!\int_{0}^{2\pi}\exp(A_{1}\cos(2\phi+ \delta_{1})+A_{2}\cos(2\phi+\delta_{2})+A_{3}) \text{d}\phi \ \text{d}z$$
where $A_1,\ldots,A_3$ depend on $z$. However I was unable to solve either of these integrals over $z$ or $\phi$, let alone solve the double integral.