Integrating product of Dirac deltas and step functions I have the following integral
$$\int d^4\boldsymbol{x}' \,\delta\big[(\boldsymbol{x}-\boldsymbol{x'})^2+\alpha^2\big]\,\Theta(-x_0+x'_0)\,\delta\big[(\boldsymbol{x'})^2+\alpha^2\big]\,\Theta(-x_0'),\tag{1}\label{1}$$
where $\boldsymbol{x}=\{x_0,x_1,x_2,x_3\}$, the square is $(x')^2=x_\mu'\cdot x'^{\mu}$, and the metric convention used is $\{-1,1,1,1\}.$
First I wanted to do it in the limit $\alpha\to0$, where then I used the second dirac delta and theta function to impose
$$x_0'=-\sqrt{(x_1')^2+(x_2')^2+(x_3')^2}.$$
Then performing the first integral over $dx_0'$ we would end up with
$$\int d^3\boldsymbol{x}'\,\frac{\delta\big[\boldsymbol{x}^2-2x_0\sqrt{(x_1')^2+(x_2')^2+(x_3')^2}-2x^1  x_1'-2x^2  x_2'-2x^3  x_3'\big]}{2\sqrt{2}\sqrt{(x_1')^2+(x_2')^2+(x_3')^2}}\,\times\Theta\bigg(-x_0-\sqrt{(x_1')^2+(x_2')^2+(x_3')^2}\bigg),\tag{2}\label{2}$$
where the denominator came from the expansion of the second dirac delta via
$$\int_{\mathbb{R}^n}f(x)\,\delta\big(g(x)\big)dx=\int_{g^{-1}(0)} \frac{f(x)}{|\nabla g|}d\sigma(x).\tag{3}\label{3}$$
This is not a very nice expression to work with so then I tried to go to spherical coordinates, however this ran into some issues.
I tried
$$\int dr'\int d\phi_1 d\phi_2\,\times\frac{(r')^2\,\text{sin}(\phi_1)}{2\sqrt{2}\,r'}\delta\big[\boldsymbol{x}^2-2r'\big(x_0+x_1 \text{sin}(\phi_1) \text{cos}(\phi_2)+x_2 \text{sin}(\phi_1) \text{sin}(\phi_2)+x_3 \text{cos}(\phi_1)\big)\big]\,\times\Theta\big(-x_0-r'\big),\tag{4}\label{4}$$
I don't think this factor of $r'$ should be there, as the final result should be proportional to (updated 28/09) $\Theta\big(-x_0-\sqrt{x_1^2+x_2^2+x_3^2}\big)$.
Furthermore, since we normally have
$$\delta(\boldsymbol{x}-\boldsymbol{x}_0)=\frac{1}{r^2\text{sin}(\phi_1)}\delta(r-r_0)\delta(\phi-\phi_0)\delta(\theta-\theta_0),\tag{6}\label{6}$$
I am not sure I am even expressing the Dirac delta correctly in \eqref{4}.
I am also a bit lost in the difference between the usual coordinate change involving the Jacobian, and the relation \eqref{3}, obviously one is a coordinate change and one is not, but they seem to have very similar effects.
So I my main questions are; what is the correct way to transform the expression \eqref{2} into polar coordinates, and am I using \eqref{3} correctly in tandem with the coordinate change?
 A: If we use 3D rotational symmetry and define
$$x^{\mu}~=~(T,0,0,\underbrace{R}_{\geq 0})\quad\text{and}\quad x^{\prime \mu}~=~(t,r\sin\theta\cos\phi,r \sin\theta \sin\phi,r\cos\theta),$$
and
$$\rho~=~\sqrt{r^2+\alpha^2}\quad\text{and}\quad \Delta~=~R^2-T^2, $$
then OP's integral (1) becomes
$$ \begin{align} 
I(R,T,\alpha)~=~& \int_{\mathbb{R}} \!\mathrm{d}t \int_{\mathbb{R}_+} \!r^2 \mathrm{d}r \int_0^{\pi} \!\sin\theta \mathrm{d}\theta\int_0^{2\pi} \!\mathrm{d}\phi~\cr
&\delta(\rho^2+R^2-2Rr\cos\theta-(T-t)^2)~\Theta(T-t) ~\delta(\rho^2-t^2)~\Theta(t)\cr
~\stackrel{R\neq 0}{=}& 2\pi \Theta(T) \int_0^T \!\mathrm{d}t \int_{\mathbb{R}_+} \!r^2 \mathrm{d}r \int_{-1}^1 \! \mathrm{d}\cos\theta~\cr
&\frac{1}{2Rr}\delta\left(\frac{\rho^2+R^2-(T-t)^2}{2Rr}-\cos\theta\right) ~\frac{\delta(\rho-t)}{\rho+t}\cr
~=~& 2\pi \Theta(T)  \int_{\mathbb{R}_+} \!\frac{r^2 \mathrm{d}r}{2Rr~2\rho} ~\Theta\left(\left|\frac{\rho^2+R^2-(T-\rho)^2}{2Rr}\right|<1\right) ~\Theta(0<\rho<T)\cr 
~=~& 2\pi \Theta(T)  \int_{\alpha}^{\infty} \!\frac{ \mathrm{d}\rho}{4R} ~\Theta(|\Delta +2T\rho|< 2Rr) ~\Theta(\rho<T)\cr
~=~& \frac{\pi}{2R} \Theta(T-\alpha)  \int_{\alpha}^T \! \mathrm{d}\rho ~\Theta(4R^2(\rho^2-\alpha^2)-(\Delta+2T\rho)^2)\cr
~=~& \frac{\pi}{2R} \Theta(T-\alpha)  \int_{\alpha}^T \! \mathrm{d}\rho ~\Theta(A\rho^2+B\rho+C), \end{align}$$
where
$$A~=~4\Delta, \quad B~=~-4T\Delta \quad\text{and}\quad C~=~-\Delta^2 -4R^2\alpha^2.$$
The discriminant is
$$ D~=~B^2-4AC~=~16R^2\Delta(\Delta +\alpha^2).$$
The roots are
$$ \rho_{\pm}~=~\frac{-B\pm\sqrt{D}}{2A}~=~\frac{T\pm R\sqrt{1+\alpha^2/\Delta}}{2}. $$

*

*Case $-\alpha^2\leq \Delta\leq 0$: Then $D\leq 0$ and the integral $I(R,T,\alpha)=0$ vanishes.


*Case $\Delta> 0$: Then $D>0$ and the roots $\rho_{\pm}$ are outside the integration region $[\alpha,T]$, so the integral $I(R,T,\alpha)=0$ vanishes.


*Case $\Delta \leq -\alpha^2$: Then $R\leq T$, and therefore $R\sqrt{1+\alpha^2/\Delta}\leq T$, so the root $\rho_+< T$.
$$I(R,T,\alpha)~=~\frac{\pi}{2R} \Theta(T-\alpha)~\Theta(-\Delta-\alpha^2)~\underbrace{m([\rho_-,\rho_+]\cap [\alpha,T])}_{= \text{ length of the interval}}
,$$
where $m$ denotes the Lebesgue measure.
Let us for the remainder of this answer assume that $\alpha=0$. Then the discriminant $D\geq 0$. The roots are
$$ \rho_{\pm}~=~\frac{-B\pm\sqrt{D}}{2A}~=~\frac{T\pm R}{2}. $$
It follow that the integral is supported in the future light-cone:
$$I(R,T,\alpha=0)~=~\frac{\pi}{2R} \Theta(T)~R\Theta(-\Delta)~=~\frac{\pi}{2}\Theta(T)\Theta(-\Delta).$$
(The case $R=0$ follows e.g. from continuity of the limit $R\to 0^+$.)
