Let $\mathcal{B}(x,r)$ the ball of center $x \in \mathbb{R}^n$ and radius $r>0$ (so $\mathcal{B}(x,r) = \{y \in \mathbb{R}^n : \|y-x\| \leq r\}$, where all norms are $\ell^2$-norms).


I would like to express the following integral analytically:


\begin{equation}
\int\_{\mathcal{B}(x,r)} \exp\left(\frac{-\|y-\mu\|^2}{2r^2}\right)dy.
\end{equation}


For $\mu=x$, there is an easy analytic expression in the literature, using radial symmetry. However, it seems more complicated to me when $\mu \neq x$, and I did not find a lot of literature on this case.


Is it possible to express this analytically? How could I proceed?



How to compute integral of a gaussian over a noncentered ball?
Without a real loss of generality, I can assume that $x=0$, $2r^2=1/π$, and I check
$$
J(x)=\int\_{\vert y\vert\le 1} e^{-π\vert x-y\vert^2} dy=(G\ast\mathbf 1\_{\mathbb B^n})(x),\qquad G(x)=e^{-π\vert x\vert^2}.
$$
The function $J$ is radial (if $A\in O(n)$, just calculate $J(Ax)$ by the change of variables $y=Az$) so that $J(x)=g(\vert x\vert)$ and thus
\begin{align}
g(r)
&=\int\_{\vert y\vert\le 1} e^{-π\vert r e\_1-y\vert^2} dy \\
&=\int\_{\vert y\_1\vert\le 1} \int\_{\vert y'\vert^2\le 1-y\_1^2}e^{-π(r-y\_1)^2-π \vert y'\vert^2} dy\\
&=\int\_{\vert t\vert\le 1}e^{-π(r-t)^2} \int\_0^{\sqrt{1-t^2}} e^{-π \rho^2} \rho^{n-2} d\rho \vert\mathbb S^{n-2}\vert dt \\
&=\int\_{\vert t\vert\le 1}e^{-π(r-t)^2} E\_{n-1}(\sqrt{1-t^2})dt,
\end{align}
where $E\_{n-1}$ is an Erf-type function. Not very explicit, but an integral in 1D.


