Re: [sympy] Integration failing for specific symbol name

12 views
Skip to first unread message

Aaron Meurer

unread,
Sep 6, 2012, 2:20:32 PM9/6/12
to sy...@googlegroups.com
When something like this happens, it's a bug. Everything in SymPy
should work just the same if you swap out different names for symbols,
with the exception that some things might be ordered differently.

In this case, it looks like the bug has already been fixed, so it
should work just fine in the upcoming 0.7.2 release, or in the
development version.

Aaron Meurer

On Thu, Sep 6, 2012 at 12:04 PM, Marc Massar <marc....@gmail.com> wrote:
> Hi,
>
> I found an integral that sometimes fails, sometime succeeds depending on the
> variable name. See the session below.
>
> How can I avoid such unexpected behavior?
>
> This is with SymPy 0.7.1 on windows.
>
> Thanks in advance.
>
> IPython console for SymPy 0.7.1 (Python 2.7.2-32-bit) (ground types: python)
>
> These commands were executed:
>>>> from __future__ import division
>>>> from sympy import *
>>>> x, y, z, t = symbols('x y z t')
>>>> k, m, n = symbols('k m n', integer=True)
>>>> f, g, h = symbols('f g h', cls=Function)
>
> Documentation can be found at http://www.sympy.org
>
> In [1]: x,a=symbols('x a')
>
> In [2]: integrate(exp(-(a**2+a)/2),(a,-oo,oo))
> Out[2]:
> oo
> /
> |
> | 2
> | a a
> | - -- - -
> | 2 2
> | e da
> |
> /
> -oo
>
> In [3]: integrate(exp(-(x**2+x)/2),(x,-oo,oo))
> Out[3]:
> ___ ____ 1/8
> \/ 2 *\/ pi *e
>
> In [4]:
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/YNstfGtJjAkJ.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.

Marc Massar

unread,
Sep 6, 2012, 2:26:15 PM9/6/12
to sy...@googlegroups.com
OK. Thanks for the quick reply.

I'll try installing the development version and come back here if I have more issue.

--Marc
Reply all
Reply to author
Forward
0 new messages