Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- KeyboardInterrupt Traceback (most recent call last)
- <ipython-input-114-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)
- 710 except ValueError:
- 711 raise PolynomialError
- --> 712 solution = solve_lin_sys(numer.coeffs(), coeff_ring, _raw=False)
- 713
- 714 if solution is None:
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in solve_lin_sys(eqs, ring, _raw)
- 225 eqs_coeffs.append(eq_coeffs)
- 226
- --> 227 result = _solve_lin_sys(eqs_coeffs, eqs_rhs, ring)
- 228
- 229 if result is not None and as_expr:
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in _solve_lin_sys(eqs_coeffs, eqs_rhs, ring)
- 303 sol = {}
- 304 for subsystem in subsystems:
- --> 305 subsol = _solve_lin_sys_component(subsystem[0], subsystem[1], ring)
- 306 if subsol is None:
- 307 return None
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in _solve_lin_sys_component(eqs_coeffs, eqs_rhs, ring)
- 351
- 352 # solve by row-reduction
- --> 353 echelon, pivots = matrix.rref()
- 354
- 355 # construct the returnable form of the solutions
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in rref(self)
- 607 if not self.domain.is_Field:
- 608 raise ValueError('Not a field')
- --> 609 rref_ddm, pivots = self.rep.rref()
- 610 return self.from_ddm(rref_ddm), tuple(pivots)
- 611
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in rref(a)
- 139 """Reduced-row echelon form of a and list of pivots"""
- 140 b = a.copy()
- --> 141 pivots = ddm_irref(b)
- 142 return b, pivots
- 143
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in ddm_irref(a)
- 264 ak[j] -= akj # ak[j] = zero
- 265 for l in range(j+1, n):
- --> 266 ak[l] -= akj * ai[l]
- 267
- 268 # next row
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\fields.py in __sub__(f, g)
- 440 return f.new(f.numer - g.numer, f.denom)
- 441 else:
- --> 442 return f.new(f.numer*g.denom - f.denom*g.numer, f.denom*g.denom)
- 443 elif isinstance(g, field.ring.dtype):
- 444 return f.new(f.numer - f.denom*g, f.denom)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\fields.py in new(f, numer, denom)
- 290 return f.__class__(numer, denom)
- 291 def new(f, numer, denom):
- --> 292 return f.raw_new(*numer.cancel(denom))
- 293
- 294 def to_poly(f):
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in cancel(self, g)
- 2215
- 2216 if not (domain.is_Field and domain.has_assoc_Ring):
- -> 2217 _, p, q = f.cofactors(g)
- 2218
- 2219 if q.is_negative:
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in cofactors(f, g)
- 2131
- 2132 J, (f, g) = f.deflate(g)
- -> 2133 h, cff, cfg = f._gcd(g)
- 2134
- 2135 return (h.inflate(J), cff.inflate(J), cfg.inflate(J))
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in _gcd(f, g)
- 2164 return f._gcd_QQ(g)
- 2165 elif ring.domain.is_ZZ:
- -> 2166 return f._gcd_ZZ(g)
- 2167 else: # TODO: don't use dense representation (port PRS algorithms)
- 2168 return ring.dmp_inner_gcd(f, g)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in _gcd_ZZ(f, g)
- 2169
- 2170 def _gcd_ZZ(f, g):
- -> 2171 return heugcd(f, g)
- 2172
- 2173 def _gcd_QQ(self, g):
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
- 78 h, cff, cfg = domain.cofactors(ff, gg)
- 79 else:
- ---> 80 h, cff, cfg = heugcd(ff, gg)
- 81
- 82 h = _gcd_interpolate(h, x, ring)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
- 78 h, cff, cfg = domain.cofactors(ff, gg)
- 79 else:
- ---> 80 h, cff, cfg = heugcd(ff, gg)
- 81
- 82 h = _gcd_interpolate(h, x, ring)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
- 78 h, cff, cfg = domain.cofactors(ff, gg)
- 79 else:
- ---> 80 h, cff, cfg = heugcd(ff, gg)
- 81
- 82 h = _gcd_interpolate(h, x, ring)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
- 78 h, cff, cfg = domain.cofactors(ff, gg)
- 79 else:
- ---> 80 h, cff, cfg = heugcd(ff, gg)
- 81
- 82 h = _gcd_interpolate(h, x, ring)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
- 59 domain = ring.domain
- 60
- ---> 61 gcd, f, g = f.extract_ground(g)
- 62
- 63 f_norm = f.max_norm()
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in extract_ground(self, g)
- 2034 gcd = f.ring.domain.gcd(fc, gc)
- 2035
- -> 2036 f = f.quo_ground(gcd)
- 2037 g = g.quo_ground(gcd)
- 2038
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in quo_ground(f, x)
- 1988 terms = [ (monom, quo(coeff, x)) for monom, coeff in f.iterterms() ]
- 1989 else:
- -> 1990 terms = [ (monom, coeff // x) for monom, coeff in f.iterterms() if not (coeff % x) ]
- 1991
- 1992 return f.new(terms)
- ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in <listcomp>(.0)
- 1988 terms = [ (monom, quo(coeff, x)) for monom, coeff in f.iterterms() ]
- 1989 else:
- -> 1990 terms = [ (monom, coeff // x) for monom, coeff in f.iterterms() if not (coeff % x) ]
- 1991
- 1992 return f.new(terms)
- KeyboardInterrupt:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement