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

Limits involving branch cuts of elementary functions not handled #7216

Open
sympy-issue-migrator opened this Issue Dec 2, 2013 · 2 comments

Comments

Projects
None yet
4 participants
@sympy-issue-migrator
Copy link

sympy-issue-migrator commented Dec 2, 2013

Branch cuts of sqrt() and log() are not handled properly.

If that implies that sqrt() and log() have more than this issue in the complex plane I don't know.
Moreover, if that implies that other elementary functions are having similar problems with branch cuts I have not tested.

In [1]: from sympy import *                                        

Exmpl. 1-------------------sqrt()---------------------------
1st, numerically

In [2]: N(sqrt(-1.+I*1e-10))                                                                                   
Out[2]: 5.0e-11 + 1.0*I

In [3]: N(sqrt(-1.-I*1e-10))                                                                                   
Out[3]: 5.0e-11 - 1.0*I             

Ok. sqrt-branch seems to lie on neg. Re-axis and is selected properly
2nd, same thing symbolically

In [5]: eps=symbols('eps')                                                                                     
In [6]: limit(sqrt(-1+I*eps),eps,0,'+')                                                                        
Out[6]: I

In [7]: limit(sqrt(-1+I*eps),eps,0,'-')                                                                        
Out[7]: I

In [8]: limit(sqrt(-1-I*eps),eps,0,'+')                                                                        
Out[8]: I

In [9]: limit(sqrt(-1-I*eps),eps,0,'-')                                                                        
Out[9]: I

Symbolic sqrt() returns 'I' irrespective of approach to branch cut. Wrong.

Exmpl. 2-------------log()--------------
1st, numerically

In [10]: log(-1I*1e-10)                                                                                       
Out[10]: 5.0e-21 - 3.14159265348979*I

In [11]: log(-1+I*1e-10)                                                                                       
Out[11]: 5.0e-21 + 3.14159265348979*I

Ok. log-branch seems to lie on neg. Re-axis and is selected properly
2nd, same thing symbolically

In [12]: limit(log(-1+I*eps),eps,0,'+')                                                                         
Out[12]: I*pi

In [13]: limit(log(-1+I*eps),eps,0,'-')                                                                         
Out[13]: I*pi

In [14]: limit(log(-1-I*eps),eps,0,'+')                                                                         
Out[14]: I*pi

In [15]: limit(log(-1-I*eps),eps,0,'-')                                                                         
Out[15]: I*pi

Symbolic log() returns 'I*pi' irrespective of approach to branch cut. Wrong.

Original issue for #7216: http://code.google.com/p/sympy/issues/detail?id=4117
Original author: https://code.google.com/u/112689286102358441542/

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Dec 2, 2013

**Status:** Valid  
**Labels:** Series WrongResult  

Original comment: http://code.google.com/p/sympy/issues/detail?id=4117#c1
Original author: https://code.google.com/u/asmeurer@gmail.com/

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Dec 2, 2013

**Summary:** Limits involving branch cuts of elementary functions not handled  <span class="oldvalue"> (was: Branch cuts of elementary functions not handled) </span>  

Original comment: http://code.google.com/p/sympy/issues/detail?id=4117#c2
Original author: https://code.google.com/u/asmeurer@gmail.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment