Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- KeyboardInterrupt Traceback (most recent call last)
- <ipython-input-43-fefb5a1b3c31> in <module>
- ----> 1 integrand = sp.Integral(integrand,(x,-oo,oo)).doit()
- 2 display(integrand)
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\integrals.py in doit(self, **hints)
- 591 antideriv = None
- 592 else:
- --> 593 antideriv = self._eval_integral(
- 594 function, xab[0], **eval_kwargs)
- 595 if antideriv is None and meijerg is True:
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\integrals.py in _eval_integral(self, f, x, meijerg, risch, manual, heurisch, conds)
- 1053 try:
- 1054 if conds == 'piecewise':
- -> 1055 h = heurisch_wrapper(g, x, hints=[])
- 1056 else:
- 1057 h = heurisch_(g, x, hints=[])
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in heurisch_wrapper(f, x, rewrite, hints, mappings, retries, degree_offset, unnecessary_permutations, _try_heurisch)
- 134 return f*x
- 135
- --> 136 res = heurisch(f, x, rewrite, hints, mappings, retries, degree_offset,
- 137 unnecessary_permutations, _try_heurisch)
- 138 if not isinstance(res, Basic):
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in heurisch(f, x, rewrite, hints, mappings, retries, degree_offset, unnecessary_permutations, _try_heurisch)
- 724 solution = _integrate()
- 725 else:
- --> 726 solution = _integrate()
- 727
- 728 if solution is not None:
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in _integrate(field)
- 698
- 699 try:
- --> 700 find_non_syms(raw_numer)
- 701 except PolynomialError:
- 702 return None
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- --> 693 list(map(find_non_syms, expr.args))
- 694 else:
- 695 # TODO: Non-polynomial expression. This should have been
- ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in find_non_syms(expr)
- 688 elif expr in syms:
- 689 pass # ignore variables
- --> 690 elif not expr.has(*syms):
- 691 non_syms.add(expr)
- 692 elif expr.is_Add or expr.is_Mul or expr.is_Pow:
- ~\.conda\envs\py37\lib\site-packages\sympy\core\cache.py in wrapper(*args, **kwargs)
- 70 def wrapper(*args, **kwargs):
- 71 try:
- ---> 72 retval = cfunc(*args, **kwargs)
- 73 except TypeError:
- 74 retval = func(*args, **kwargs)
- ~\.conda\envs\py37\lib\site-packages\sympy\core\basic.py in has(self, *patterns)
- 1208
- 1209 """
- -> 1210 return any(self._has(pattern) for pattern in patterns)
- 1211
- 1212 def _has(self, pattern):
- ~\.conda\envs\py37\lib\site-packages\sympy\core\basic.py in <genexpr>(.0)
- 1208
- 1209 """
- -> 1210 return any(self._has(pattern) for pattern in patterns)
- 1211
- 1212 def _has(self, pattern):
- ~\.conda\envs\py37\lib\site-packages\sympy\core\basic.py in _has(self, pattern)
- 1226 if _has_matcher is not None:
- 1227 match = _has_matcher()
- -> 1228 return any(match(arg) for arg in preorder_traversal(self))
- 1229 else:
- 1230 return any(arg == pattern for arg in preorder_traversal(self))
- ~\.conda\envs\py37\lib\site-packages\sympy\core\basic.py in <genexpr>(.0)
- 1226 if _has_matcher is not None:
- 1227 match = _has_matcher()
- -> 1228 return any(match(arg) for arg in preorder_traversal(self))
- 1229 else:
- 1230 return any(arg == pattern for arg in preorder_traversal(self))
- ~\.conda\envs\py37\lib\site-packages\sympy\core\basic.py in <lambda>(other)
- 1232 def _has_matcher(self):
- 1233 """Helper for .has()"""
- -> 1234 return lambda other: self == other
- 1235
- 1236 def replace(self, query, value, map=False, simultaneous=True, exact=None):
- ~\.conda\envs\py37\lib\site-packages\sympy\core\expr.py in __eq__(self, other)
- 137 other = _sympify(other)
- 138 if not isinstance(other, Expr):
- --> 139 return False
- 140 except (SympifyError, SyntaxError):
- 141 return False
- KeyboardInterrupt:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement