<s>[INST] Integrating over a sphere Suppose $x\in\mathbb{R}^n$ is a random unit vector distributed uniform over the $(n-1)-$sphere $S_{n-1}$ (the set of unit vectors in $\mathbb{R}^n$ ). For an arbitrary vector $y\in\mathbb{R}^n$ how does one evaluate 
$$\int_{S_{n-1}}e^{-||y-x||_2^2}\mathrm{d}\mu$$ 
where $\mu$ denotes the uniform measure over $S_{n-1}$.
My attempt:
Expanding $||y-x||_2^2=||y||_2^2+2\langle x,y\rangle+||x||_2^2$, I can reduce the integral to
$$e^{-||y||_2^2-1}\int_{S_{n-1}}e^{2\langle x,y\rangle}\mathrm{d}\mu.$$
From here, I am not able to proceed.
Can someone provide some pointers?
 [/INST] As remarked by @md2perpe, since the $(n-1)$ sphere is invariant under rotation, then you could simply apply a change of variable given by $x=Rx'$, where $R$ is an orthogonal matrix, such that $R^\ast y=e_1 = (1, 0, \ldots, 0)$. Then we see that
\begin{align}
\int_{S^{n-1}}  e^{-|x-y|^2}\ d\mu(x) = \int_{S^{n-1}}  e^{-|Rx'-y|^2}\ d\mu(x') = \int_{S^{n-1}} e^{-|x'-e_1|^2}\ d\mu(x').
\end{align}
Next, notice
\begin{align}
\int_{S^{n-1}} e^{-|x-e_1|^2}\ d\mu(x) =&\ \int_{S^{n-1}} e^{-(x_1-1)^2-x_2^2-\ldots -x_n^2}\ d\mu(x) = \int_{S^{n-1}} e^{2x_1} e^{-|x|^2-1}\ d\mu(x)\\
=&\ e^{-2} \int_{S^{n-1}} e^{2x_1}\ d\mu(x).
\end{align}
Finally, we could parametrize the sphere by spherical coordinates
\begin{align}
(\cos \theta_1, \sin\theta_1 \cos\theta_2, \sin\theta_1 \sin\theta_2\cos\theta_3,  \ldots, \sin\theta_1\sin\theta_2\cdots\sin\theta_{n-1})
\end{align}
with $0<\theta_i<\pi$ for $i=1, \ldots, n-2$ and $0<\theta_{n-1}\leq 2\pi$. This gives us
\begin{align}
&\int^{2\pi}_0\cdots \int^{\pi}_0 e^{2\cos\theta_1} \sin^{n-2}\theta_1\sin^{n-3}\theta_2\cdots \sin\theta_{n-2}\ d\theta_1\cdots d\theta_{n-1}\\
&=2\pi \left(\int^\pi_0 e^{2\cos\theta_1}\sin^{n-2}\theta_1 d\theta_1\right)\left( \int^\pi_0 \sin^{n-3}\theta_2\ d\theta_2\right)\cdots \left(\int^\pi_0 \sin\theta_{n-2}\ d\theta_{n-2} \right)
\end{align}
Additional: As pointed out by @JohnHughes, we should have
\begin{align}
\int_{S^{n-1}}e^{-|x-y|^2} d\mu(x) = e^{-|y|^2-1} \int_{S^{n-1}}e^{2|y|x_1} d\mu(x).
\end{align}
Anyhow, to evaluate
\begin{align}
I(\alpha, n)=\int^\pi_0 e^{\alpha \cos\theta} \sin^{n-2}\theta\ d\theta
\end{align}
we will consider two cases, $n$ odd and $n$ even.
When $n>1$ is odd, we see that
\begin{align}
\int^\pi_0 e^{\alpha \cos\theta} \sin^{n-2}\theta\ d\theta= \int^1_{-1}e^{\alpha u} (1-u^2)^{(n-3)/2}\ du = \int^1_{-1}e^{\alpha u} (1-u^2)^k\ du
\end{align}
for some positive integer $k$. Hence we could compute the integral by standard integration by parts method (extremely tedious). In the special case $n=3$, we have that
\begin{align}
\int^{\pi}_0 e^{2|y| \cos\theta} \sin\theta\ d\theta = \int^1_{-1}e^{2|y|u}\ du = \frac{e^{2|y|}-e^{-2|y|}}{2|y|} = \frac{\sinh(2|y|)}{|y|}
\end{align}
which means
\begin{align}
\int_{S^2} e^{-|x-y|^2} d\mu(x) = 4\pi e^{-|y|^2-1} \frac{\sinh(2|y|)}{2|y|}.
\end{align}
In particular, when $y=0$, we see that the above answer give $\frac{4\pi}{e}$ which is precisely the surface area times the value of $e^{-|x|^2}$ on the unit $2$-sphere. 
For the $n$ even case, we will only consider $n=2, 4$. We start by considering the case $n=2$ to get
\begin{align}
\int^\pi_0 e^{\alpha \cos\theta} \ d\theta
\end{align}
which requires special functions to evaluate. In particular, we have that
\begin{align}
\int^\pi_0 e^{\alpha \cos\theta} \ d\theta= \pi I_0(\alpha)
\end{align}
where $I_0$ is the $0$th modified Bessel function of the first kind. Hence we see that
\begin{align}
\int_{S^1} e^{-|x-y|^2} d\mu(x) = \pi e^{-|y|^2-1} I_0(2|y|)
\end{align}
which gives us $\frac{\pi}{e}$ when $y=0$. 
For the $n=4$ case, we see that
\begin{align}
\int^\pi_0 e^{\alpha \cos\theta} \sin^2\theta\ d\theta = \int^\pi_0 e^{\alpha \cos\theta} \frac{1-\cos 2\theta}{2} d\theta = \frac{\pi}{2}I_0(\alpha)-\frac{1}{2}\int^\pi_0e^{\alpha \cos\theta}\cos 2\theta\ d\theta.
\end{align}
To evaluate the latter integral we will need to use higher modified Bessel functions
\begin{align}
I_k(\alpha) = \frac{1}{\pi} \int^\pi_0 e^{\alpha \cos\theta}\cos k\theta d\theta
\end{align}
where $k$ is a positive integer. Hence it follows
\begin{align}
\int^\pi_0 e^{\alpha \cos\theta} \sin^2\theta\ d\theta= \frac{\pi}{2}(I_0(\alpha)-I_2(\alpha)).
\end{align}
Then we see that
\begin{align}
\int_{S^3} e^{-|x-y|^2} d\mu(x) = 2\pi^2 e^{-|y|^2-1}\{I_0(2|y|)-I_2(2|y|)\}
\end{align}
which gives us the expected value $\frac{2\pi^2}{e}$ when $y=0$. 
</s>