Question: bug in int/Dirac

Hi folks

If you try this simple integral 

simplify(int(P(q)*(Dirac(k-q)+ Heaviside(k-q)),q = 0..infinity)) assuming k>0; 

it returns int(P(q), q = 0 .. k), completely ignoring the delta function. However, if you expand the integral first:

simplify(value(IntegrationTools[Expand](Int(P(q)*(Dirac(k-q)+ Heaviside(k-q)),q = 0..infinity)))) assuming k>0;

 it gives the correct answer 

P(k) + int(P(q), q = 0 .. k)

Looks like a bug to me?

Cheers!

Please Wait...