Comment #16 on issue 2132 by asmeurer: Derivative of RootSum
http://code.google.com/p/sympy/issues/detail?id=2132
I was playing around to see if this would really fix the issues I am having
with risch_integrate(), and I got this:
In [30]: a = S(" -(1/7 - 2*I*3**(1/2)/21)*log(55/14 - 125*I*3**(1/2)/21 -
625*(1/7 - 2*I*3**(1/2)/21)**2/2 + 3381*(1/7 - 2*I*3**(1/2)/21)**3/4 -
3381*(1/7 - 2*I*3**(1/2)/21)**4/4 + exp(x)) - (1/7 +
2*I*3**(1/2)/21)*log(55/14 + 125*I*3**(1/2)/21 - 625*(1/7 +
2*I*3**(1/2)/21)**2/2 + 3381*(1/7 + 2*I*3**(1/2)/21)**3/4 - 3381*(1/7 +
2*I*3**(1/2)/21)**4/4 + exp(x)) + RootSum(161*_z**3 + 115*_z**2 + 19*_z +
1, Lambda(_i, _i*log(-5 - 125*_i/2 - 625*_i**2/2 - 3381*_i**3/4 -
3381*_i**4/4 + exp(x))))")
In [31]: print a.diff(x)
RootSum(161*_z**3 + 115*_z**2 + 19*_z + 1, Lambda(__i, -__i*exp(x)/(5 +
125*__i/2 + 625*__i**2/2 + 3381*__i**3/4 + 3381*__i**4/4 - exp(x)))) - (1/7
+ 2*I*3**(1/2)/21)*exp(x)/(55/14 + 125*I*3**(1/2)/21 - 625*(1/7 +
2*I*3**(1/2)/21)**2/2 + 3381*(1/7 + 2*I*3**(1/2)/21)**3/4 - 3381*(1/7 +
2*I*3**(1/2)/21)**4/4 + exp(x)) - (1/7 - 2*I*3**(1/2)/21)*exp(x)/(55/14 -
125*I*3**(1/2)/21 - 625*(1/7 - 2*I*3**(1/2)/21)**2/2 + 3381*(1/7 -
2*I*3**(1/2)/21)**3/4 - 3381*(1/7 - 2*I*3**(1/2)/21)**4/4 + exp(x))
In [32]: print cancel(a.diff(x))
---------------------------------------------------------------------------
PolynomialError Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython console> in
<module>()
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.py in
cancel(f, *gens, **args)
4843 else:
4844 result = result.add(Poly(term, expand=False))
4845
4846 return result.reorder(**args)
4847
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.py in
parallel_poly_from_expr(exprs, *gens, **args)
3236 =======
3237
-> 3238 >>> from sympy import LC
3239 >>> from sympy.abc import x, y
3240
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.py in
_parallel_poly_from_expr(exprs, opt)
3287 >>> from sympy.abc import x, y
3288
-> 3289 >>> LT(4*x**2 + 2*x*y**2 + x*y + 3*y)
3290 4*x**2
3291
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polyutils.py in
_parallel_dict_from_expr(exprs, opt)
262 def _dict_from_basic_if_gens(expr, opt):
263 """Transform an expression into a multinomial form given
generators. """
--> 264 (poly,), gens = _parallel_dict_from_basic_if_gens((expr,), opt)
265 return poly, gens
266
PolynomialError: non-commutative expressions are not supported
First off, there are no non-commutative expressions there. Second, the
RootSum in the diff should have auto-simplified. If my code is correct,
the answer in 32 should be 1/(exp(5*x) + exp(x) + 1).
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@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.