Updates:
        Status: Valid
        Labels: Assumptions Integration Evalf

Comment #1 on issue 4066 by [email protected]: integrate(abs(y - x**2), (y,0,2)) raises ValueError: gamma function pole
http://code.google.com/p/sympy/issues/detail?id=4066

The full traceback is worth looking at

In [6]: In [3]: integrate(abs(y - x**2), (y,0,2))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-a60159bcc795> in <module>()
----> 1 integrate(abs(y - x**2), (y,0,2))

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/utilities/decorator.py in threaded_func(expr, *args, **kwargs) 33 func(expr.rhs, *args, **kwargs))
     34             else:
---> 35                 return func(expr, *args, **kwargs)
     36
     37     return threaded_func

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in integrate(*args, **kwargs)
   1281     if isinstance(integral, Integral):
1282 return integral.doit(deep=False, meijerg=meijerg, conds=conds,
-> 1283                              risch=risch, manual=manual)
   1284     else:
   1285         return integral

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in doit(self, **hints)
    553                     function, xab[0],
    554                     meijerg=meijerg1, risch=risch, manual=manual,
--> 555                     conds=conds)
    556                 if antideriv is None and meijerg1 is True:
    557                     ret = try_meijerg(function, xab)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in _eval_integral(self, f, x, meijerg, risch, manual, conds)
    931                 # rewrite using G functions
    932                 try:
--> 933                     h = meijerint_indefinite(g, x)
    934                 except NotImplementedError:
    935                     from sympy.integrals.meijerint import _debug

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/meijerint.py in meijerint_indefinite(f, x)
   1595     results = []
   1596     for a in list(_find_splitting_points(f, x)) + [S(0)]:
-> 1597         res = _meijerint_indefinite_1(f.subs(x, x + a), x)
   1598         if res is None:
   1599             continue

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/meijerint.py in _meijerint_indefinite_1(f, x) 1610 _debug('Trying to compute the indefinite integral of', f, 'wrt', x)
   1611
-> 1612     gs = _rewrite1(f, x)
   1613     if gs is None:
1614 # Note: the code that calls us will do expand() and try again

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/meijerint.py in _rewrite1(f, x, recursive)
   1547     """
   1548     fac, po, g = _split_mul(f, x)
-> 1549     g = _rewrite_single(g, x, recursive)
   1550     if g:
   1551         return fac, po, g[0], g[1]

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/cache.py in wrapper(*args, **kw_args)
     91         except (KeyError, TypeError):
     92             pass
---> 93         r = func(*args, **kw_args)
     94         try:
     95             func_cache_it_cache[k] = r

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/meijerint.py in _rewrite_single(f, x, recursive)
   1453                 for fac, g in terms:
1454 r1 = _get_coeff_exp(unpolarify(fac.subs(subs).subs(z, x), -> 1455 exponents_only=True), x)
   1456                     g = g.subs(subs).subs(z, x)
1457 # NOTE these substitutions can in principle introduce oo,

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/meijerint.py in _get_coeff_exp(expr, x)
    306     """
    307     from sympy import powsimp
--> 308     (c, m) = expand_power_base(powsimp(expr)).as_coeff_mul(x)
    309     if not m:
    310         return c, S(0)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/simplify/simplify.py in powsimp(expr, deep, combine, force, measure)
   2542
   2543     if deep or expr.is_Add or expr.is_Mul and _y not in expr.args:
-> 2544         expr = expr.func(*[recurse(w) for w in expr.args])
   2545
   2546     if expr.is_Pow:

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/simplify/simplify.py in <listcomp>(.0)
   2542
   2543     if deep or expr.is_Add or expr.is_Mul and _y not in expr.args:
-> 2544         expr = expr.func(*[recurse(w) for w in expr.args])
   2545
   2546     if expr.is_Pow:

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/simplify/simplify.py in recurse(arg, **kwargs)
   2533         _force = kwargs.get('force', force)
   2534         _measure = kwargs.get('measure', measure)
-> 2535         return powsimp(arg, _deep, _combine, _force, _measure)
   2536
   2537     expr = sympify(expr)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/simplify/simplify.py in powsimp(expr, deep, combine, force, measure)
   2545
   2546     if expr.is_Pow:
-> 2547         return recurse(expr*_y, deep=False)/_y
   2548
   2549     if not expr.is_Mul:

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/decorators.py in __sympifyit_wrapper(a, b)
     75                 if not hasattr(b, '_op_priority'):
     76                     b = sympify(b, strict=True)
---> 77                 return func(a, b)
     78             except SympifyError:
     79                 return retval

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/decorators.py in binary_op_wrapper(self, other)
    116                     else:
    117                         return f(self)
--> 118             return func(self, other)
    119         return binary_op_wrapper
    120     return priority_decorator

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py in __mul__(self, other)
    160     @call_highest_priority('__rmul__')
    161     def __mul__(self, other):
--> 162         return Mul(self, other)
    163
    164     @_sympifyit('other', NotImplemented)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/cache.py in wrapper(*args, **kw_args)
     91         except (KeyError, TypeError):
     92             pass
---> 93         r = func(*args, **kw_args)
     94         try:
     95             func_cache_it_cache[k] = r

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/operations.py in __new__(cls, *args, **options)
     38             return args[0]
     39
---> 40         c_part, nc_part, order_symbols = cls.flatten(args)
     41         is_commutative = not nc_part
     42         obj = cls._from_args(c_part + nc_part, is_commutative)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/mul.py in flatten(cls, seq)
    178                 a, b = b, a
    179             assert not a is S.One
--> 180             if not a.is_zero and a.is_Rational:
    181                 r, b = b.as_coeff_Mul()
    182                 if b.is_Add:

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/assumptions.py in getit(self)
    142             if self._assumptions is self.default_assumptions:
    143                 self._assumptions = self.default_assumptions.copy()
--> 144             return _ask(fact, self)
    145
    146     getit.func_name = as_property(fact)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/assumptions.py in _ask(fact, obj)
    195             continue
    196         if pk in handler_map:
--> 197             _ask(pk, obj)
    198
    199             # we might have found the value of fact

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/assumptions.py in _ask(fact, obj)
    185         pass
    186     else:
--> 187         a = evaluate(obj)
    188         if a is not None:
    189             assumptions.deduce_all_facts(((fact, a),))

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/power.py in _eval_is_positive(self)
    164
    165     def _eval_is_positive(self):
--> 166         if self.base.is_positive:
    167             if self.exp.is_real:
    168                 return True

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/assumptions.py in getit(self)
    142             if self._assumptions is self.default_assumptions:
    143                 self._assumptions = self.default_assumptions.copy()
--> 144             return _ask(fact, self)
    145
    146     getit.func_name = as_property(fact)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/assumptions.py in _ask(fact, obj)
    185         pass
    186     else:
--> 187         a = evaluate(obj)
    188         if a is not None:
    189             assumptions.deduce_all_facts(((fact, a),))

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py in _eval_is_positive(self)
    668             try:
    669                 # check to see that we can get a value
--> 670                 n2 = self._eval_evalf(2)
    671                 if n2 is None:
    672                     raise AttributeError

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.py in _eval_evalf(self, prec)
    394         try:
    395             mpmath.mp.prec = prec
--> 396             v = func(*args)
    397         finally:
    398             mpmath.mp.prec = orig

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/mpmath/ctx_mp_python.py in f(x, **kwargs)
    991             if hasattr(x, '_mpf_'):
    992                 try:
--> 993 return ctx.make_mpf(mpf_f(x._mpf_, prec, rounding))
    994                 except ComplexResult:
    995                     # Handle propagation to complex

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/mpmath/libmp/gammazeta.py in mpf_gamma(x, prec, rnd, type)
   1964             if type == 2:
   1965                 return fzero
-> 1966             raise ValueError("gamma function pole")
   1967         # n = x
   1968         n = man << exp

ValueError: gamma function pole

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to