Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium WrongResult
New issue 2630 by [email protected]: DeltaIntegrate provides wrong answer
on Multivariable integrals
http://code.google.com/p/sympy/issues/detail?id=2630
The following commands produce a wrong answer when using DiracDelta
functions in multivariate integrals.
In [1]: densityX = exp(-x**2/2)/sqrt(2*pi) # A normal density
In [2]: densityY = exp(-y**2/2)/sqrt(2*pi)
# Check that they integrate to one
In [3]: integrate(densityX*densityY, (x, -oo, oo), (y, -oo, oo))
Out[3]: 1
In [4]: Delta = deltafunctions.DiracDelta
In [5]: integrate(densityX*densityY * Delta(10*x+y-1), (x, -oo, oo), (y,
-oo, oo)).evalf()
Out[5]: 0.395002101563691
In [6]: integrate(densityX*densityY * Delta(x+10*y-1), (x, -oo, oo), (y,
-oo, oo)).evalf()
Out[6]: 0.0395002101563691
The two expressions are x/y symmetric and should give the same result.
Instead they are off by a factor of ten. This problem goes back at least a
few months and doesn't seem to be the result of a recent change.
Also, I tried to posted this once but I think it didn't go through. Please
excuse a possible double-post.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.