Dirac Delta Function of a Function I'm trying to show that
$$\delta\big(f(x)\big) = \sum_{i}\frac{\delta(x-a_{i})}{\left|{\frac{df}{dx}(a_{i})}\right|}$$
Where $a_{i}$ are the roots of the function $f(x)$. I've tried to proceed by using a dummy function $g(x)$ and carrying out:
$$\int_{-\infty}^{\infty}dx\,\delta\big(f(x)\big)g(x)$$
Then making the coordinate substitution $u$ = $f(x)$ and integrating over $u$. This seems to be on the right track, but I'm unsure where the absolute value comes in in the denominator, and also why it becomes a sum.
$$\int_{-\infty}^{\infty}\frac{du}{\frac{df}{dx}}\delta(u)g\big(f^{-1}(u)\big)
= \frac{g\big(f^{-1}(0)\big)}{\frac{df}{dx}\big(f^{-1}(0)\big)}$$
Can any one shed some light? Wikipedia just states the formula and doesn't actually show where it comes from.

Use the nascent delta function based on the hat function:
$$
\delta_h(x) = 
\begin{cases}
0 & |x|\geq h \\
x/h^2 + 1/h & -h \leq x \leq 0 \\
-x/h^2 + 1/h & 0 \leq x \leq h
\end{cases}.
$$
Suppose a smooth function $f$ has a simple root at $x=r$.  Then $f$ is a 
bijection in a neighborhood $[a,b]$ of $r$ with an inverse $g$ (I'll be
using the term $g$ exclusively for the inverse of $f$ and not for a 
test function).  
Define 
$$
  I_1 = \int_{g(-h)}^{g(0)=r} \delta_h (f(x)) \, dx \quad \text{and} \quad
  I_2 = \int_{g(0)=r}^{g(h)} \delta_h (f(x)) \, dx.
$$
Then 
$$
  I_1 = \frac{F(r) - F(g(-h))}{h^2} + \frac{r - g(-h)}{h}, 
$$
$$
  I_2 = \frac{F(r) - F(g(h))}{h^2} + \frac{g(h) - r}{h},
$$
and
$$
  I = I_1+I_2 = \frac{g(h) - g(-h)}{h} - 
      \frac{(F\circ g)(h) - 2(F\circ g)(0) + (F\circ g)(-h)}{h^2} \tag{1}\label{1}
$$
where $F$ is the antiderivative of $f.$
The limit of the first term in \eqref{1} as $h\rightarrow 0$ is
$$
2g'(0) = \frac{2}{f'(r)} \tag{2}\label{2}
$$
(using the identity for the derivative of an inverse function and the definition of a derivative as a limit) and the limit of the second term 
in $\eqref{1}$ as $h\rightarrow 0$ is
$$
(F\circ g)''(0) = F''(r) (g'(0))^2 + F'(r) g''(0) \tag{3}\label{3}
$$ 
(using the definition of derivative again and the chain rule applied twice).
Since $F' = f$ and $f(r)=0,$ \eqref{3} can be simplified to
$$
  (F\circ g)''(0) = f'(r) \Big(g'(0)\Big)^2 = 
    \frac{f'(r)}{\Big(f'(r)\Big)^2} = \frac{1}{f'(r)}.
$$
So 
$$
  \lim_{h\rightarrow 0} \int_a^b \delta_h(f(x)) \,dx = 
  \lim_{h\rightarrow 0} \Big(\operatorname{sign}(f'(r)) I\Big) = \frac{1}{ |f'(r)| }.
$$
The reason for multiplying $I$ by $\operatorname{sign}(f'(r))$ is that
the limits of integration in $I$ need to be switched if $f$ is a decreasing
function on $[a,b]$ (that is, if $f'(r)$ is negative).

Integration by substitution is much quicker than using the nascent delta function definition.  But you must use the "change of variables" formula that is more general than basic integration by substitution:
$$
\int_a^b (\delta\circ f)(x) \,dx = \ \int_{\min(f(a),f(b))}^{\max(f(a),f(b))} \delta(u) |g'(u)| \,du = |g'(0)| = 1/|f'(r)|.
$$
