Integration in spherical coordinates

76 Views Asked by At

I needed to solve the following integral on one of my exercise sheets, which seemed not too difficult:

$ \phi(\vec{r}) = \dfrac{1}{4\pi\epsilon_0} \int\limits_0^{\infty} dr' \int\limits_0^{\pi} d\theta' \int\limits_0^{2\pi} d\varphi' r'^2 \sin(\theta') \dfrac{L}{r'}\left( 1-e^{-\alpha r'} \right) \Theta(R-r') \dfrac{1}{\left|\vec{r}-\vec{r}'\right|} $

The solution suggests as a next step:

$ \phi(\vec{r}) = \dfrac{2\pi}{4\pi\epsilon_0} \int\limits_0^{R} dr'~ Lr'\left( 1-e^{-\alpha r'} \right) \int\limits_{-1}^{1} d(\cos\theta') \dfrac{1}{\sqrt{r^2 + r'^2 - 2rr'\cos\theta' }} $

My question is about the last factor: can you rewrite $\dfrac{1}{\left|\vec{r}-\vec{r}'\right|}$ as $\dfrac{1}{\sqrt{r^2 + r'^2 - 2rr'\cos\theta'}}$ with $\theta'$ being the former integration variable? As to my understanding the angle between $\vec{r}$ and $\vec{r}'$ should always have a $\varphi'$ dependency as well?!

If you chose $\vec{r} = (r,0,0)$ and $\vec{r}' = (r',\theta',\varphi')$ in spherical coordinates and let $\alpha$ be the angle between $\vec{r}$ and $\vec{r}'$ then $\cos\alpha = \dfrac{\vec{r}\cdot\vec{r}'}{rr'} = \cos\theta'\cos\varphi'$.

What am I missing?