In [6]: integrate(diff(exp(x + x**2)), x, risch=False)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-cb4aeab52710> in <module>()
----> 1 integrate(diff(exp(x + x**2)), x, risch=False)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/utilities/decorator.py in threaded_func(expr, *args, **kwargs)
28 func(expr.rhs, *args, **kwargs))
29 else:
---> 30 return func(expr, *args, **kwargs)
31
32 return threaded_func
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in integrate(*args, **kwargs)
1528
1529 if isinstance(integral, Integral):
-> 1530 return integral.doit(deep=False, meijerg=meijerg, conds=conds, risch=risch)
1531 else:
1532 return integral
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in doit(self, **hints)
745 antideriv = None
746 else:
--> 747 antideriv = self._eval_integral(function, xab[0], meijerg=meijerg1, risch=risch)
748 if antideriv is None and meijerg1 is True:
749 ret = try_meijerg(function, xab)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/integrals.py in _eval_integral(self, f, x, meijerg, risch)
1111
1112 try:
-> 1113 manual = manualintegrate(g, x)
1114 if manual is not None and manual.func != Integral:
1115 if manual.has(Integral):
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in manualintegrate(f, var)
793 sympy.integrals.integrals.Integral
794 """
--> 795 return _manualintegrate(integral_steps(f, var))
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in integral_steps(integrand, symbol, **options)
664 )
665 ),
--> 666 fallback_rule)(integral)
667 _integral_cache[cachekey] = result
668 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in do_one_rl(expr)
81 def do_one_rl(expr):
82 for rl in rules:
---> 83 result = rl(expr)
84 if result != expr:
85 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in null_safe_rl(expr)
61 """ Return original expr if rule returns None """
62 def null_safe_rl(expr):
---> 63 result = rule(expr)
64 if result is None:
65 return expr
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in _alternatives(integral)
171 alts = []
172 for rule in rules:
--> 173 result = rule(integral)
174 if result and not isinstance(result, DontKnowRule) and result != integral:
175 alts.append(result)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in parts_rule(integral)
356 u, dv, v, du, v_step = steps[0]
357 rule = PartsRule(u, dv, v_step,
--> 358 make_second_step(steps[1:], v * du),
359 integrand, symbol)
360 if constant != 1:
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in make_second_step(steps, integrand)
351 integrand, symbol)
352 else:
--> 353 return integral_steps(integrand, symbol)
354
355 if steps:
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in integral_steps(integrand, symbol, **options)
664 )
665 ),
--> 666 fallback_rule)(integral)
667 _integral_cache[cachekey] = result
668 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in do_one_rl(expr)
81 def do_one_rl(expr):
82 for rl in rules:
---> 83 result = rl(expr)
84 if result != expr:
85 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in null_safe_rl(expr)
61 """ Return original expr if rule returns None """
62 def null_safe_rl(expr):
---> 63 result = rule(expr)
64 if result is None:
65 return expr
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in switch_rl(expr)
91 def switch_rl(expr):
92 rl = ruledict.get(key(expr), identity)
---> 93 return rl(expr)
94 return switch_rl
95
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in do_one_rl(expr)
81 def do_one_rl(expr):
82 for rl in rules:
---> 83 result = rl(expr)
84 if result != expr:
85 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in null_safe_rl(expr)
61 """ Return original expr if rule returns None """
62 def null_safe_rl(expr):
---> 63 result = rule(expr)
64 if result is None:
65 return expr
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in mul_rule(integral)
257 return ConstantTimesRule(
258 coeff, f,
--> 259 integral_steps(f, symbol),
260 integrand, symbol)
261
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in integral_steps(integrand, symbol, **options)
664 )
665 ),
--> 666 fallback_rule)(integral)
667 _integral_cache[cachekey] = result
668 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in do_one_rl(expr)
81 def do_one_rl(expr):
82 for rl in rules:
---> 83 result = rl(expr)
84 if result != expr:
85 return result
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/strategies/core.py in null_safe_rl(expr)
61 """ Return original expr if rule returns None """
62 def null_safe_rl(expr):
---> 63 result = rule(expr)
64 if result is None:
65 return expr
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in _alternatives(integral)
171 alts = []
172 for rule in rules:
--> 173 result = rule(integral)
174 if result and not isinstance(result, DontKnowRule) and result != integral:
175 alts.append(result)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in parts_rule(integral)
315 constant, integrand = integrand.as_coeff_Mul()
316
--> 317 result = _parts_rule(integrand, symbol)
318
319 steps = []
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in _parts_rule(integrand, symbol)
294
295 for index, rule in enumerate(liate_rules):
--> 296 result = rule(integrand)
297
298 if result:
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/integrals/manualintegrate.py in pull_out_polys(integrand)
265 def pull_out_polys(integrand):
266 integrand = integrand.together()
--> 267 polys = [arg for arg in integrand.args if arg.is_polynomial(symbol)]
268 if polys:
269 u = sympy.Mul(*polys)
AttributeError: 'Tuple' object has no attribute 'is_polynomial'
Original issue for #6895: http://code.google.com/p/sympy/issues/detail?id=3796 Original author: https://code.google.com/u/asmeurer@gmail.com/