# sympy/sympy

3267: limit watches for difficult Add terms

```In cases as noted in the code, try see if the rational
form of the terms gives a result, and if so continue with the limit algorithm.```
1 parent 5c33969 commit 626b5c9d7ab9dfbaa74210dc15b14e00531d489c smichr committed May 23, 2012
Showing with 96 additions and 36 deletions.
1. +3 −4 sympy/integrals/tests/test_integrals.py
2. +81 −31 sympy/series/limits.py
3. +12 −1 sympy/series/tests/test_limits.py
7 sympy/integrals/tests/test_integrals.py
 @@ -2,7 +2,7 @@ Function, Rational, log, sin, cos, pi, E, I, Poly, LambertW, diff, Matrix, sympify, sqrt, atan, asin, acos, asinh, acosh, DiracDelta, Heaviside, Lambda, sstr, Add, Tuple, Interval, Sum, factor, trigsimp, simplify, O, - terms_gcd) + terms_gcd, EulerGamma, Ci) from sympy.utilities.pytest import XFAIL, raises from sympy.physics.units import m, s @@ -684,10 +684,9 @@ def test_atom_bug(): assert heurisch(meijerg([], [], [1], [], x), x) is None def test_limit_bug(): - # NOTE this used to raise NotImplementedError because of a limit problem. - # actually gruntz() can do this limit, see issue 2079 assert integrate(sin(x*y*z), (x, 0, pi), (y, 0, pi)) == \ - Integral(-cos(pi*y*z)/(y*z) + 1/(y*z), (y, 0, pi)) + -((-log(pi*z) + log(pi**2*z**2)/2 + Ci(pi**2*z) + )/z) + log(z**2)/(2*z) + EulerGamma/z + 2*log(pi)/z # The following tests work using meijerint. def test_issue841():
112 sympy/series/limits.py