Which of these two ways to take the derivative of a delta function times another function is correct? A well known identity of the Dirac delta function is that for any function $f(x)$:
$$
 \delta(x) f(x) = \delta(x) f(0).
$$
If we take the derivative of the right hand side we get:
$$
 \delta'(x) f(0).
$$
But if we take the derivative of the left hand side we get
$$
 \delta'(x) f(x) + \delta(x) f'(x) = \delta'(x) f(0) + \delta(x) f'(0)
$$
Which one is correct?
P.S. I know that this problem has something to do with the fact that the delta function is not really a function, but rather a generalized function. However, the delta function and its derivatives are useful in calculations (especially in physics), and I want to know the correct rules for using them.
 A: Any distribution $T$ can be multiplied with a $C^{\infty}$-function $f$ by the formula $$
(f T)(\varphi) = T(f\varphi) $$ for a test function $\varphi$. And if $T$ has order $0$ like the $\delta$-distribution, $f$ may be a $C^0$-function. And in this sense, the identity $$ f\delta = f(0) \delta$$ is perfectly true.
Applying this multiplication to your left hand side, you have
$$ (f'\delta)(\varphi) + (f\delta')(\varphi) = \delta(f'\varphi) + \delta (-(f\varphi)') = \delta (-f\varphi') = f(0) \delta' (\varphi),$$ your right hand side. So you were perfectly right, you just need to interpret the expression $f\delta'$ correctly as
$$ f\delta' = f(0) \delta' - f'(0) \delta.$$
A: OK I think I know the answer to my own question, and that I can put it in simple terms without getting to much into the mathematical background of delta functions.
My mistake was that I thought the similarly to this identity:
$$
 \delta(x) f(x) = \delta(x) f(0),
$$
which is correct, the following identity is also true:
$$
 \delta'(x) f(x) = \delta'(x) f(0),
$$
but this is wrong.
The correct identity is:
$$
 \delta'(x) f(x) = \delta'(x) f(0) - \delta(x) f'(0).
$$
If I use this identity when comparing the two results in the question, they turn out to be the same - meaning both ways of taking the derivative are correct.
In fact, the derivation in the question is a proof of this identity.
BTW it is a generalization of the well known identity: $\delta'(x) x = -\delta(x)$
A: You should define the delta on a proper space of test functions. So,
$$\int_{-\infty}^\infty \delta'(x)f(x) \,dx =\left.\delta(x)f(x)\right|_{-\infty}^\infty-\int_{-\infty}^\infty \delta(x)f'(x)\,dx =-f'(0)$$
after integration by parts and where use has been made of the fact that test function $f(x)$ goes enough rapidly to 0 at $\pm\infty$. Manipulations on distribution are only meaningful in this sense.
A: The way you wrote the first equation is very misleading and it seems that it caused your confusion. I would prefer to write $\delta(f)=f(0)$. The correct formular for the derivative of $\delta$ is the following
$$
\delta'(f)=-f'(0).
$$
For an explanation, see here.
