MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bug in Calculus`DiracDelta`

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14842] Re: Bug in Calculus`DiracDelta`
  • From: "Kevin J. McCann" <kevinmccann at Home.com>
  • Date: Fri, 20 Nov 1998 02:16:51 -0500
  • Organization: @Home Network
  • References: <72je71$3f9@smc.vnet.net> <72tscl$iqi@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I don't believe that the change of variables suggested by Bill "gives
the correct result for all  limits of integration."  Try 0->2Pi and you
get zero which is not correct.

To get a handle on DiracDelta manipulations, I like to go to one of the
limiting forms.  Try the following:

delta[n_, x_] :=
  n/Sqrt[Pi]/E^(-(-n^2*x^2))
Integrate[delta[n, x],
  {x, -Infinity, Infinity}]
NIntegrate[delta[10, x], {x, -5, 5}] Plot[delta[10, x], {x, -2, 2},
  PlotRange -> All]
NIntegrate[delta[10, Cos[x]],
  {x, 0, 2*Pi}]
Plot[delta[10, Cos[x]], {x, 0, 2*Pi},
   PlotRange -> All];

(If you copy this into a NB and then highlight the right notebook
bracket and type Ctl-Shift-N, it will prettify the input) .  Anyway,
you can see that the correct result for

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

is 2, not zero.

Kevin

W. K. Bertram wrote in message <72tscl$iqi at smc.vnet.net>...
>
>M. Rommel wrote:
>
>> I know normally "it's the user, stupid!" but this one seems real.
>>
>> In[1]:=    <<Calculus`DiracDelta`
>>
>> In[2]:=    Integrate[DiracDelta[Cos[x]],{x,0,\[Pi]}]
>>
>> Out[2]=  1
>>
>> That's what I agree with but the next line I cannot:
>>
>> In[3]:=    Integrate[DiracDelta[Cos[x]],{x,\[Pi],2\[Pi]}]
>>
>> Out[3]=  0
>>
>> Any comments/insights/etc. pp.?
>>
>
> Martin,
>The second result is certainly wrong! I have always been told to be very
>careful
>with expressions containing delta functions. As a result I would always
>transform
>an integral such as the one above by making the argument of the delta
>function the
>variableof integration. Therefore, making the substitution,
>
>   u = Cos[x]
>
>you would instead evaluate
>
> Integrate[Sqrt[1-u^2] DiracDelta[u],{u, Cos[Pi], Cos[2Pi]}]
>
>and this gives the correct result for all  limits of integration.
>Cheers,
>    Bill
>
>



  • Prev by Date: Re: How Mathematica do Interpolation?
  • Next by Date: Re: Mechanical Systems Question
  • Previous by thread: RE: Re: Bug in Calculus`DiracDelta`
  • Next by thread: Simplify