Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1388 by ondrej.certik: integrate(exp(-x)*x**n, x) fails
http://code.google.com/p/sympy/issues/detail?id=1388

In [7]: integrate(exp(-x)*x**n, x)
---------------------------------------------------------------------------
PolynomialError                           Traceback (most recent call last)

/home/ondrej/repos/sympy/<ipython console> in <module>()

/home/ondrej/repos/sympy/sympy/utilities/decorator.pyc in
threaded_decorator(expr, *args, **kwargs)
      53                     return Add(*[ func(f, *args, **kwargs) for f in
expr.args ])
      54                 else:
---> 55                     return func(expr, *args, **kwargs)
      56
      57         threaded_decorator.__doc__  = func.__doc__

/home/ondrej/repos/sympy/sympy/integrals/integrals.pyc in integrate(*args,
**kwargs)
     393
     394     if isinstance(integral, Integral):
--> 395         return integral.doit()
     396     else:
     397         return integral

/home/ondrej/repos/sympy/sympy/integrals/integrals.pyc in doit(self,  
**hints)
     132
     133         for x,ab in self.limits:
--> 134             antideriv = self._eval_integral(function, x)
     135
     136             if antideriv is None:

/home/ondrej/repos/sympy/sympy/integrals/integrals.pyc in
_eval_integral(self, f, x)
     305
     306             # fall back to the more general algorithm

--> 307             h = heurisch(g, x, hints=[])
     308
     309             if h is not None:

/home/ondrej/repos/sympy/sympy/integrals/risch.pyc in heurisch(f, x,  
**kwargs)
     214
     215     denoms = [ g.as_numer_denom()[1] for g in diffs ]
--> 216     denom = reduce(lambda p, q: lcm(p, q, V), denoms)
     217
     218     numers = [ Poly.cancel(denom * g, *V) for g in diffs ]

/home/ondrej/repos/sympy/sympy/integrals/risch.pyc in <lambda>(p, q)
     214
     215     denoms = [ g.as_numer_denom()[1] for g in diffs ]
--> 216     denom = reduce(lambda p, q: lcm(p, q, V), denoms)
     217
     218     numers = [ Poly.cancel(denom * g, *V) for g in diffs ]

/home/ondrej/repos/sympy/sympy/polys/wrappers.pyc in lcm(*args, **kwargs)

/home/ondrej/repos/sympy/sympy/polys/wrappers.pyc in _map_basic(f, n,
*args, **kwargs)
      21
      22 def _map_basic(f, n, *args, **kwargs):
---> 23     result = f(*_conv_args(n, args), **kwargs)
      24
      25     if isinstance(result, (list, tuple, set)):

/home/ondrej/repos/sympy/sympy/polys/algorithms.pyc in poly_lcm(f, g,  
*symbols)
     368         raise SymbolsError("Redundant symbols were given")
     369
--> 370     f, g = f.unify_with(g)
     371
     372     symbols, flags = f.symbols, f.flags

/home/ondrej/repos/sympy/sympy/polys/polynomial.pyc in unify_with(self,  
other)
    1523                 self = cls(self, *symbols, **flags)
    1524
-> 1525             other = cls(other, *symbols, **flags)
    1526
    1527         return self, other

/home/ondrej/repos/sympy/sympy/polys/polynomial.pyc in __new__(cls, poly,
*symbols, **flags)
     400                         terms = Poly._permute(poly, *symbols)
     401         else:
--> 402             terms = Poly._decompose(poly, *symbols)
     403
     404         if terms:

/home/ondrej/repos/sympy/sympy/polys/polynomial.pyc in _decompose(poly,
*symbols)
     543                             continue
     544
--> 545                         raise PolynomialError("Can't decompose %s"
% factor)
     546                     else:
     547                         coeff *= factor

PolynomialError: Can't decompose _x3**(4 - 2*n)


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to