View Single Post
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#4
"Limit" calculates the bilateral limit but SymPy does just limit from the left or right. So for bilateral limit, limit from both directions are calculated and compared, if equal the bilateral limit exists or else does not exist. So this explain the bilateral limit calculation takes more time (i.e., double) than from the left or right.

SymPy sintax for limit of 1/x when x approaches 0 from the right (default direction) :
>>> limit(1/x,x,0)
>>> limit(1/x,x,0,dir='+')
which is infinity. From the left :
>>> limit(1/x,x,0,dir='-')
yields - infinity.

Using SymPy directly is useful when a sequence of calculations is needed. Because "Limit" is restricted to just calculate limits with many simplify, output, etc, options.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2011-11-12 at 11:41. Reason: Comment about SymPy x Limit
 

The Following User Says Thank You to rcolistete For This Useful Post: