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.
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} $$