Evaluation of the integral $\int_{0}^{R}\int_{-1}^{1} r^2/\sqrt{r^2+L^2+2L\alpha}\,d\alpha dr$ I am trying to solve this integral 
$$
\int_{0}^{R}\int_{-1}^{1}\frac{r^{2}\,{\rm d}\alpha\,{\rm d}r}{\,
\sqrt{\vphantom{\Large A}\,r^{2} + L^{2} + 2L\alpha\,}\,}
$$
where $L$ is some positive number.
The original question was to calculate the integral $$\iiint_A \frac{dxdydz}{\sqrt{x^2+y^2+(L-z)^2}}$$
Where $A$ is a sphere with radius $R$ and center at the origin, and $0 < R < L$, but after moving to spherical coordinates and then doing a variable switch i ended up with the double integral above. How would I do this? 
Note: We can use Fubini's theorem to first integrate with respect to $r$ but i think that would be even harder.
 A: Letting $A$ denote the region corresponding to the ball of radius $R$ centered at the origin and supposing that $L>R$, the volume integral over $A$ is computed in spherical coordinates as follows:
$$\begin{align}
\iiint_A \frac{dxdydz}{\sqrt{x^2+y^2+(L-z)^2}}&=\int_{0}^{2\pi}\int_{0}^{\pi}\int_{0}^{R}\frac{r^2\sin{\theta}\,\mathrm{d}r\mathrm{d}\theta\mathrm{d}\phi}{\sqrt{r^2-2Lr\cos{\theta}+L^2}}\\
&=2\pi\int_{0}^{\pi}\int_{0}^{R}\frac{r^2\sin{\theta}\,\mathrm{d}r\mathrm{d}\theta}{\sqrt{r^2-2Lr\cos{\theta}+L^2}}\\
&=2\pi L^2\int_{0}^{\pi}\int_{0}^{R/L}\frac{x^2\sin{\theta}\,\mathrm{d}x\mathrm{d}\theta}{\sqrt{x^2-2x\cos{\theta}+1}}\\
&=2\pi L^2\int_{0}^{R/L}\mathrm{d}x\int_{0}^{\pi}\mathrm{d}\theta\frac{x^2\sin{\theta}}{\sqrt{x^2-2x\cos{\theta}+1}}\\
&=2\pi L^2\int_{0}^{R/L}\mathrm{d}x\int_{-1}^{1}\mathrm{d}u\frac{x^2}{\sqrt{x^2+2xu+1}}\\
&=2\pi L^2\int_{0}^{R/L}\mathrm{d}x\left(2x^2\right)\\
&=2\pi L^2\left(\frac23 \frac{R^3}{L^3}\right)\\
&=\frac{4\pi R^3}{3L}.
\end{align}$$
A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
\begin{align}&\color{#66f}{\large\iiint_{A}
{\dd x\,\dd y\,\dd z \over \root{x^2 + y^2 + \pars{L - z}^{2}}}}
=\\[3mm]&\int_{0}^{2\pi}\dd\phi\int_{0}^{R}\dd r\,r^{2}
\int_{0}^{\pi}\dd\theta\,\sin\pars{\theta}
\sum_{\ell = 0}^{\infty}
{r^{\ell} \over \verts{L}^{\ell + 1}}{\rm P}_{\ell}\pars{\cos\pars{\theta}}
\\[3mm]&=2\pi\int_{0}^{R}\dd r\,r^{2}
\sum_{\ell = 0}^{\infty}
{r^{\ell} \over \verts{L}^{\ell + 1}}\ \overbrace{%
\int_{0}^{\pi}{\rm P}_{\ell}\pars{\cos\pars{\theta}}\sin\pars{\theta}\,\dd\theta}
^{\ds{=\ 2\,\delta_{\ell 0}}}
\\[3mm] = &\ {4\pi \over \verts{L}}\int_{0}^{R}r^{2}\,\dd r
=\color{#66f}{\large{4\pi R^{3} \over 3\verts{L}}}
\end{align}

$\ds{{\rm P}_{\ell}\pars{x}}$ is a
Legendre Polynomial.

A: Well you can consider spherical co-ordinates $r,\theta,\phi$, so you get
$$ \iiint \frac{ dx dy dz}{\sqrt{x^2+y^2+\big[z - L\big]^2}} = \iiint \frac{r^2 \sin(\theta) dr d\theta d\phi}{\sqrt{r^2 + L^2 - 2 r L \cos(\theta)}} $$
Consider the substitution
$$ \ell^2 = r^2 + L^2 - 2 r L \cos(\theta) $$
Then we get
$$ 2 \ell d\ell = 2 r L \sin(\theta) d\theta $$
so
$$ \frac{\sin(\theta) d\theta}{\ell} = \frac{d\ell}{rL} $$
So we can write the integral as
$$ \iiint \frac{r dr d\ell d\phi}{L} $$
Using the boundaries we can write
$$ \int_0^R dr \int_{|r-L|}^{|r+L|} d\ell \int_0^{2\pi} d\phi \frac{r}{L} $$
First integrate $\phi$ gives
$$ 2 \pi \int_0^R dr \int_{|r-L|}^{|r+L|} d\ell \frac{r}{L} $$
Next integrate $\ell$ gives
$$ 2 \pi \int_0^R dr \left[ \frac{r\ell}{L} \right]_{|r-L|}^{|r+L|} = 4 \pi \int_0^R dr \frac{r^2}{L} $$
And last integrate $r$ gives
$$ \frac{4 \pi R^3}{3 L} $$
A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
This is the potential $\ds{\Phi\pars{L\,\hat{z}}}$ due to a uniform charged sphere at a point outside it. The point is at a distance $\ds{\verts{L}}$ from the sphere center. 
The total charge of the sphere is $\ds{q = \int_{A}1\,{\rm d}^{3}\vec{r} = {4 \over 3}\,\pi R^{3}}$.

So,
  $$
\Phi\pars{L\,\hat{z}} = {q \over \verts{L}} = {4\pi R^{3} \over 3\verts{L}}
$$

