Problem with integrating DiracDelta

I also vote for a bug. The easiest way to see it is using an undefined function,

Integrate[DiracDelta[Cos[x]] f[x], {x, 0, Pi}]

which gives f[Pi/2]. So for an undefined function it gives the right answer but for f=Sin it does not give Sin[Pi/2]. Hence a Bug.


I'd consider it a bug.

Reason: I would consider following identity: $$\delta(f(x))=\sum_i\frac{\delta(x-x_i)}{|f'(x_i)|}$$

Where $\forall x_i : f(x_i)=0$

This leads us to: $$\delta(\cos x)=\frac{\delta(x-\pi/2)}{|-\sin(\pi/2)|}=\delta(x-\pi/2)$$

So we conclude: $$\int_0^\pi\text{d}x\;\delta(x-\pi/2)\cdot\sin x=\sin(\pi/2)=1$$ The same for UnitStep. And Mathematica realizes this:

Integrate[DiracDelta[x - Pi/2]*Sin[x], {x, 0, Pi}]
Integrate[DiracDelta[x - Pi/2]*UnitStep[x], {x, 0, Pi}]

1

1

With FullSimplify before:

FullSimplify[DiracDelta[x - Pi/2]*Sin[x], 0 < x < Pi]
FullSimplify[DiracDelta[x - Pi/2]*UnitStep[x], 0 < x < Pi]

2 DiracDelta[[Pi] - 2 x]

2 DiracDelta[[Pi] - 2 x]

Which evaluates in Integrate to:

Integrate[2 DiracDelta[\[Pi] - 2 x], {x, 0, Pi}]

1

So, my vote is on bug.