# Integration for finding potential inside uniformly charged solid sphere

I'm working the following problem:

Use equation 2.29 to calculate the potential inside a uniformly charged solid sphere of radius R and total charge q.

Equation 2.29 is as follows:

$$V(r) = \frac {1}{4\pi \epsilon_0} \int \frac {\rho(r \prime) }{\mu} d \tau\prime$$

In which $\mu$ is what I've used to denote the separation vector, because I don't know what script r is in MathJax, and the primes are used by the author to avoid confusion over similar variables rather than indicate derivatives.

So I tried to work this and got the wrong expression, and then decided to take a peek at the solution (attached below). I understand what he's doing up until he integrates over $d\theta$. What is he doing? How does he get integrate and then after that, how does he arrive at the absolute value expression? After that interval I pick up his trail again but between those two questions, I'm completely lost.

(from Introduction to Electrodynamics 4th Ed by Griffiths)