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

Wrong limit for elliptic_k on the branch but #1320

Open
skirpichev opened this issue Apr 10, 2023 · 0 comments
Open

Wrong limit for elliptic_k on the branch but #1320

skirpichev opened this issue Apr 10, 2023 · 0 comments
Labels
series wrong answer if mathematically wrong result was obtained
Milestone

Comments

@skirpichev
Copy link
Collaborator

skirpichev commented Apr 10, 2023

In [1]: limit(elliptic_k(2+x), x, 0, dir=+I)
Out[1]: K(2)

In [2]: limit(elliptic_k(2+x), x, 0, dir=-I)
Out[2]: K(2)

c.f. https://reference.wolfram.com/language/ref/Limit.html:

In[1]:= Limit[EllipticK[2 + x], x -> 0, Direction -> +I]

Out[1]= EllipticK[2]

In[2]:= Limit[EllipticK[2 + x], x -> 0, Direction -> -I]

                                            5
                       (2 I) Sqrt[Pi] Gamma[-]
                                            4
Out[2]= EllipticK[2] + -----------------------
                                    3
                              Gamma[-]
                                    4

Series expansion for K(x) implemented using generalized hypergeometric function:

def _eval_nseries(self, x, n, logx):
from ...simplify import hyperexpand
return hyperexpand(self.rewrite(hyper)._eval_nseries(x, n, logx))

So, we must add support for branch cuts here, see this.

@skirpichev skirpichev added this to the 0.15 milestone Apr 10, 2023
@skirpichev skirpichev added the wrong answer if mathematically wrong result was obtained label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
series wrong answer if mathematically wrong result was obtained
Projects
Status: ToDo
Development

No branches or pull requests

1 participant