Re: Integral of Piecewise function involving DiracDelta

• To: mathgroup at smc.vnet.net
• Subject: [mg74785] Re: Integral of Piecewise function involving DiracDelta
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Thu, 5 Apr 2007 04:09:44 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <euvmuo\$epv\$1@smc.vnet.net>

```Andrew Moylan wrote:
> 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
>
>
Many, if not all, of the answers are in Maxim Rytin's notebook titled "
Integration of Piecewise Functions with Applications" available at

http://library.wolfram.com/infocenter/MathSource/5117/

"The notebook contains the implementation of four functions
PiecewiseIntegrate, PiecewiseSum, NPiecewiseIntegrate, NPiecewiseSum.
They are intended for working with piecewise continuous functions, and
also generalized functions in the case of PiecewiseIntegrate. They
support all the standard Mathematica piecewise functions such as
UnitStep, Abs, Max, as well as Floor and other arithmetic piecewise
functions. PiecewiseIntegrate supports the multidimensional DiracDelta
function and its derivatives. The arguments of the piecewise functions
can be non-algebraic and contain symbolic parameters."

For instance,

PiecewiseIntegrate[Piecewise[
{{DiracDelta[x], -1 < x < 1}}, 0],
{x, -Infinity, Infinity}]

returns 1, and

PiecewiseIntegrate[Piecewise[
{{DiracDelta[x - 1/2], -1 < x < 1}}, 0],
{x, -Infinity, Infinity}]

returns 1

Regards,
Jean-Marc

```

• Prev by Date: Re: Depurating tool
• Next by Date: Re: Drawing a 3D representation of complex Fermat curve x^n + y^n = 1
• Previous by thread: Re: Integral of Piecewise function involving DiracDelta
• Next by thread: N function problematic performance (V. 5.2)