Opened: http://code.google.com/p/sympy/issues/detail?id=3298
On Monday, June 18, 2012 10:32:55 PM UTC+3, Aaron Meurer wrote:
>
> It looks like in the git master the integral works:
>
> In [1]: var('a')
> Out[1]: a
>
> In [2]: integrate(abs(a)*exp(-abs(a)*x), (x, 0, oo))
> Out[2]:
> ⎧ π
> ⎪ 1 for │periodic_argument(│a│, ∞)│ < ─
> ⎪ 2
> ⎪
> ⎪∞
> ⎨⌠
> ⎪⎮ -x⋅│a│
> ⎪⎮ ℯ ⋅│a│ dx otherwise
> ⎪⌡
> ⎪0
> ⎩
>
> But the limit bug still exists (it's simply bypassed by the new
> integration algorithm), so if you could still open an issue for that,
> that would be great.
>
> Aaron Meurer
>
>
> On Mon, Jun 18, 2012 at 1:12 PM, Aaron Meurer <[email protected]> wrote:
> > It's definitely a bug. integrate should catch NotImplementedError from
> > limit() and return an unevaluated Integral.
> >
> > Also, not knowing the sign of abs is definitely a bug as well. Please
> open
> > an issue for this at http://code.google.com/p/sympy/issues/list.
> >
> > Aaron Meurer
> >
> > On Jun 18, 2012, at 12:53 PM, Barak Yair Reif <[email protected]>
> wrote:
> >
> > I tried to look for this bug and haven't found it (maybe my lacking
> search
> > skills), still I felt uncomfortable to open an issue.
> >
> > Here is the code:
> >
> > x=Symbol("x")
> >
> > f1=2*E**(-2*x)
> > F1=integrate(f1,(x,0,oo))
> > print F1 #Works great:
> >
> > a=Symbol("a")
> > f2=abs(a)*E**(-abs(a)*x)
> > F2=integrate(f2,(x,0,oo)) #fails
> >
> > and the output is:
> >
> > Traceback (most recent call last):
> > File "C:/Users/Barak/Desktop/python/temp", line 18, in <module>
> > F2=integrate(f2,(x,0,oo))
> > File "C:\Python27\lib\site-packages\sympy\utilities\decorator.py",
> line
> > 24, in threaded_func
> > return func(expr, *args, **kwargs)
> > File "C:\Python27\lib\site-packages\sympy\integrals\integrals.py",
> line
> > 847, in integrate
> > return integral.doit(deep = False)
> > File "C:\Python27\lib\site-packages\sympy\integrals\integrals.py",
> line
> > 393, in doit
> > function = antideriv._eval_interval(x, a, b)
> > File "C:\Python27\lib\site-packages\sympy\core\expr.py", line 229, in
> > _eval_interval
> > B = limit(self, x, b)
> > File "C:\Python27\lib\site-packages\sympy\series\limits.py", line 116,
> in
> > limit
> > return i*limit(d, z, z0, dir)
> > File "C:\Python27\lib\site-packages\sympy\series\limits.py", line 192,
> in
> > limit
> > r = gruntz(e, z, z0, dir)
> > File "C:\Python27\lib\site-packages\sympy\series\gruntz.py", line 678,
> in
> > gruntz
> > r = limitinf(e, z)
> > File "C:\Python27\lib\site-packages\sympy\core\cache.py", line 101, in
> > wrapper
> > func_cache_it_cache[k] = r = func(*args, **kw_args)
> > File "C:\Python27\lib\site-packages\sympy\series\gruntz.py", line 480,
> in
> > limitinf
> > c0, e0 = mrv_leadterm(e, x)
> > File "C:\Python27\lib\site-packages\sympy\core\cache.py", line 101, in
> > wrapper
> > func_cache_it_cache[k] = r = func(*args, **kw_args)
> > File "C:\Python27\lib\site-packages\sympy\series\gruntz.py", line 562,
> in
> > mrv_leadterm
> > f, logw = rewrite(exps, Omega, x, w)
> > File "C:\Python27\lib\site-packages\sympy\series\gruntz.py", line 627,
> in
> > rewrite
> > raise NotImplementedError('Result depends on the sign of %s' % sig)
> > NotImplementedError: Result depends on the sign of -sign(Abs(a))
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "sympy" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/sympy/-/W6WpoV5C5DUJ.
> > 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?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sympy/-/3Yo0yqLqDtkJ.
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?hl=en.