# Dirac delta function of function

How to derive below equation?

$$\delta(g(x))=\sum_i\frac{\delta(x-a_i)}{\lvert g^\prime(a_i)\rvert}.\qquad (*)$$ I found a solution like equations below: \begin{eqnarray} \int_{-\infty}^{\infty}f(x)\delta(g(x))&=&\sum_i\int_{a_i-\epsilon}^{a_i+\epsilon}f(x)\delta(g(x))\ dx,\qquad g(a_i)=0\\ &=&\sum_i\int_{a_i-\epsilon}^{a_i+\epsilon}f(x)\delta((x-a_i)g^\prime(a_i))\ dx,\qquad (x-a_i)g^\prime(a_i)\ \text{is leading term in its Taylor seires.}\\ &=&\sum_i\int_{a_i-\epsilon}^{a_i+\epsilon}f(x)\frac{1}{\lvert g^\prime(a_i)\rvert}\delta(x-a_i)\ dx,\qquad \delta(ax)=\frac{1}{|a|}\delta(x)\\ \end{eqnarray}

So, $\delta(g(x))=\sum_i\frac{\delta(x-a_i)}{\lvert g^\prime(a_i)\rvert}.$

But comparing equations at fisrt line with third,

$\delta(g(x))=\frac{\delta(x-a_i)}{\lvert g^\prime(a_i)\rvert}.$

What's wrong with above equations? And why use leading term only? eq (*) is approximation?

So my questions are:

1. When compare with first and third line which are represented below eq (), Where $\sum_i$ in RHS of Eq () come from?

2. Why use leading term only? eq (*) is approximation? Is it exist that another precise derivation?

For the first question about the summation note that your domain $(-\infty,+\infty)$ must be splitted in many parts as much there are zeroes of $g$. That's the meaning of the sum. For the second question, suppose that $\tilde{x}$ is such that $g(\tilde{x})=0$ and $g$ a bijection. Then $$I=\int f(x)\delta(g(x))dx$$ can be rewritten as $$\int f(g^{-1}(y))\delta(y)\frac{\partial g^{-1}(y)}{\partial y}dy$$ where $x=g^{-1}(y)$. Then you obtain $$I=f(g^{-1}(0))\frac{\partial g^{-1}(0)}{\partial y}$$ or $$I=\frac{f(g(\tilde{x}))}{g'(\tilde{x})}$$ given that $$\frac{\partial g^{-1}(y)}{\partial y}=\frac{1}{\frac{\partial g(y)}{\partial y}}.$$