Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium Polynomial
New issue 2503 by asmeurer: Poly should use free_symbols to check for
variable dependence
http://code.google.com/p/sympy/issues/detail?id=2503
I just noticed this bug noted in the IRC logs, but it was never reported
here. Read more at
http://kottnet.net/irclogs/freenode/chn-%23sympy/2011-06-18.log.
22:51 < vks> andy: yes, for indefinite integrals it's important
22:51 < vks> but this should actually work:
22:51 < vks> >>> Poly(Integral(x, (x, 0, 1))*x + x**2, x)
22:51 < vks> ------------------------------------------------------------
22:51 < vks> Traceback (most recent call last):
22:51 < vks> File "<ipython console>", line 1, in <module>
22:51 < vks> File "sympy/polys/polytools.py", line 101, in __new__
22:51 < vks> return cls._from_expr(rep, opt)
22:51 < vks> File "sympy/polys/polytools.py", line 208, in _from_expr
22:51 < vks> rep, opt = _dict_from_expr(rep, opt)
22:51 < vks> File "sympy/polys/polyutils.py", line 292, in _dict_from_expr
22:51 < vks> rep, gens = _dict_from_expr_if_gens(expr, opt)
22:51 < vks> File "sympy/polys/polyutils.py", line 250, in
_dict_from_expr_if_gens
22:51 < vks> (poly,), gens = _parallel_dict_from_expr_if_gens((expr,),
opt)
22:51 < vks> File "sympy/polys/polyutils.py", line 160, in
_parallel_dict_from_expr_if_gens
22:51 < vks> raise PolynomialError("%s contains an element of the
generators set" % factor)
22:51 < vks> PolynomialError: Integral(x, (x, 0, 1)) contains an element of
the generators set
Poly should use free_symbols. Also, there's the question as to whether the
following should return True
In [2]: x in Integral(x, (x, 0, 1))
Out[2]: True
In [3]: Integral(x, (x, 0, 1)).has(x)
Out[3]: True
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.