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

Now it can:

In [1]: f = 161*z**3 + 115*z**2 + 19*z + 1

In [2]: g = Lambda(z, z*log(-3381*z**4/4 - 3381*z**3/4 - 625*z**2/2 - 125*z/2 - 5 + exp(x)))

In [3]: RootSum(f, g)
Out[3]:
⎛ ⎛ ⎛ 2 3 4 ⎞⎞⎞ ⎜ 3 2 ⎜ ⎜ 125⋅z 625⋅z 3381⋅z 3381⋅z x⎟⎟⎟ RootSum⎜161⋅z + 115⋅z + 19⋅z + 1, Λ⎜z, z⋅log⎜-5 - ───── - ────── - ─────── - ─────── + ℯ ⎟⎟⎟ ⎝ ⎝ ⎝ 2 2 4 4 ⎠⎠⎠

In [4]: _.diff(x)
Out[4]:
 ⎛       x      2⋅x⎞  x
-⎝4 - 6⋅ℯ  + 5⋅ℯ   ⎠⋅ℯ
───────────────────────
    ⎛     2⋅x    3⋅x⎞
  7⋅⎝1 - ℯ    + ℯ   ⎠

(the same result is produced by Mathematica).

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

Reply via email to