I thought I had found a bug in Mathematica and reported it already in version 9, since it wasn't fixed in version 10 or 11 I reported it two more times but I never get any reply whatsoever so I'm thinking perhaps it is not a bug and I have just misunderstood the way Mathematica is supposed to work.
I do not expect these last two integrals to give 0 but they do. Should they not return 1? The first two integrals return what I expect them to and are just provided for comparison.
Integrate[DiracDelta[Cos[θ]] θ, {θ, 0, π}]
Integrate[DiracDelta[Cos[θ]] Exp[θ], {θ, 0, π}]
Integrate[DiracDelta[Cos[θ]] Sin[θ], {θ, 0, π}]
Integrate[DiracDelta[Cos[θ]] UnitStep[θ], {θ, 0, π}]
Bugstag for initial posts, it is intended to be used after confirmation by participants. – ciao 8 hours agoIntegrate[ DiracDelta[Cos[\[Theta]]] UnitStep[\[Theta]] // Simplify[#, 0 <= \[Theta] <= \[Pi]] &, {\[Theta], 0, \[Pi]}]evaluates to1– Bob Hanlon 7 hours agoHeavisideThetainstead ofUnitStep, sinceHeavisideThetais a generalized function (distribution) andUnitStepis not.Integrate[DiracDelta[Cos[t]] HeavisideTheta[t], {t, 0, Pi}]does return 1. This is covered in the documentation in the tutorial on GeneralizedFunctions. – Carl Woll 7 hours ago