# Limits involving branch cuts of elementary functions not handled #7216

Open
opened this Issue Dec 2, 2013 · 2 comments

Projects
None yet
4 participants

### 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/
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/
Member

### asmeurer commented Dec 2, 2013

 ``````**Summary:** Limits involving branch cuts of elementary functions not handled (was: Branch cuts of elementary functions not handled) `````` Original comment: http://code.google.com/p/sympy/issues/detail?id=4117#c2 Original author: https://code.google.com/u/asmeurer@gmail.com/

### skirpichev added a commit to diofant/diofant that referenced this issue Jan 30, 2016

``` Take into account branch cut in log._eval_nseries ```
```Used identity:
http://functions.wolfram.com/ElementaryFunctions/Log/17/01/01/0009/

Closes sympy/sympy#7216```
``` f73a0e2 ```