How to prove this Dirac delta identity involving $\int_{-\infty}^\infty \delta(f(x)) \,s(x) \,dx$? How to prove the identity
$$\int_{-\infty}^\infty \delta(f(x)) \,s(x) \,dx = \sum_i \frac{s(x_i)}{|f'(x_i)|},$$ where $x_i$ are the zeros of $f$?
I am supposed to use an identity that I've already proved:
$$\int_{-\infty}^\infty \delta(bx)\,s(x)\,dx=\frac{s(0)}{|b|}.$$
 A: Suppose for the moment that $f$ is invertible and $C^1$. Then $f'$ is never zero and you can take $u=f(x)$, $du=f'(x) dx$ to turn the integral into
$$\int_{-\infty}^\infty \delta(u) s \left (f^{-1}(u) \right ) \frac{du}{|f'(u)|} \\
= \frac{s \left ( f^{-1}(0) \right )}{|f'(f^{-1}(0))|}$$
by the definition of $\delta$. If $f$ is only locally invertible, meaning that the set of points where $f'=0$ is discrete, then we can do the same thing: break up into intervals where it is invertible, take $u=f(x)$, and sum up. 
If $f$ is not locally invertible but $f'$ is never zero on $A \equiv f^{-1}(\{ 0 \})$, then you need to isolate the region where $f$ is not locally invertible and check that it does not contribute to the integral. Then you can apply the previous argument again.
If $f'$ is zero somewhere on $A$, then both sides of the formula are ill-defined.
This all assumes implicitly that $\delta(f(x))$ is to be defined in such a way that we can make this $u$-substitution in the first place. A better treatment in my opinion would be to make this a definition and then check that it makes sense. Alternately you could proceed through approximate identities. The latter argument would be to prove that if $A_\varepsilon$ is an approximate identity, then $\int_{\mathbb{R}} A_\varepsilon(f(x)) s(x) dx$ converges to the desired quantity as $\varepsilon \to 0^+$. This is all sensibly defined because each $A_\varepsilon$, unlike $\delta$, is actually a function.
