Message Boards Message Boards

0
|
4179 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Integral w/ DiracDelta gives different results on different versions

Posted 6 years ago

I have access to Mathematica 9.0.0 and Mathematica 10.4.0. Recently I discovered that computing the same exact integral gives different answers in different versions of Mathematica. The integral involves the product of a DiracDelta function and a Gaussian density. I believe the result in 10.4 is incorrect and that there is a [B-word] in this version. I have emailed technical support about the issue. In the meanwhile, can someone with access to Mathematica 11 check whether this issue is still present?

Code in question:

Assuming[
 Element[a, Reals] && Element[y, Reals] && Element[z, Reals],
 Integrate[
  DiracDelta[y - (x + a)/z] PDF[NormalDistribution[0, s], x],
  {x, -Infinity, Infinity}]]

Output in Mathematica 9.0.0:

(E^(-((a - y z)^2/(2 s^2))) Abs[z])/(Sqrt[2 \[Pi]] s)

Output in Mathematica 10.4.0:

(1 + E^(-((a - y z)^2/(2 s^2))) + Abs[z])/(Sqrt[2 \[Pi]] s)

Plotting the two functions will confirm that they are not mathematically equivalent (and that the result from 10.4 does not make any sense).

Thanks for your input!

POSTED BY: Chris Sims
3 Replies
In[1]:= $Version

Out[1]= "10.2.0 for Microsoft Windows (64-bit) (July 28, 2015)"

In[2]:= Assuming[
 Element[a, Reals] && Element[y, Reals] && Element[z, Reals], 
 Integrate[
  DiracDelta[y - (x + a)/z] PDF[NormalDistribution[0, s], 
    x], {x, -Infinity, Infinity}]]

Out[2]= (E^(-((a - y z)^2/(2 s^2))) Abs[z])/(Sqrt[2 \[Pi]] s)
In[1]:= $Version

Out[1]= "11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"

In[2]:= Assuming[
 Element[a, Reals] && Element[y, Reals] && Element[z, Reals], 
 Integrate[
  DiracDelta[y - (x + a)/z] PDF[NormalDistribution[0, s], 
    x], {x, -Infinity, Infinity}]]

Out[2]= (E^(-((a - y z)^2/(2 s^2))) Abs[z])/(Sqrt[2 \[Pi]] s)
$Version

"8.0 for Microsoft Windows (64-bit) (October 7, 2011)"

Assuming[Element[a, Reals] && Element[y, Reals] && Element[z, Reals], 
 Integrate[
  DiracDelta[y - (x + a)/z] PDF[NormalDistribution[0, s], 
    x], {x, -Infinity, Infinity}]]

(E^(-((a - y z)^2/(2 s^2))) Abs[z])/(Sqrt[2 \[Pi]] s)
Posted 6 years ago

Hi, thanks for checking! Looks like they got the bug sorted out. And I had no idea it's possible to play around with the latest version online, that's also great to know!

POSTED BY: Chris Sims

Hi

MMA says:

   $Version
   (* "11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"*)

   Integrate[DiracDelta[y - (x + a)/z] PDF[NormalDistribution[0, s], x], {x, -Infinity, Infinity}, 
   Assumptions -> {{a, y, z} \[Element] Reals, s > 0}]
   (* (E^(-((a - y z)^2/(2 s^2))) Abs[z])/(Sqrt[2 \[Pi]] s) *)

If you don't have Mathematica 11.3,you can try for free,you must only sign-in.

Regards,MI

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract