Updates:
        Status: Valid
        Labels: Series

Comment #1 on issue 3298 by [email protected]: integrate / limit does not know the sign of abs() / does nor catch NotImplementedError from limit()
http://code.google.com/p/sympy/issues/detail?id=3298

Nowadays, the error is:


In [5]: limit(integrate(abs(a)*exp(-abs(a)*x), x), x, oo)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-5-bb74dd8ee8de> in <module>()
----> 1 limit(integrate(abs(a)*exp(-abs(a)*x), x), x, oo)

/home/asmeurer/Dropbox/sympy/sympy/series/limits.pyc in limit(e, z, z0, dir)
    134             i, d = e.as_independent(z)
    135             if i is not S.One and i.is_bounded:
--> 136                 return i*limit(d, z, z0, dir)
    137         else:
    138             i, d = S.One, e

/home/asmeurer/Dropbox/sympy/sympy/series/limits.pyc in limit(e, z, z0, dir)
    260
    261     try:
--> 262         r = gruntz(e, z, z0, dir)
    263         if r is S.NaN:
    264             raise PoleError()

/home/asmeurer/Dropbox/sympy/sympy/series/gruntz.pyc in gruntz(e, z, z0, dir)
    676     r = None
    677     if z0 == oo:
--> 678         r = limitinf(e, z)
    679     elif z0 == -oo:
    680         r = limitinf(e.subs(z, -z), z)

/home/asmeurer/Dropbox/sympy/sympy/core/cache.pyc in wrapper(*args, **kw_args)
     89         except KeyError:
     90             pass
---> 91         func_cache_it_cache[k] = r = func(*args, **kw_args)
     92         return r
     93     return wrapper

/home/asmeurer/Dropbox/sympy/sympy/series/gruntz.pyc in limitinf(e, x)
    470         e = e.subs(x, p)
    471         x = p
--> 472     c0, e0 = mrv_leadterm(e, x)
    473     sig = sign(e0, x)
    474     if sig == 1:

/home/asmeurer/Dropbox/sympy/sympy/core/cache.pyc in wrapper(*args, **kw_args)
     89         except KeyError:
     90             pass
---> 91         func_cache_it_cache[k] = r = func(*args, **kw_args)
     92         return r
     93     return wrapper

/home/asmeurer/Dropbox/sympy/sympy/series/gruntz.pyc in mrv_leadterm(e, x)
    548     #
    549     w = Dummy("w", real=True, positive=True, bounded=True)
--> 550     f, logw = rewrite(exps, Omega, x, w)
    551     series = calculate_series(f, w, logx=logw)
552 series = series.subs(log(w), logw) # this should not be necessary

/home/asmeurer/Dropbox/sympy/sympy/series/gruntz.pyc in rewrite(e, Omega, x, wsym)
    616         wsym = 1/wsym #if g goes to oo, substitute 1/w
    617     elif sig != -1:
--> 618 raise NotImplementedError('Result depends on the sign of %s' % sig) 619 #O2 is a list, which results by rewriting each item in Omega using "w"
    620     O2 = []

NotImplementedError: Result depends on the sign of -sign(Abs(a))

In other words, the catching of NotImplementedError in integrate() has been fixed (and this uses the new algorithm anyway), but the Gruntz algorithm ought to be able to compute the sign of -sign(Abs(a)). Perhaps the problem is that a could be 0?

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to