Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2020
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---------------------------------------------------------------------------
  2. KeyboardInterrupt Traceback (most recent call last)
  3. <ipython-input-114-fefb5a1b3c31> in <module>
  4. ----> 1 integrand = sp.Integral(integrand,(x,-oo,oo)).doit()
  5. 2 display(integrand)
  6.  
  7. ~\.conda\envs\py37\lib\site-packages\sympy\integrals\integrals.py in doit(self, **hints)
  8. 591 antideriv = None
  9. 592 else:
  10. --> 593 antideriv = self._eval_integral(
  11. 594 function, xab[0], **eval_kwargs)
  12. 595 if antideriv is None and meijerg is True:
  13.  
  14. ~\.conda\envs\py37\lib\site-packages\sympy\integrals\integrals.py in _eval_integral(self, f, x, meijerg, risch, manual, heurisch, conds)
  15. 1053 try:
  16. 1054 if conds == 'piecewise':
  17. -> 1055 h = heurisch_wrapper(g, x, hints=[])
  18. 1056 else:
  19. 1057 h = heurisch_(g, x, hints=[])
  20.  
  21. ~\.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)
  22. 134 return f*x
  23. 135
  24. --> 136 res = heurisch(f, x, rewrite, hints, mappings, retries, degree_offset,
  25. 137 unnecessary_permutations, _try_heurisch)
  26. 138 if not isinstance(res, Basic):
  27.  
  28. ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in heurisch(f, x, rewrite, hints, mappings, retries, degree_offset, unnecessary_permutations, _try_heurisch)
  29. 724 solution = _integrate()
  30. 725 else:
  31. --> 726 solution = _integrate()
  32. 727
  33. 728 if solution is not None:
  34.  
  35. ~\.conda\envs\py37\lib\site-packages\sympy\integrals\heurisch.py in _integrate(field)
  36. 710 except ValueError:
  37. 711 raise PolynomialError
  38. --> 712 solution = solve_lin_sys(numer.coeffs(), coeff_ring, _raw=False)
  39. 713
  40. 714 if solution is None:
  41.  
  42. ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in solve_lin_sys(eqs, ring, _raw)
  43. 225 eqs_coeffs.append(eq_coeffs)
  44. 226
  45. --> 227 result = _solve_lin_sys(eqs_coeffs, eqs_rhs, ring)
  46. 228
  47. 229 if result is not None and as_expr:
  48.  
  49. ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in _solve_lin_sys(eqs_coeffs, eqs_rhs, ring)
  50. 303 sol = {}
  51. 304 for subsystem in subsystems:
  52. --> 305 subsol = _solve_lin_sys_component(subsystem[0], subsystem[1], ring)
  53. 306 if subsol is None:
  54. 307 return None
  55.  
  56. ~\.conda\envs\py37\lib\site-packages\sympy\polys\solvers.py in _solve_lin_sys_component(eqs_coeffs, eqs_rhs, ring)
  57. 351
  58. 352 # solve by row-reduction
  59. --> 353 echelon, pivots = matrix.rref()
  60. 354
  61. 355 # construct the returnable form of the solutions
  62.  
  63. ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in rref(self)
  64. 607 if not self.domain.is_Field:
  65. 608 raise ValueError('Not a field')
  66. --> 609 rref_ddm, pivots = self.rep.rref()
  67. 610 return self.from_ddm(rref_ddm), tuple(pivots)
  68. 611
  69.  
  70. ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in rref(a)
  71. 139 """Reduced-row echelon form of a and list of pivots"""
  72. 140 b = a.copy()
  73. --> 141 pivots = ddm_irref(b)
  74. 142 return b, pivots
  75. 143
  76.  
  77. ~\.conda\envs\py37\lib\site-packages\sympy\polys\domainmatrix.py in ddm_irref(a)
  78. 264 ak[j] -= akj # ak[j] = zero
  79. 265 for l in range(j+1, n):
  80. --> 266 ak[l] -= akj * ai[l]
  81. 267
  82. 268 # next row
  83.  
  84. ~\.conda\envs\py37\lib\site-packages\sympy\polys\fields.py in __sub__(f, g)
  85. 440 return f.new(f.numer - g.numer, f.denom)
  86. 441 else:
  87. --> 442 return f.new(f.numer*g.denom - f.denom*g.numer, f.denom*g.denom)
  88. 443 elif isinstance(g, field.ring.dtype):
  89. 444 return f.new(f.numer - f.denom*g, f.denom)
  90.  
  91. ~\.conda\envs\py37\lib\site-packages\sympy\polys\fields.py in new(f, numer, denom)
  92. 290 return f.__class__(numer, denom)
  93. 291 def new(f, numer, denom):
  94. --> 292 return f.raw_new(*numer.cancel(denom))
  95. 293
  96. 294 def to_poly(f):
  97.  
  98. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in cancel(self, g)
  99. 2215
  100. 2216 if not (domain.is_Field and domain.has_assoc_Ring):
  101. -> 2217 _, p, q = f.cofactors(g)
  102. 2218
  103. 2219 if q.is_negative:
  104.  
  105. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in cofactors(f, g)
  106. 2131
  107. 2132 J, (f, g) = f.deflate(g)
  108. -> 2133 h, cff, cfg = f._gcd(g)
  109. 2134
  110. 2135 return (h.inflate(J), cff.inflate(J), cfg.inflate(J))
  111.  
  112. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in _gcd(f, g)
  113. 2164 return f._gcd_QQ(g)
  114. 2165 elif ring.domain.is_ZZ:
  115. -> 2166 return f._gcd_ZZ(g)
  116. 2167 else: # TODO: don't use dense representation (port PRS algorithms)
  117. 2168 return ring.dmp_inner_gcd(f, g)
  118.  
  119. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in _gcd_ZZ(f, g)
  120. 2169
  121. 2170 def _gcd_ZZ(f, g):
  122. -> 2171 return heugcd(f, g)
  123. 2172
  124. 2173 def _gcd_QQ(self, g):
  125.  
  126. ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
  127. 78 h, cff, cfg = domain.cofactors(ff, gg)
  128. 79 else:
  129. ---> 80 h, cff, cfg = heugcd(ff, gg)
  130. 81
  131. 82 h = _gcd_interpolate(h, x, ring)
  132.  
  133. ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
  134. 78 h, cff, cfg = domain.cofactors(ff, gg)
  135. 79 else:
  136. ---> 80 h, cff, cfg = heugcd(ff, gg)
  137. 81
  138. 82 h = _gcd_interpolate(h, x, ring)
  139.  
  140. ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
  141. 78 h, cff, cfg = domain.cofactors(ff, gg)
  142. 79 else:
  143. ---> 80 h, cff, cfg = heugcd(ff, gg)
  144. 81
  145. 82 h = _gcd_interpolate(h, x, ring)
  146.  
  147. ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
  148. 78 h, cff, cfg = domain.cofactors(ff, gg)
  149. 79 else:
  150. ---> 80 h, cff, cfg = heugcd(ff, gg)
  151. 81
  152. 82 h = _gcd_interpolate(h, x, ring)
  153.  
  154. ~\.conda\envs\py37\lib\site-packages\sympy\polys\heuristicgcd.py in heugcd(f, g)
  155. 59 domain = ring.domain
  156. 60
  157. ---> 61 gcd, f, g = f.extract_ground(g)
  158. 62
  159. 63 f_norm = f.max_norm()
  160.  
  161. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in extract_ground(self, g)
  162. 2034 gcd = f.ring.domain.gcd(fc, gc)
  163. 2035
  164. -> 2036 f = f.quo_ground(gcd)
  165. 2037 g = g.quo_ground(gcd)
  166. 2038
  167.  
  168. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in quo_ground(f, x)
  169. 1988 terms = [ (monom, quo(coeff, x)) for monom, coeff in f.iterterms() ]
  170. 1989 else:
  171. -> 1990 terms = [ (monom, coeff // x) for monom, coeff in f.iterterms() if not (coeff % x) ]
  172. 1991
  173. 1992 return f.new(terms)
  174.  
  175. ~\.conda\envs\py37\lib\site-packages\sympy\polys\rings.py in <listcomp>(.0)
  176. 1988 terms = [ (monom, quo(coeff, x)) for monom, coeff in f.iterterms() ]
  177. 1989 else:
  178. -> 1990 terms = [ (monom, coeff // x) for monom, coeff in f.iterterms() if not (coeff % x) ]
  179. 1991
  180. 1992 return f.new(terms)
  181.  
  182. KeyboardInterrupt:
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement