Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't integrate exp(-sqrt(x ** 2 + y ** 2)) over the plane #19385

Open
nschloe opened this issue May 20, 2020 · 0 comments
Open

Can't integrate exp(-sqrt(x ** 2 + y ** 2)) over the plane #19385

nschloe opened this issue May 20, 2020 · 0 comments

Comments

@nschloe
Copy link
Contributor

nschloe commented May 20, 2020

Sympy cannot integrate the function

import sympy
from sympy import oo, pi

x, y = sympy.symbols("x, y")
print(sympy.integrate(
    sympy.exp(-sympy.sqrt(x ** 2 + y ** 2)),
    (x, -oo, +oo),
    (y, -oo, +oo)
))

What does work:

  • The function in 1D

    print(sympy.integrate(
        sympy.exp(-sympy.sqrt(x ** 2)),
        (x, -oo, +oo),
    ))
    2
    
  • the squared exponent

    print(sympy.integrate(
        sympy.exp(-(x ** 2 + y ** 2)),
        (x, -oo, +oo),
        (y, -oo, +oo),
    ))
    pi
    
  • Polar coordinates

    r, phi = sympy.symbols("r, phi")
    print(sympy.integrate(
        r * sympy.exp(-r),
        (r, 0, +oo),
        (phi, 0, 2*pi)
    ))
    2 * pi
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants