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.
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.$$