Evaluate integral $\int_{ |\vec{r}|\le R }\frac{y}{|\vec{r}-\vec{r}~'|}d^3V$ I'm working on an exercise in GR and it involves Poisson's equation with a spherical source which depends on the coordinate $y$:
$$\nabla^2 h(\vec{r})=\begin{cases}16\pi \rho\Omega y, && |\vec{r}|\leq R \\0, && |\vec{r}|\geq R\end{cases}$$
The general solution to this requires me to find this integral over the sphere of radius $R$:
$$h(\vec{r})=-4\Omega \rho\int_{|\vec{r}|\leq R}\frac{ y'}{|\vec{r}-\vec{r}~'|}d^3V'$$
I try to do this by working in cylindrical coordinates, $s$, $\theta$, and $z$, turning the integral into the following:
\begin{align*}
\int\frac{y'}{|\vec{r}-\vec{r}~'|}d^3V'&=\int\int\int\frac{s'\sin\theta(s'd\theta)ds'dz}{\sqrt{(z-z')^2+s^2+s'^2-2ss'\cos\theta}}\\
&=\int\int\int^{\theta=\pi}_{\theta=-\pi}\frac{s'^2\sin\theta ~d\theta~ ds'dz}{\sqrt{(z-z')^2+s^2+s'^2-2ss'\cos\theta}}
\end{align*}
where I have used the Law of Cosines to find $|\vec{r}-\vec{r}~'|$. I am assuming that $\vec{r}$ points along the $\theta=0$ direction (WLOG due to $\theta$ symmetry), so the polar angle between $\vec{r}$ and $\vec{r}~'$ is still $\theta$.
However, I'm stuck here, as the integrand is an odd function of $\theta$, giving me zero (which is not the correct answer) when my bounds are $\theta=-\pi$ to $\theta=\pi$.
 A: To evaluate the integral, assume
$$\vec r’= d(\cos\alpha\sin\beta, \sin\alpha\sin\beta, \cos\beta)$$
where $(d,\alpha,\beta)$ is the spherical coordinates of $\vec r’$. Then, rotate the axes from $(x,y,z)$ to $(u,v,w)$ such that $\vec r’$ is aligned with the $w$-axis, which leads to
$$ y= u\cos\beta\sin\alpha +v \cos\alpha +w \sin\alpha \sin \beta$$
and the integral in the $(u,v,w)$ coordinates is
$$I=\int_{|\vec{r}|\leq R}\frac{ y}{|\vec{r}-\vec{r}~'|}dxdydz
= \int_{|\vec{r}|\leq R}\frac{ w\sin\alpha\sin\beta}{|\vec{r}-\vec{r}~'|}dudvdw
$$
where the terms involving $u$ and $v$ are ignored because they do not contribute to the integral due to symmetry with respect to the $w$-axis. Then, in spherical coordinates
$$I = 2\pi \sin\alpha\sin\beta \int_0^\pi \int_0^R
\frac{r^3\cos\theta\sin\theta}{\sqrt{ d^2-2dr\cos \theta +r^2}}dr d\theta
$$
Integrate over $\theta $ and then $r$ to obtain
$$I = \frac{4\pi \sin\alpha\sin\beta }{3d^2} \int_0^R
r^4dr=  \frac{4\pi R^5\sin\alpha\sin\beta }{15 d^2} 
$$
