@Tom, the operation is well defined for all sufficiently nice functions. @Matthew, The notation that is used there is a bit unclear (for me). The domain is all zeros of g and the sigma is just some measure theory notation meaning that you should actually take the sum.
To solve this in sympy you can try the following thing (it depends on how good 'solve' is in sympy): 0) to solve integrate(delta(f(x,y,...)*g(x,y,...)), (x,...), (y,...), ...) 1) take out the g(x,y,...) function from the delta function 2) find the zeros of g(...) (presumably using 'solve') 3) evaluate the derivatives of g(...) at those zeros 4) your integral is equal to the sum of f(...) / |grad(g(...))| evaluated at those zeros. I think that a nice explanation can be found in Appel. I can send a pdf with the book to you if you are interested. On 20 December 2011 19:45, Tom Bachmann <[email protected]> wrote: > I think there are two basic cases to consider: > > 1) delta functions with *linear* arguments. > > This is (I believe) by a large margin the most common case. For this > deltaintegrate should simply be fixed; one only needs to correctly > implement integral(f(x) delta(a*x+b), (x, c, d)) and this shouldn't be > hard. (Note that this will also yield the multi-dimensional cases, by > repeated integration.) > > 2) delta functions with more complicated arguments > > Getting this to work is (I believe) much more work. It is non-trivial to > even define this. > > Tom > > > On 20.12.2011 16:21, Matthew Rocklin wrote: > >> Hi Everyone, >> >> I'd like to compute multivariate integrals that contain Dirac >> Deltafunctions. I.e. expressions like >> >> integrate(exp(-(x**2+y**2))/pi * delta(2*x+3*y), (x,-oo, oo), (y,-oo, oo)) >> >> The deltaintegrate function inside sympy fails to compute these >> correctly, see issue 2630. >> <http://code.google.com/p/**sympy/issues/detail?id=2630<http://code.google.com/p/sympy/issues/detail?id=2630> >> > >> >> Wikipedia says >> <http://en.wikipedia.org/wiki/**Dirac_delta_functions#** >> Properties_in_n_dimensions<http://en.wikipedia.org/wiki/Dirac_delta_functions#Properties_in_n_dimensions> >> > >> >> that you can compute general expressions of this form as follows: >> >> \int_{\mathbb{R}^n} f(\mathbf{x}) \, \delta(g(\mathbf{x})) \, >> d\mathbf{x} = >> \int_{g^{-1}(0)}\frac{f(\**mathbf{x})}{|\mathbf{\nabla}g|** >> }\,d\sigma(\mathbf{x}) >> >> (hopefully the above image makes it through, if not go here) >> http://upload.wikimedia.org/**wikipedia/en/math/3/3/f/** >> 33fbbed28ec715257d268faefc9e0e**9f.png<http://upload.wikimedia.org/wikipedia/en/math/3/3/f/33fbbed28ec715257d268faefc9e0e9f.png> >> >> How hard would it be to compute the right hand side in sympy? In >> particular I'm confused by how to express the domain and what they mean >> by \delta\sigma(x) >> >> Or, if there is a better way of going about this I'm happy to hear it. >> >> -Matt >> >> -- >> You received this message because you are subscribed to the Google >> Groups "sympy" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> sympy+unsubscribe@**googlegroups.com<sympy%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/**group/sympy?hl=en<http://groups.google.com/group/sympy?hl=en> >> . >> > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to sympy+unsubscribe@** > googlegroups.com <sympy%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/sympy?hl=en <http://groups.google.com/group/sympy?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "sympy" 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?hl=en.
