bug in numerical integration

23 views
Skip to first unread message

Fetchinson

unread,
Feb 4, 2022, 10:06:52 AM2/4/22
to sy...@googlegroups.com
This is clearly wrong:

>>> integrate( 1 / ( x**2 + 0.5**2 ) / ( ( x - 1 )**2 + 0.5**2 ), ( x, -oo, oo ) ).evalf( )
0

With sympy 1.7.1.


--
Did Crypto Crash The World Economy Yet?
https://dcctwey.com/

Chris Smith

unread,
Feb 4, 2022, 11:15:17 AM2/4/22
to sympy
If you replace `0.5` with S.Half the answer is `2*pi`.

/c

Fetchinson

unread,
Feb 4, 2022, 12:03:47 PM2/4/22
to sy...@googlegroups.com
Thanks, yes.

But the bug is still there, a totally innocent convergent integral and
sympy gives the wrong result.
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/2144dcc8-bf57-42cb-a05b-e7224ab0ee6dn%40googlegroups.com.

Chris Smith

unread,
Feb 4, 2022, 6:40:18 PM2/4/22
to sympy
It's worth opening an issue for this.

/c

Reply all
Reply to author
Forward
0 new messages