Integral with spherical symmetry over cube Is it possible to calculate the integral
$$I = \int_{-1}^1 \mathrm dx \int_{-1}^1 \mathrm dy \int_{-1}^1 \mathrm dz \frac{1}{x^2 + y^2 + z^2}$$
analytically? I tried using spherical coordinates
$$I = \int_0^{r(\vartheta,\varphi)} \mathrm dr \int_0^\pi \mathrm d\vartheta \int_0^{2\pi} \mathrm d\varphi \sin(\vartheta) \;,$$
but I couldn't come up with a proper expression for $r(\vartheta,\varphi)$, which is the radial component for points on the boundary of the cube $[0,1]^3$.
 A: I. Spherical coordinates
Let's try to do this in spherical coordinates by brute force and see what happens. 
$$I = 16\int_R d \Omega \ d r,$$
where $R$ is the region for which $0\leq \theta\leq \pi/2$ and $0\leq\phi\leq \pi/4$.
This region splits into two parts.
In region 1, $0\leq\theta \leq \theta'$ and we integrate up to $z=1$, so $0\leq r \leq 1/\cos\theta$.
In region 2, $\theta' \leq\theta \leq \pi/2$ and we integrate to $x=1$, so $0\leq r \leq 1/(\sin\theta\cos\phi)$.
Here $\theta'$ is a function of $\phi$, $\tan\theta' = \sqrt{1+\tan^2\phi}$. 
Notice that $\cos\theta' = 1/\sqrt{2+\tan^2\phi}$. 
The integrals over region 1 and 2 are not elementary,
$$\begin{eqnarray*}
I_1 &=& 16 \int_0^{\pi/4} d\phi  \int_0^{\theta'} d\theta \ \sin\theta \int_0^{1/\cos\theta} dr \\
&=& 8  \int_0^{\pi/4} d\phi \ \ln(2+\tan^2\phi) \\
%%%
I_2 &=& 16 \int_0^{\pi/4} d\phi  \int_{\theta'}^{\pi/2} d\theta \ \sin\theta \int_0^{1/(\sin\theta \cos\phi)} dr \\
&=& 16 \int_0^{\pi/4} d\phi \ \sec\phi \ \left(\frac{\pi}{2} - \theta'\right) \\
&=& 8\pi\ln(1+\sqrt2) - 16 \int_0^{\pi/4} d\phi \ \sec\phi \ \tan^{-1}\sqrt{1+\tan^2\phi}.
\end{eqnarray*}$$
It is possible to go further with these integrals, but they are pretty ugly. 
Numerically they give $15.3482\cdots$. 
Let's try another approach. 
II. Divergence theorem
Let's put together the steps in the comments and make it obvious our final answer is real.
Using the divergence theorem for ${\bf F} = \hat r/r$ we find
$$I = 24\int_0^1 d x \int_0^1 d y \frac{1}{x^2+y^2+1},$$
and so, going to polar coordinates,
$$\begin{eqnarray*}
I &=& 48\int_0^{\pi/4} d \phi \int_0^{1/\cos\phi} d r \ \frac{r}{r^2+1} \\
&=& 24\int_0^{\pi/4} d\phi \ \ln(1+\sec^2\phi).
\end{eqnarray*}$$
This integral is nontrivial.
Let us try a series approach and expand in small $\phi$. 
We find 
$$\begin{eqnarray*}
I &=& 6\pi \ln 2 + 24\int_0^{\pi/4}d \phi \ \left[\ln\left(1-\frac{1}{2}\sin^2\phi\right) - \ln(1-\sin^2\phi)\right] \\
&=& 6\pi \ln 2 + 12\sum_{k=1}^\infty \frac{1}{k}\left(1-\frac{1}{2^k}\right) B_{\frac{1}{2}} \left(k+\frac{1}{2},\frac{1}{2}\right)
\end{eqnarray*}$$
where $B_x(a,b)$ is the incomplete beta function. 
The $k$th term of the sum goes like $1/k^{3/2}$. 
Notice that $6\pi \ln 2 \approx 13$ so the ``zeroeth'' term is already a pretty good approximation. 
Mathematica gives a result that doesn't appear explicitly real, but it can be massaged into
$$I = 24 \mathrm{Ti}_2(3-2\sqrt2) + 6\pi \tanh^{-1}\frac{2\sqrt2}{3} - 24 C,$$
where $\mathrm{Ti}_2(x)$ is the inverse tangent integral, with the series
$$\mathrm{Ti}_2(x) = \sum_{k=1}^\infty (-1)^{k-1} \frac{x^{2k-1}}{(2k-1)^2},$$
and $C$ is the Catalan constant.
A: The set of limits corresponds to a sphere of radius $1$ ($x$ ranges from $-1$ to $+1$; $y$ ranges from $-1$ to $+1$; and $z$ ranges from $-1$ to $+1$). Therefore we successively integrate: 
w.r.t.theta between zero and $\pi$;
 w.r.t. phi between zero and $2\pi$; 
and w.r.t. $r$ bet. zero and $1$ (radius vector extends from the origin to $1$).
Thus we get $4\pi$ for the answer. 
