Dirac delta, Heaviside step, and volume charge density Context
There are many questions on this web cite related to the question at hand. None of them meet my needs. While reading [1], I came across the following:

"A ring of charge of radius $a$ and total charge $Q$... The charge density of the ring can be written with the help of delta function in angle and radius as
$$\rho(\mathbf{x}') = \frac{Q}{2\,\pi\,a^2}\,\delta(r'-a)\,\delta(\cos\theta').\text{''} $$

Indicated graphically is that the ring of charge is around the origin and it horizontal. Therefore, $\theta' = \frac{\pi}{2}$ around the entire ring.
I am going to first re-write Jackson's $\rho$ in a form that I am more familiar with, and then I am going to integrate the density to see if I can recuperate the ring's total charge $Q$. From [2], I know that $\delta(cos\theta'- cos\theta)= \frac{\delta(\theta'-\theta)}{\sin\theta}$.
In light of this, I can rewrite Jackson's density charge as
$$\rho(\mathbf{x}') = \frac{Q}{2\,\pi\,a^2}\,\delta(r'-a)\,\frac{\delta\left(\theta' -\frac{\pi}{2}\right)}{\sin{\frac{\pi}{2}}}.\tag{1}$$
So,
\begin{align*}
&
\iiint_{\mathbb{R}^3}\rho(r',\theta',\phi') \,d\tau'
\\
&\,\,=
\int_0^{\pi} \int_0^{2\,\pi}\int_{0}^\infty
\frac{Q}{2\,\pi\,a^2} \,\delta\left( r' - a\right) \,
  \delta\left( \theta' - \frac{\pi}{2}  \right)  \,
\frac{
\left[ u\left( \phi' - 0 \right)- u\left( \phi' - 2\,\pi  \right)\right]
}{ 
 \sin\frac{\pi}{2}
}
\,{r'}^2\,\sin\theta'\,dr'\,d\theta'\,d\phi'
\\\\
&\,\,=
\frac{Q}{2\,\pi\,a^2 }
\int_0^{\pi} \int_0^{2\,\pi}\int_{0}^\infty
 \delta\left( r - a\right) \,
 \delta\left( \theta - \frac{\pi}{2}  \right) \,
\left[ u\left( \phi - 0 \right)- u\left( \phi - 2\,\pi  \right)\right]
\,{r'}^2\,\sin\theta'\, dr'\,d\theta'\,d\phi'
\\\\
&\,\,=
\frac{Q}{2\,\pi\,a^2}
\int_{\frac{\pi}{2}-\epsilon}^{\frac{\pi}{2}+\epsilon} \int_{0}^{2\,\pi }\int_{a-\epsilon}^{a+\epsilon}
\delta\left( r' - a\right)\, \delta\left( \theta' - \frac{\pi}{2}  \right) \,\sin\theta'\,{r'}^2
 dr'\,d\theta'\,d\phi'
\\\\
&\,\,=
\frac{Q}{2\,\pi\,a^2}
\, 2\,\pi\,a^2 
\\\\
&\,\,=
Q
\end{align*}
Yes, I recover the ring's total charge $Q$. However, there is an issue of notation. Consider the following.
Alternative Method
In [2], when defining density in spherical coordinates, Boas uses a variable $r$ in the denominator. This as opposed to a parameter that gives the particular radius---such as $a$. Let's use this alternative approach and see if we recuperate the ring's total charge $Q$.
Suppose there is a ring of charge, with total charge $Q$. The ring exists    at each and every point  $(r,\theta,\phi) $ in the set
$$ \left\{ (r,\theta,\phi)\in [0,\infty)\times[0, \pi]  \times [0,2\,\pi)\, \Bigr| \,  r=a, \theta = \frac{\pi}{2} ,    0 \leq \phi \leq 2\,\pi  \right\}.$$
In terms of the Dirac delta distribution, $\delta$, and the Heaviside step function, $u$, the charge density is
\begin{align*}
\rho(r,\theta,\phi) &= 
Q \,  \delta\left( r - a\right) \,
 \frac{\delta\left( \theta - \frac{\pi}{2}  \right)}{r} \,
\frac{
\left[ u\left( \phi - 0 \right)- u\left( \phi - 2\,\pi  \right)\right]
}{ 
2\,\pi\,r\,\sin\theta
}\tag{2}
\end{align*}
Thus,
\begin{align*}
&
\iiint_{\mathbb{R}^3}\rho(r,\theta,\phi) \,d\tau
\\
&\,\,=
\int_0^{\pi} \int_0^{2\,\pi}\int_{0}^\infty
Q \,\delta\left( r - a\right) \,
 \frac{\delta\left( \theta - \frac{\pi}{2}  \right)}{r} \,
\frac{
\left[ u\left( \phi - 0 \right)- u\left( \phi - 2\,\pi  \right)\right]
}{ 
2\,\pi\,r\,\sin\theta
}
\,r^2\,\sin\theta\,dr\,d\theta\,d\phi
\\\\
&\,\,=
\frac{Q}{2\,\pi }
\int_0^{\pi} \int_0^{2\,\pi}\int_{0}^\infty
 \delta\left( r - a\right) \,
 \delta\left( \theta - \frac{\pi}{2}  \right) \,
\left[ u\left( \phi - 0 \right)- u\left( \phi - 2\,\pi  \right)\right]
 dr\,d\theta\,d\phi
\\\\
&\,\,=
\frac{Q}{2\,\pi}
\int_{\frac{\pi}{2}-\epsilon}^{\frac{\pi}{2}+\epsilon} \int_{0}^{2\,\pi }\int_{a-\epsilon}^{a+\epsilon}
\delta\left( r - a\right)\, \delta\left( \theta - \frac{\pi}{2}  \right) \,
 dr\,d\theta\,d\phi
\\\\
&\,\,=
\frac{Q}{2\,\pi}\, {2\,\pi}
\\\\
&\,\,=
Q
\end{align*}
Again, I recover the ring's total charge, $Q$.  However, it appears to me that both manners to describe $\rho$ may not both be right. Maybe they both yield the same result in this problem, but that does not indicate that they are both correct.
Questions
Which expression for the charge density is correct, the expression given by Equation 1 or the expression given by Equation 2? How come?
Bibliography
[1] Jackson, Classical Electrodynamics, 3rd Edition, p. 123.
[2] Boas, Mathematical Methods in the Physical Sciences, 3rd Edition, p. 457, 460.
 A: Because there is a $\delta(r-a)$ in the $\rho(\vec{r})$, therefore as long as the integral is concerned, these two expressions give same answer to the result of integration. They can be differentiate only in their derivatives.
To simplify the typing and without lost the essence of the problem, let's consider a shell charege distrbution at $r=a$ with spherical symmetry. The two expressions become:

*

*Jackson's version

$$ \tag{1}
\rho_1(r) = \frac{Q}{4\pi a^2} \delta(r-a)
$$


*Boas' version

$$ \tag{2}
\rho_2(r) = \frac{Q}{4\pi r^2} \delta(r-a)
$$
Integration of each density gives:
$$
\int\int\int_{\Omega} \rho_1(\vec{r}) d^3\vec{r} = \int_0^\infty r^2dr \int_0^\pi \sin\theta d\theta \int_0^{2\pi} d\phi \frac{Q}{4\pi a^2} \delta(r-a) = Q
$$

In order to differentiate, lets consider the following integral
$$
  \int_{-\infty}^\infty f(x) \delta'(x-\xi) dx = f(x) \delta(x-\xi) |_{-\infty}^\infty -  \int_{-\infty}^\infty f'(x) \delta(x-\xi) dx = -f'(\xi).
$$
The boundary tems vanish as long as $f(x)$ is finite as $x \to \pm\infty$.
Lets examine the integral of derived delta function:
$$ \tag{3}
\int\int\int_{\Omega} \rho_1'(\vec{r}) f(r) d^3\vec{r} 
= \frac{Q}{4\pi a^2}\int_0^\infty r^2dr \int_0^\pi \sin\theta d\theta \int_0^{2\pi} d\phi  f(r) \delta'(r-a)\\
=  \frac{Q}{a^2} \int_0^\infty r^2 f(r) \delta'(r-a) dr\\
 =  - \frac{Q}{a^2} \left[ \frac{d}{dr}r^2 f(r) \right]_{r=a} 
$$
Also, try the intgral with $\rho_2'(r-a)$
$$ \tag{4}
\int\int\int_{\Omega} \rho_2'(\vec{r}) f(r) d^3\vec{r}
=\frac{Q}{4\pi} \int_0^\infty r^2dr \int_0^\pi \sin\theta d\theta \int_0^{2\pi} d\phi   f(r) \frac{d}{dr} \left( \frac{\delta(r-a)}{r^2} \right)\\
=  Q \int_0^\infty r^2 f(r) \frac{d}{dr}\left( \frac{\delta(r-a)}{r^2} \right)  dr\\
 = - Q \left[ \frac{1}{r^2}\frac{d}{dr}r^2 f(r) \right]_{r=a} 
 $$
For most regular functions of $f(r)$, these two form is exactly the same. Observe the form of differentiation, I cast my vote for the second expression. The differential form resemble that of $\nabla \cdot f(r)\hat{r}$.
A: In my opinion, to  solve this problem correctly requires knowledge of the scale factors of the various curvilinear coordinates.
Cylindrical coordinate system
For example, the cylindrical coordinate system    has the scale factors $1$,  $r$, and $1$ for coordinate $r$, $\phi$, and $z$, respectively.
Inn this problem we have a disk or radius $a$  that is located on the  plane defined by $z=0$. The goal is determine
$$
\rho = \rho(r,\phi, z).$$
For each coordinate we have two choices: either a Dirac delta, $\delta$,  or a (pair of)  Heaviside step, $H$. So,  in $\rho $ we have to have a factor that is exclusively
$$ \frac{\delta(r-r_o)}{1}\quad \text{or}\quad \left[ H(r-r_i )  -  H(r_f-r ) \right],$$
a factor that is exclusively
$$ \frac{\delta(\phi-\phi_o)}{r}\quad \text{or}\quad \left[H(\phi-\phi_i )-  H(\phi_f-\theta ) \right],$$
and a factor that is exclusively
$$ \frac{\delta(z-z_o)}{1}\quad \text{or}\quad \left[ H(z-z_i)  -  H(z_f-z ) \right].$$
Then, in the problem here  we  have that
\begin{equation}
\rho(r,\phi,z) = \rho_o\, 
\left[
H(r-0 ) 
 -  H{\left(a-r \right)} 
\right]
\left[
H(\phi-0 ) 
 -  H{\left(2\,\pi-\phi \right)} 
\right]
\left[
\frac{\delta(z-0)}{1}   
\right]\,\tag{1},
\end{equation}
where $$\rho_o = \frac{Q}{ \pi\,a^2} \tag{2}.$$
Let's put it all together. To begin with
\begin{align*}
Q 
&= 
\int_{\mathbf{R}^3} \rho(r^\prime ,\phi^\prime,z^\prime)
 dV^\prime 
\end{align*}
Explicitly, we have that
\begin{align*}
Q
&= 
\int_{0}^\infty 
\int_{0}^{2\,\pi} 
\int_{-\infty}^{+\infty} 
\frac{Q}{ \pi\,a^2}  
\left[
H(r^\prime-0 ) 
 -  H{\left(a-r^\prime \right)} 
\right]
\left[
H( \phi - 0 ) 
 -  H{\left(2\,\pi-\phi \right)} 
\right]
\left[
\frac{\delta(z-0)}{1}   
\right]{r^\prime}  \,dr^\prime
 \,d\phi^\prime \,dz^\prime.
\end{align*}
Separating into products of integrals gives that
\begin{align*}
Q 
&= 
\int_{0}^\infty 
\frac{Q}{ \pi\,a^2}  \, 
\left[
H(r-0 ) 
 -  H{\left(a-r \right)} 
\right]
   \,r^\prime
   \,dr^\prime
\\
&\times 
\int_{0}^{2\,\pi} 
\left[
H(\phi-0 ) 
 -  H{\left(2\,\pi-\phi \right)} 
\right]
 \,d\phi^\prime  
\\
&\times 
\int_{-\infty}^{+\infty} 
\left[
\frac{\delta(z-0)}{1}   
\right] dz^\prime.
\end{align*}
Upon integration, we have that
\begin{align*}
Q
&= 
\frac{Q}{\pi\,a^2}  \, 
\left[
\frac{a^2}{2}
\right]
\left[
2\,\pi
\right]
\left[
1\right] .
\end{align*}
Thus, we find a consistent result, which is that
$$Q
 =   Q    \,.   $$
So, the charge distribution is correctly written as
$$ 
\boxed{  \rho(r,\phi,z) = \frac{Q}{ \pi\,a^2}\, 
\left[
H(r ) 
 -  H{\left(a-r \right)} 
\right]
\left[
H(\phi ) 
 -  H{\left(2\,\pi-\phi \right)} 
\right]
 \delta(z)
 .} $$
Spherical coordinate system
For example, the spherical coordinate system    has the scale factors $1$,  $r$, and $r\,\sin\theta$ for coordinate $r$, $\theta$, and $\varphi$, respectively.
In this problem we have a disk or radius $a$  that is located on the  plane defined by $z=0$. The goal is determine
$$
\rho = \rho(r,\theta,\varphi ).$$
For each coordinate we have two choices: either a Dirac Delta  or a Heaviside step. So,  in $\rho $ we have to have a factor that is exclusively
$$ \frac{\delta(r-r_o)}{1}\quad \text{or}\quad \left[H(r-r_i )  -  H(r_f-r ) \right],$$
a factor that is exclusively
$$ \frac{\delta(\theta-\theta_o)}{r}\quad \text{or}\quad \left[H(\theta-\theta_i )-  H(\theta_f-\theta ) \right],$$
and a factor that is exclusively
$$ \frac{\delta(\varphi-\varphi_o)}{r\,\sin\theta}\quad \text{or}\quad \left[\frac{\delta(\varphi-\varphi_i)}{1} -  H(\varphi_f-\varphi ) \right].$$
Then, in the problem here  we  have that
\begin{equation}
\rho(r,\theta,\varphi ) = \rho_o\, 
\left[
H(r-0 ) 
 -  H{\left(a-r \right)} 
\right]
\left[
\frac{\delta{\left(\theta - \frac{\pi}{2}\right)}}{r}
\right]
\left[
H(\varphi-0 ) 
 -  H{\left(2\,\pi-\varphi \right)} 
\right]
\,\tag{3},
\end{equation}
where $$\rho_o = \frac{Q}{ \pi\,a^2} \tag{4}.$$
Let's put it all together. To begin with
\begin{align*}
Q 
&= 
\int_{\mathbf{R}^3} \rho(r^\prime ,\theta^\prime,\varphi^\prime)
 dV^\prime 
\end{align*}
Explicitly, we have that
\begin{align*}
Q
&= 
\int_{0}^\infty 
\int_{0}^{ \pi} 
\int_{0}^{2\,\pi}  
\frac{Q}{ \pi\,a^2}  
\left[
H(r^\prime-0 ) 
 -  H{\left(a-r^\prime \right)} 
\right]
\left[
\frac{\delta{\left(\theta - \frac{\pi}{2}\right)}}{r^\prime}
\right]
\left[
H(\varphi-0 ) 
 -  H{\left(2\,\pi-\varphi \right)} 
\right]
{r^\prime}^2\,\sin\theta^\prime   \,dr^\prime
 \,d\theta^\prime \,d\varphi^\prime.
\end{align*}
Separating into products of integrals gives that
\begin{align*}
Q
&= 
\frac{Q}{ \pi\,a^2}  
\int_{0}^\infty 
\left[ 
H(r^\prime-0 ) 
 -  H{\left(a-r^\prime \right)}  
{r^\prime} 
\right]
 \,dr^\prime
\\
&\times 
\int_{0}^{ \pi} 
\left[
 \delta{\left(\theta - \frac{\pi}{2}\right)} 
 \sin\theta^\prime 
\right]
   \,d\theta^\prime  
\\
&\times
\int_{0}^{2\,\pi}  
\left[
H(\varphi-0 ) 
 -  H{\left(2\,\pi-\varphi \right)} 
\right]
  d\varphi^\prime.
\end{align*}
Upon integration, we have that
\begin{align*}
Q
&= 
\frac{Q}{ \pi\,a^2}  
\left[
\frac{{a}^2}{2} 
\right]
\left[
1\right]
 \left[
2\,\pi\right]
.
\end{align*}
Thus, we find a consistent result, which is that
$$Q
 =   Q    \,.   $$
So, the charge distribution is correctly written as
$$ 
\boxed{  
\rho(r,\theta,\varphi) = 
\left[
H(r  ) 
 -  H{\left(a-r \right)} 
\right]
\left[
\frac{\delta{\left(\theta - \frac{\pi}{2}\right)}}{r}
\right]
\left[
H(\varphi  ) 
 -  H{\left(2\,\pi-\varphi \right)} 
\right]
 .} $$
Conclusion
In summary, in my opinion, the correct way to write this distribution begins with writing a formula that includes the scale factors where they belong (cf., Eq. (1) in conjunction with Eq. (2), or Eq. (3) in conjunction with Eq. (4) ), and ends with simplifying.
