<s>[INST] Is there a nice way to evaluate $\iiint_{E}\, \frac{dx\,dy \,dz}{\sqrt{x^2+y^2+(z-b)^2}}$ where $E:x^2+y^2+z^2\leq a^2$ 
Is there a nice way to evaluate $$\displaystyle\iiint_{E}\, \dfrac{dx\,dy\,dz}{\sqrt{x^2+y^2+(z-b)^2}}$$ where   $E:x^2+y^2+z^2\leq a^2$ with
    $0<a<b$

If I use the standard spherical coordinates (Is there a better transformation?)
$$x=p\sin(\phi)\cos(\theta) $$
$$y=p\sin(\phi)\sin(\theta)$$
$$z=p\cos(\phi)$$
$$|J|=p^2\sin(\phi)$$
$$\iiint_{E}\, \frac{dx\,dy \,dz}{\sqrt{x^2+y^2+(z-b)^2}} $$
$$=\int_{\phi=0}^{\pi}\,\int_{\theta=0}^{2\pi}\,\int_{p=0}^{a}\, \frac{p^2\sin(\phi)\,dp\,d\theta \,d\phi}{\sqrt{p^2\sin^2(\phi) + (p\cos(\phi)-b)^2}}$$ 
$$=\int_{\phi=0}^{\pi}\,\int_{\theta=0}^{2\pi}\,\int_{p=0}^{a}\, \frac{p^2\sin(\phi)\,dp\,d\theta \,d\phi}{\sqrt{(p-b\cos(\phi))^2 + b^2\sin^2(\phi)}}$$
Which I'm finding bit difficult. 
 [/INST] Fubini split w.r.t. the $z$-component. Let $J$ be the integral to be calculated. I will use 
$B(0,r)$ for a ball centered in $0$ with radius $r$ (in the dimension that 
can be extracted from the context.) 
Then:
$$
\begin{aligned}
J &=
\iiint_{B(0,a)}\frac 1{\sqrt{x^2+y^2+(b-z)^2}}\; dx\; dy\; dz
\\
&=
\int_{z\in B(0,a)}dz
\iint_{(x,y)\in B(0,\sqrt{a^2-z^2})}\frac 1{\sqrt{x^2+y^2+(b-z)^2}}\; dx\; dy
\\
&=
\int_{-a}^a dz
\int_{r\in[0,\sqrt{a^2-z^2}]}
\int_{t\in[0,2\pi]}
\frac 1{\sqrt{r^2+(b-z)^2}}\; r\; dr\; dt
\\
&=
\int_{-a}^a dz
\int_0^{\sqrt{a^2-z^2}}
2\pi\Big(\ (r^2+(b-z)^2)^{1/2}\ \Big)'\; dr
\\
&=
2\pi
\int_{-a}^a dz\;
\Big[\ (r^2+(b-z)^2)^{1/2}\ \Big]_0^{\sqrt{a^2-z^2}}
\\
&=
2\pi
\int_{-a}^a dz\;
\Big[\ (a^2-z^2+(b-z)^2)^{1/2}-(0^2+(b-z)^2)^{1/2}\ \Big]
\\
&=
2\pi
\int_{-a}^a dz\;
\Big[\ (a^2-2bz+b^2)^{1/2}-(b-z)\ \Big]
\\
&=
2\pi
\left[\ -\frac 1{2b}\cdot \frac 1{3/2}(a^2-2bz+b^2)^{3/2}
+\frac 12(b-z)^2\ \right]_{-a}^a
\\
&=
\frac {2\pi}{3b}\Big[\ (b+a)^3-(b-a)^3\ \Big]
-
\pi\Big[\ (b+a)^2-(b-a)^2\ \Big]
\\
&
=
\frac {2\pi}{3b}\cdot 2a^3
=
\frac {4\pi\, a^3}{3b}\ .
\end{aligned}
$$
Check using sage:
sage: var( 'r,t,z,a,b' );
sage: assume(a>0)
sage: assume(b>a)
sage: J = integral( integral( integral( r/sqrt(r^2+(z-b)^2), t,0,2*pi ), r,0,sqrt(a^2-z^2) ), z,-a,a )
sage: J.canonicalize_radical()
4/3*pi*a^3/b


Here is the computation of the integral for its version "without the square root in the denominator"...
$$
\begin{aligned}
J &=
\iiint_{B(0,a)}\frac 1{x^2+y^2+(b-z)^2}\; dx\; dy\; dz
\\
&=
\int_{z\in B(0,a)}dz
\iint_{(x,y)\in B(0,\sqrt{a^2-z^2})}\frac 1{x^2+y^2+(b-z)^2}\; dx\; dy
\\
&=
\int_{-a}^a dz
\int_{r\in[0,\sqrt{a^2-z^2}]}
\int_{t\in[0,2\pi]}
\frac 1{r^2+(b-z)^2}\; r\; dr\; dt
\\
&=
\int_{-a}^a dz
\int_0^{\sqrt{a^2-z^2}}
2\pi\cdot\frac 12\Big(\ \ln(r^2+(b-z)^2)\ \Big)'\; dr
\\
&=
\pi
\int_{-a}^a dz\;
\Big[\ \ln(r^2+(b-z)^2)\ \Big]_0^{\sqrt{a^2-z^2}}
\\
&=
\pi
\int_{-a}^a dz\;
\Big[\ \ln(a^2-z^2+(b-z)^2)-\ln(0^2+(b-z)^2)\ \Big]
\\
&=
\pi
\int_{-a}^a dz\;
\Big[\ \ln(a^2-2bz+b^2)-2\ln(b-z)\ \Big]
\\
&=
\pi
\left[\ -\frac 1{2b}(a^2-2bz+b^2)(\ln(a^2-2bz+b^2)-1)+2(b-z)(\ln(b-z)-1)\ \right]
_{-a}^a
\\
&=
\pi
\left[\ 
-\frac 1{2b}(b-a)^2(2\ln(b-a)-1)
+\frac 1{2b}(b+a)^2(2\ln(b+a)-1)
\right.
\\
&\qquad\qquad
\left.
+2(b-a)(\ln(b-a)-1)
-2(b+a)(\ln(b+a)-1)
\ \right]
\\
&=
2\pi\ln(b+a)\cdot\left[\frac 1b(b+a)^2-2(b+a)\right]
-
2\pi\ln(b-a)\cdot\left[\frac 1b(b-a)^2-2(b-a)\right]
+2\pi a
\\
&=
2\pi\frac 1b(b^2-a^2)\ln\frac {b-a}{b+a}+2a\pi\ .
\end{aligned}
$$
</s>