# How can integrate the square of a 3D Gaussian distribution?

While I understand how we can integrate the usual one-dimensional Gaussian distribution $$I = \int_{-\infty}^\infty e^{-(x-\mu)^2/(\sigma)^2} ,$$ I'm currently struggling with its three-dimensional analogue:

$$I = \int d^3x \mathrm{e}^{-\frac{(\vec{x}-\vec{\mu})^2}{\sigma^2}} .$$ Substituting $$\vec z \equiv \frac{(\vec{x}-\vec{\mu}')}{\sigma}$$ we find \begin{align} I &= \int d^3z \, \sigma \mathrm{e}^{-(\vec{z})^2} \\ &= \sigma \int dz_1 \mathrm{e}^{-(z_1)^2} \int dz_2 \mathrm{e}^{-(z_2)^2} \int dz_3 \mathrm{e}^{-(z_3)^2} \\ &= \sigma \sqrt{\pi} \sqrt{\pi} \sqrt{\pi} \\ &= \sigma \sqrt{\pi}^3 \, . \end{align} Is this correct?

No it is not correct, the final answer should be $$I_1^3=\sigma^3\,(\pi\cdot)^{3/2}$$, where $$I_1$$ is the integral in one dimension. Your idea was in principle right but you have to be more careful with the substitution, take into account that $$d^3z=\frac{d^3x}{\sigma^3}$$.

• thanks! Using this modification, however, I end up with $\sigma^3 \sqrt{\pi}^3$ instead of $\sqrt{\sigma \pi}^3$. The factor $\sigma^3$ is a result of the modified norm and I don't see why it should become $\sqrt{\sigma}^3$ – jak Oct 26 '19 at 13:01
• Sorry, I made a typo, you are right! I edited my answer. – Peter Oct 26 '19 at 13:03
• awesome, thanks a lot! – jak Oct 26 '19 at 13:04