# $\iiint\limits_{D}\frac{dxdydz}{\sqrt{x^2+y^2+(z-\frac{1}{2})^2} }$ D is given by $x^2+y^2+z^2 \leq 1$

$$\iiint\limits_{D}\frac{dxdydz}{\sqrt{x^2+y^2+(z-\frac{1}{2})^2} }$$ D is given by $$x^2+y^2+z^2\leq1$$

I try to use $$\left\{\begin{matrix} x=r\sin \phi \cos \theta \\ y=r\sin \phi \sin \theta \\ z=r\cos\phi \end{matrix}\right.$$ while the Jacobian is $$r^2 \sin \phi$$ and $$\left\{\begin{matrix} 0\leq \theta \leq 2\pi\\ 0\leq \phi \leq \pi \\0\leq r \leq 1\end{matrix}\right.$$ $$\iiint\limits_{D}\frac{dxdydz}{\sqrt{x^2+y^2+(z-\frac{1}{2})^2} }\Rightarrow\int _{0}^{2\pi}d\theta \int _{0}^{\pi}d\phi \int _{0}^{1}\dfrac{r^{2}\sin \phi }{\sqrt{r^{2}-r\cos \phi +\dfrac{1}{4}}}dr$$ but it seems tough to do next.

• Change the order of integration: first $\phi$, then $r$. Or try in cylindrical coordinates, and integrate first on $r$. Nov 11, 2022 at 10:56
• You can evaluate the integral by either 1) expand the denominator using Legendre polynomial or 2) shifting the origin to $(0,0,\frac12)$ and integral along $r$ first. If you group contribution from angle $\phi$ and $\pi - \phi$ . The remaining integral will be a simple polynomial in $\cos\phi$. Nov 11, 2022 at 10:56
• @achillehui for (2), I was wondering how to determine the value of r. I don't understand " If you group contribution from angle 𝜙 and 𝜋−𝜙", how this works? Nov 11, 2022 at 12:33
• Let $a = \frac12$. After you shift the origin to $(0,0,a)$, the limit for $r$ along the direction $\phi$ and $\pi -\phi$ are $r_1$ and $-r_2$ where $r_1,r_2$ are roots of the quadratic equation $r^2 - 2ra\cos\phi + a^2 - 1 = 0$. After the integral along $r$, the sum of contribution from $\phi$ and $\pi - \phi$ will be proportional to $r_1^2 + r_2^2$ which can be expressed in terms of coefficients of above quadratic equation. Nov 11, 2022 at 14:57

$$I=\int _{0}^{2\pi}d\theta \int _{0}^{\pi}d\phi \int _{0}^{1}\dfrac{r^{2}\sin \phi }{\sqrt{r^{2}-r\cos \phi +\dfrac{1}{4}}}dr=2\pi\int _{0}^{1}dr \int _{0}^{\pi}\dfrac{r^{2}\sin \phi }{\sqrt{r^{2}-r\cos \phi +\dfrac{1}{4}}}d\phi.$$ Let $$\cos\phi=t \implies \sin\phi d\phi=-dt$$, then $$I=2\pi \int_{0}^{1}dr \int_{-1}^{1}\frac{r^2 dt}{\sqrt{r^2-rt+1/4}} dt=2\pi\int_{0}^{1} 2r (r+1/2)-|r-1/2|] dr =2\pi[\int_{0}^{1/2}4r^2 dr +\int_{1/2}^{1}2rdr ]$$ $$=2\pi[1/6+(1-1/4)]=\frac{11}{6}\pi.$$