Simplifying an Integral over Two DiracDeltas

 Integrate[DiracDelta[a + k] DiracDelta[-b + k], {k, -\[Infinity], \[Infinity]}]
(*DiracDelta[a + b]*)


This works fine.

But

 Integrate[k DiracDelta[a + k] DiracDelta[-b + k], {k, -\[Infinity], \[Infinity]}]


does not give the expected b DiracDelta[a + b].

Why not? How can it be fixed?

• @NasserM.Abbasi The two answers are completely equivalent.
– Jens
Dec 11, 2012 at 0:16
• Looking at the possible issues in the DiracDelta documentation, there doesn't seem to be a definitive reason for this behavior. But at least a further integration will work correctly: Assuming[a\[Element]Reals,Integrate[k DiracDelta[a+k] DiracDelta[-b+k],{k,-\[Infinity],\[Infinity]},{b,-\[Infinity],\[Infinity]}]] yields -a.
– Jens
Dec 11, 2012 at 0:25

It seems similar to this and you can use the workaround :

Integrate[k f[a + k] DiracDelta[-b + k], {k, -\[Infinity], \[Infinity]},
Assumptions -> {{a, b} \[Element] Reals}] /. f -> DiracDelta

(* b DiracDelta[a + b] *)