Comment #11 on issue 2132 by asmeurer: Derivative of RootSum
http://code.google.com/p/sympy/issues/detail?id=2132

I just noticed, don't you have x and z backwards in that example (c.f. the output from integrate in [29] in my OP)? It should be RootSum(z**5 - z**2 + 1, Lambda(z, z*log(x - z))). If I use that, I get:

In [52]: a = RootSum(z**5 - z**2 + 1, Lambda(z, z*log(x - z)))

In [53]: a.diff(x)
Out[53]:
  34
- ──
  21

In [54]: a.diff(z)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython console> in <module>()

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py in diff(self, *symbols, **assumptions)
    834         x = sympify(x)
    835         c,e = self.as_leading_term(x).as_coeff_exponent(x)
--> 836         c = powsimp(c, deep=True, combine='exp')
    837         if not c.has(x):
    838             return c,e

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.py in __new__(cls, expr, *symbols, **assumptions)
    583             if not expr.has(s):
    584                 return S.Zero
--> 585             obj = expr._eval_derivative(s)
    586             if obj is None:
    587                 unevaluated_symbols.append(s)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/rootoftools.py in _eval_derivative(self, x)
    482         if hints.get('roots', True):
    483             return Add(*map(self.func, self.roots))
    484         else:
    485             return self
    486

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/rootoftools.py in new(cls, poly, func)
    482         if hints.get('roots', True):
    483             return Add(*map(self.func, self.roots))
    484         else:
    485             return self
    486

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/rootoftools.py in _rational_case(cls, poly, func)
    482         if hints.get('roots', True):
    483             return Add(*map(self.func, self.roots))
    484         else:
    485             return self
    486

ValueError: need more than 0 values to unpack


--
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.

Reply via email to