I'm trying to calculate the integral $$\int_{x^2+y^2+z^2 \leq 1}\frac{dx\,dy\,dz}{x^2+y^2+(z-2)^2}.$$
I've tried in two methods:
Regular spherical coordinates, but this leads to really unfun integrals and logarithms with negative numbers inside them and other beasts I'd rather avoid.
The other method was to try shifted spherical coordinates, $x = r\sin(\theta)\cos(\phi), y=r\sin(\theta)\sin(\phi)$ but $z-2 = r\cos(\theta)$.
Now the integral is very easy but finding the limits of integration is tougher. We still have $0 < \theta < \pi$ and $0 < \phi < 2\pi$, I think, but the limits on $r$ are harder.
At the very limit of the domain of integration we have $x^2+y^2+z^2 = 1$, so $r^2+4r\cos(\theta)+4 = 1$, so we need to have $r^2+4r\cos(\theta) + 3 = 0$.
This happens when $$r = \frac{-4\cos(\theta)\pm\sqrt{16\cos^2(\theta)-12}}{2}.$$ I don't know how this helps us or if I'm going in the right direction.
The unfun way:
$\int_{x^2+y^2+z^2 \leq 1}\frac{dxdydz}{x^2+y^2+(z-2)^2} = \int_{0}^{1}\int_{0}^{\pi}\int_{0}^{2\pi}\frac{r^2\sin(\theta)}{r^2-4r\cos(\theta)+4}d\phi d\theta dr = 2\pi \int_{0}^{1}\int_{0}^{\pi}\frac{r^2\sin(\theta)}{r^2-4r\cos(\theta)+4}d\theta dr $
Use $u-$substitution $u=\cos(\theta)$ to get:
$2\pi \int_{0}^{1}\int_{0}^{\pi}\frac{r^2\sin(\theta)}{r^2-4r\cos(\theta)+4}d\theta dr =-2\pi \int_{0}^{1}\int_{1}^{-1}\frac{r^2}{r^2-4ru+4}dudr = 2\pi\int_{0}^{1}\int_{-1}^{1}\frac{r^2}{r^2-4ru+r}dudr = 2\pi\int_{0}^{1}r^2[\frac{\ln(r^2-4ru+4)}{-4r}]_{-1}^{1}dr = -\frac{\pi}{2}\int_{0}^{1}r(\ln(r^2-4r+4) - \ln(r^2+4r+4))dr=-\pi\int_{0}^{1}r(\ln(|r-2|)-\ln(r+2))dr$
Is this the right way? seems very unpleasant...