0xDEADBEEF said:
Sorry, people but wikipedia agrees with me. The variable transform rule is the only sensible way to define \delta(f(x)). This can also be seen in the definition of the delta function as the limit of an integral over a thinner and thinner peak. The variable transform can be done before taking the limit so it is legal. Due to this definition we can also see that the following makes sense (and I have seen it in textbooks) \int_0^\infty \delta(x) f(x) = \frac{1}{2}f(0) Mute's argument is nice but the second formula is only valid if g'(x) is not zero. It is in fact a result of the variable substitution formula, because locally you can approximate g(a) as a linear function and 1/g' is the volume element for the corresponding variable change. It seems as if the limiting process is not legal. If we do any limits they should be done with a definition of the delta function as a limit. Although I also find it a bit funny that the modified delta function integral of a function that is zero at the origin will produce one. pwsnafu's definition of the delta function seems to differ from that of the rest of the world.
The change of variables does not work in your calculation because you have to split the integral up right at the point where the delta function should "ping". That needs to be treated more carefully. (Also, we are not arguing against the convention ##\int_0^\infty \delta(x)f(x) = f(0)/2##.)
In my calculation g'(x) where the delta function "pings" because I have shifted the discontinuity away from zero to a value where the derivative exists, and hence the calculation is valid. The only way it can be incorrect is to argue that
$$\lim_{\epsilon \rightarrow 0} \int_{-\infty}^\infty dx~2x \delta(x^2-\epsilon) \neq \int_{-\infty}^\infty dx~2x \delta(x^2).$$
So, let's try this as you suggest: let's take ##\int_{-\infty}^\infty dx~2x \delta(x^2)## to mean
$$\lim_{\epsilon\rightarrow 0}\int_{-\infty}^\infty dx~2x \delta_\epsilon(x^2),$$
where ##\delta_\epsilon(x^2)## is a nascent delta function. Let's choose
$$\delta_\epsilon(x^2) = \frac{1}{\sqrt{2\pi}\epsilon} \exp\left(-\frac{(x^2)^2}{2\epsilon^2}\right).$$
Then,
$$\int_{-\infty}^\infty dx~2x \frac{1}{\sqrt{2\pi}\epsilon} \exp\left(-\frac{(x^2)^2}{2\epsilon^2}\right) = 0$$
by symmetry.
Hm. Well, let's try a nascent delta function that's not symmetric, then. Let's consider
$$\delta_\epsilon(x) = \frac{\mbox{Ai}(x/\epsilon)}{\epsilon},$$
where Ai(x) is the Airy function. But then we have ##\delta_\epsilon(x^2) = Ai(x^2/\epsilon)/\epsilon##, and so it will turn out to be an even integrand again: Changing variables to ##y = x/\sqrt{\epsilon}## gives
$$\int_{-\infty}^\infty dx~2x \frac{\mbox{Ai}(x^2/\epsilon)}{\epsilon} = \int_{-\infty}^\infty dy~2y \mbox{Ai}(y^2) = 0.$$
So, for the moment I remain convinced that the answer is zero in this case.
Note, however, there are potential problems, at least computationally: if we consider a general function ##f(x)##, then
$$\int_{-\infty}^\infty dx~f(x) \frac{\mbox{Ai}(x^2/\epsilon)}{\epsilon} = \int_{-\infty}^\infty dy~\frac{f(\sqrt{\epsilon}y)}{\epsilon} \mbox{Ai}(y^2).$$
If the function f(x) is odd in y, then the integral is of course still zero by symmetry. However, if f is not odd then ##f(\sqrt{\epsilon}y)/\sqrt{\epsilon}## may diverge as ##\epsilon## tends to zero, in which case we cannot take the limit inside the integrand. This does not imply the limit does not exist, per se, but we would have to do the integral first and then take the limit to find out whether it does or not.