Skip to content

Changed behaviour of series() involving exp, I #24266

@spj101

Description

@spj101

Commit 7293447 changes the behaviour of series for the exp function, is the new output preferred for some reason?

Before commit

from sympy import *
x = symbols('x')
print((exp(-I*pi*(2*x+1))).series(x,0,3))
print((exp(-I*pi*(2*x+1))*gamma(1+x)).series(x,0,3))

gives

-1 + 2*I*pi*x + 2*pi**2*x**2 + O(x**3)
-1 + x*(EulerGamma + 2*I*pi) + x**2*(-EulerGamma**2/2 + 23*pi**2/12 - 2*EulerGamma*I*pi) + O(x**3)

After commit

exp(-I*pi*(2*x + 1))
-1 + EulerGamma*x + x**2*(-pi**2/12 - EulerGamma**2/2) + O(x**3)

Now the exponential is not expanded, unless multiplied by some other function (for some reason?), and the branch cut/analytic continuation has been changed.

Thanks for any input on the desired behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions