Today I was trying to solve a physics exercise and ran into some mathematical problems. Consider two concentric spheres $K_{1,2}$ with radii $R_{1,2}$. I wanna solve the following integral:
$$E_{ij} = \frac{\sigma_i \sigma_j}{4 \pi \epsilon_0} \int_{K_i} d^2 r \int_{K_j} d^2 r' \frac{1}{|\vec{r} - \vec{r}'|} e^{-\mu |\vec{r} - \vec{r}'|}$$
The suggested solutions simply says "we calculate $|\vec{r} - \vec{r}'| = \sqrt{R_i^2 + R_j^2 - 2 R_i R_j \cos \theta '}$" where $\theta '$ is the same angle as the polar angle in the spherical coordinate system of $\vec{r'}$, which allows me to compute the integral over $K_i$ independently. Now I know that the formula is true and why if $\theta'$ were the angle between the vectors $\vec{r}$ and $\vec{r}'$ but I can't see why this angle would coincide with the polar angle of the $r'$ coordinate system.
I tried to compute this by hand, i.e. taking the scalar product of $\vec{r} \cdot \vec{r}'$ but I get nowhere near this solution.
Some help would be appreciated, thank you!
Cheers!