# I have a trouble with integrate $\frac{1}{\sqrt{x^2+y^2+z^2}} \,dx\,dy$

I want to integrate $$\int_0^{L/2}\int_0^{L/2} \frac{1}{\sqrt{x^2+y^2+z^2}} \,dx\,dy\$$ It looks simple, but I can't integrate. I calculate inner integral, so the result is $$\int_0^{L/2} \left[ \ln(L/2+\sqrt{(L/2)^2+y^2+z^2}) - \ln(\sqrt{y^2+z^2}) \right]\,dy$$ but I can't finish this integral. What should I do?

• What are the limits of the integral in the third variable? Is there one $\int_0^{L/2}$ missing? – mickep Aug 22 '17 at 6:34
• @mickep I'm sorry. I rewrite the integral. – Ted Aug 22 '17 at 7:09

I will just give some outlines. First, write your integral as a double integral, use symmetry to write it for half the square only, and then change the coordinates to polar coordinates. You will end up with $$I=2\iint_D\frac{r}{\sqrt{r^2+z^2}}\,dr\,d\phi$$ where $$D=\{(r,\phi)~|~0<r<L/(2\cos\phi),\ 0<\phi<\pi/4\}.$$ Integrating in $r$ becomes easy, and you find that $$I=2\int_0^{\pi/4}\sqrt{z^2+\frac{L^2}{4\cos^2\phi}}-|z|\,d\phi.$$ Let $u=\tan\phi$, do some calculations, and you will find that a primitive to the integrand is given by $$z\arctan\biggl(\frac{z\tan\phi}{\sqrt{z^2+L^2/(4\cos^2\phi)}}\biggr)+\frac{L}{2}\mathop{\text{artanh}}\biggl(\frac{(L/2)\tan\phi}{\sqrt{z^2+L^2/(4\cos^2\phi)}}\biggr)-|z|\phi.$$ Inserting limits, you end up with
$$I=2z\arctan\biggl(\frac{z}{\sqrt{z^2+L^2/2}}\biggr)+L\mathop{\text{artanh}}\biggl(\frac{L/2}{\sqrt{z^2+L^2/2}}\biggr)-\frac{\pi}{2}|z|.$$
• Next substitution I made was $$v=\frac{u}{\sqrt{z^2+L^2(1+u^2)/4}}$$ – mickep Aug 24 '17 at 13:29