No Sympy Two-sided Limits?
I can't get Sympy to handle two-sided limits. Running in a Jupyter notebook, Anaconda installation: from sympy import * x = symbols('x') limit(1/x,x,0) gives an answer of oo. F
Solution 1:
limit has a fourth argument, dir, which specifies a direction:
>>> limit(1/x, x, 0, '+')
oo
>>> limit(1/x, x, 0, '-')
-oo
>>> limit(1/x, x, 0)
oo
The default is from the right. Bidirectional limits are not directly implemented yet, but you can easily check both directions.
Post a Comment for "No Sympy Two-sided Limits?"