# 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?

-
I think the expected answer should be -a*DiracDelta[a+b] not b*DiracDelta[a+b] ? see for example: Integrate[k*DiracDelta[a + k], {k, -Infinity, Infinity}] gives -a – Nasser Dec 10 '12 at 23:43
@NasserM.Abbasi The two answers are completely equivalent. – Jens Dec 11 '12 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 '12 at 0:25

## 1 Answer

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] *)

-