Re: Integral of Piecewise function involving DiracDelta

*To*: mathgroup at smc.vnet.net*Subject*: [mg74781] Re: Integral of Piecewise function involving DiracDelta*From*: "dimitris" <dimmechan at yahoo.com>*Date*: Thu, 5 Apr 2007 04:07:41 -0400 (EDT)*References*: <euvmuo$epv$1@smc.vnet.net>

For integrals like yours I would strongly suggest the PiecewiseIntegrare function by Maxim Rytin available from here: http://library.wolfram.com/infocenter/MathSource/5117/ After loading the package, we get In[54]:= PiecewiseIntegrate[Piecewise[{{DiracDelta[x], -1 < x < 1}}, 0], {x, - Infinity, Infinity}] Out[54]= 1 In[55]:= PiecewiseIntegrate[Piecewise[{{DiracDelta[x - 1/2], -1 < x < 1}}, 0], {x, -Infinity, Infinity}] Out[55]= 1 In the above mentioned notebook there many examples that demonstrates PiecewiseIntegrate capabilities. Regards Dimitris =CF/=C7 Andrew Moylan =DD=E3=F1=E1=F8=E5: > Here is an integral that I expect Mathematica to evaluate to 1: > > Integrate[Piecewise[{{DiracDelta[x], -1 < x < 1}}, 0], > {x, -Infinity, Infinity}] > > However, Mathematica 5.2 (Windows) gives the answer as 0. Here's a > similar integral that I also expect to evaluate to 1: > > Integrate[Piecewise[{{DiracDelta[x-1/2], -1 < x < 1}}, 0], > {x, -Infinity, Infinity}] > > For this integral, Mathematica doesn't return 0. It returns the > following: > > Integrate[Piecewise[{{2*DiracDelta[-1 + 2*x], -1 < x < 1}}, > 0], {x, -Infinity, Infinity}] > > Can anyone help me understand what's happening here? > > Cheers, > > Andrew