MathGroup Archive 2006

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

Search the Archive

Re: Question: DiracDelta simplifies/integrates incorrectly?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65163] Re: [mg65132] Question: DiracDelta simplifies/integrates incorrectly?
  • From: John Harker <harker at me.rochester.edu>
  • Date: Wed, 15 Mar 2006 23:59:40 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On Wed, 15 Mar 2006, gardyloo wrote:

>John Harker wrote:
>> Hello,
>>
>> I have a question regarding the behavior of the DiracDelta function in
>> Mathematica 5.2.
>>
>> The following two inputs produce the following results:
>>
>> In[61]:=
>> Simplify[Pi*DiracDelta[Pi*x]]
>>
>> Out[61]=
>> DiracDelta[x]
>>
>> In[60]:=
>> Simplify[Pi*DiracDelta[Pi*(x-3)]]
>>
>> Out[60]=
>> \[Pi] DiracDelta[\[Pi] (-3+x)]
>>
>> As you can see, although the Pi is correctly simplified out in the first
>> case, it is not simplified in the second case.  This is a problem because
>> of the following result:
>>
>> In[68]:=
>> Clear[f];
>>
>> In[69]:=
>> Integrate[f[x]*Pi*DiracDelta[Pi*x],{x,-Infinity,Infinity}]
>>
>> Out[69]=
>> f[0]
>>
>> In[70]:=
>> Integrate[f[x]*Pi*DiracDelta[Pi*(x-3)],{x,-Infinity,Infinity}]
>>
>> Out[70]=
>> 0
>>
>> As you can see, the output [69] is correct, but the output [70] should
>> correctly be f[3], and instead it returns 0.
>>
>> Is there a flaw in my understanding of the DiracDelta function, or is this
>> a bug?
>>
>> All of the above poses a problem because Mathematica will return results
>> such as the following:
>>
>> In[78]:=
>> Simplify[
>>   FourierTransform[Exp[I*2*Pi*3*x],x,f,
>>     FourierParameters\[Rule]{0,-2*\[Pi]}]
>>   ]
>>
>> Out[78]=
>> \[Pi] DiracDelta[(-3+f) \[Pi]]
>>
>> So you see that just by asking for a simple Fourier transform, I can get
>> an output result which Mathematica cannot integrate correctly.
>>
>> Does anyone have any ideas about a better way to perform this math 
>> in order to get around the problem?  Or something illuminating about how
>> the DiracDelta function works?
>>
>> Many thanks!
>>
>> John
>>
>>
>>   
>   Perhaps this is overkill (more things get evaluated symbolically when
>they don't need to be?), but is it possible to use an unassigned symbol,
>like "n", in place of Pi, evaluate whatever you want, and then do a
>replacement with result/.{n->Pi} ?
>
>
>-- 
>==========================================================
>Curtis Osterhoudt
>PGP Key ID: 0x088E6D7A
>Please avoid sending me Word or PowerPoint attachments
>See http://www.gnu.org/philosophy/no-word-attachments.html
>==========================================================
>

Thanks, Curtis, you're absolutely correct!  For some reason, evaluating
with a general variable in place of Pi DOES work.  How odd.
For my purposes, I need to carry through the definition of pi from the
Fourier transform beforehand, so the workaround (which is more complete 
than my previously mentioned workaround) looks like this:
(edited for clarity)

In[17]:=
tmp=FourierTransform[Exp[I*2*jpi*n*x],x,f,FourierParameters\[Rule]{0,-2*jpi}]

Out[17]=
Sqrt[\[Pi]] * Sqrt[Abs[jpi]] * DiracDelta[f*jpi - jpi*n]

In[19]:=
Integrate[g[f]*tmp,{f,-Infinity,Infinity}] /. jpi->\[Pi]

Out[19]=
g[n]

So it works almost effortlessly.  You're right, there's a little more
complexity involved, but I'll take the tradeoff happily.

You can see that the Fourier transform gives the correct answer:

In[18]:=
tmp/.jpi->\[Pi]

Out[18]=
\[Pi] * DiracDelta[f*\[Pi] - n*\[Pi]]

...but somehow the use of the general variable jpi to replace Pi causes
everything to evaluate correctly when it's integrated.

Thanks for your advice!

John



  • Prev by Date: Re: Question: DiracDelta simplifies/integrates incorrectly?
  • Next by Date: Re: FileDate, or rather Microsoft
  • Previous by thread: Re: Question: DiracDelta simplifies/integrates incorrectly?
  • Next by thread: Finding a shorter form for coplanar point in 3D space