$\newcommand{\diff}{\operatorname{d}}$ $\newcommand{\deriv}[2]{\frac{\diff #1}{\diff #2}}$ $\newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}}$ $\renewcommand{\vec}[1]{\boldsymbol{#1}}$ I have the following integral $$\omega(E) = \int\frac{\diff\vec{q}\diff\vec{p}}{h^2}\delta(E - H(\vec{q}, \vec{p}))$$ where $\vec{p}, \vec{q}\in\mathbb{R}^2$, $\vec{q} = (x, y)$ satisfy the constrain $-L/2 \leq x, y, \leq L/2$ and $H(\vec{q}, \vec{p})$ is the function \begin{align} H(\vec{q}, \vec{p}) = H(\vec{q}, x) = \frac{\vec{p}^2}{2m} + 2A|x| &&\text{with}\quad A> 0 \end{align} Now this is a part of en exercise and it has the following solution
\begin{align} \omega(E) &= \frac{L}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\pderiv{}{E}\int\diff{\vec{p}}\ \Theta\left(E - \frac{p^2}{2m} - 2A|x|\right) = \tag{sol1.1}\label{sol1.1}\\ &= \frac{L}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\ 2\pi m\pderiv{}{E}(E - 2A|x|)\Theta\left(E - 2A|x|\right) = \tag{sol1.2}\label{sol1.2}\\ &= \frac{2\pi mL}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\ \Theta\left(E - 2A|x|\right) = \tag{sol1.3}\\ &= \begin{cases}\frac{2\pi mL}{Ah^2}E & \text{if } E \leq AL\\ \frac{2\pi mL^2}{h^2} & \text{if } E > AL\end{cases} \tag{sol1.4} \end{align} where $\Theta$ is the Heaviside Theta step function and it is used the fact that $\delta(x) = \deriv{}{x}\Theta(x)$.
Now I tried another way to the solution by using the property of the Dirac Delta $$\delta(f(x)) = \sum_i \frac{\delta(x - x_i}{|f'(x_i)|}$$ where $x_i$ are the simple zeros of the function.
My way: \begin{align} \omega(E) &= \frac{L}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\int\diff{\vec{p}}\ \delta\left(E - \frac{p^2}{2m} - 2A|x|\right) =\\ &= \frac{L}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\ \int_0^{2\pi}\diff\phi\int_0^{\infty}\diff{p}\ p\ \delta\left(\tilde{E} - \frac{p^2}{2m}\right) = \\ &= \frac{2\pi L}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\ \int_0^{\infty}\diff{p}\ p\ \frac{\delta\left(p-\sqrt{2m\tilde{E}}\right)}{\sqrt{2m\tilde{E}}/m} = \\ &= \frac{2\pi mL}{h^2}\int\limits_{-L/2}^{L/2}\diff{x}\frac{\sqrt{2m\tilde{E}}}{\sqrt{2m\tilde{E}}} = \frac{2\pi mL^2}{h^2} \end{align}
Clearly I miss a Theta in the last steps, because the two solutions are not the same. Now I have some doubts about these proceedings, which are the following
- How did he integrate the Heaviside function in the first passage \eqref{sol1.1}-\eqref{sol1.2}, so that the integral gives $$(E - 2A|x|)\Theta\left(E - 2A|x|\right)?$$
Why did my solution differed from the one proposed, where am I going wrong?
Hoping that I'm not putting too much staff together, how do you recommend to proceed with multivariable integrals involving delta and theta when inside them there's a functional expression?
EDIT: Since the problem is physical (from statistical mechanics), I'm now noticing that probably the theta is there for having non-negative roots of $p^2$... could it be right?