Everywhere I've looked online, I see the proof for $$\tag{1}\delta(f(x))=\frac{\delta(x-x_0)}{|f'(x_0)|},$$ where $x_0$ is a root of $f$. The problem I'm working on is slightly different and I have an answer for it, but wanted to confirm it since it is not matching the final answer I'm supposed to get.
Question: Prove $$\tag{2}\delta[f(x')-f(x)]=\frac{\delta(x'-x)}{f'(x')}, \quad x' \mathrm{are\ roots\ of\ f}$$ My attempt: Let $u=f(x')-f(x)$, $du=-f'(x)dx$, $f^{-1}(u)=x'-x$. Then, $$\int \delta[f(x')-f(x)]g(x)dx=-\int \delta(u)g(x'-f^{-1}(u)) \frac{du}{f'(x'-f^{-1}(u)}=-\frac{g(x')}{f'(x')}=-\int \frac{\delta(x'-x)}{f'(x')}g(x)dx.$$ This holds for any $g(x)$, thus we get $$\delta[f(x')-f(x)]=-\frac{\delta(x'-x)}{f'(x')}.$$
Here, I have used $f^{-1}(0)=0$. In conclusion, here you don't end up with the absolute value, and I think you shouldn't because when we do a $u$ sub for solving Eq. (1), $du$ is positive, but here the nature of the problem gives a negative $du$. So I think my answer is right, but it is different than the expected one, Eq. (2). I wanted to seek some confirmation on it.