The diff command counts faster than ∂/∂x
|
12-06-2023, 04:24 PM
(This post was last modified: 12-06-2023 04:25 PM by Albert Chan.)
Post: #2
|
|||
|
|||
RE: The diff command counts faster than ∂/∂x
Differentiation, unlike integration, is very mechanical, and should run very fast.
Problem is internal hard-coded simplify, that cannot be controlled by SIMPLIFY setting. My guess is diff(f,x) is less "simplified" than ∂(f,x), thus run much faster. OP problem, we want to stop sum from simplify f with common denominator, making a mess. Instead of summing an expression, we sum a list, which bypass internal simpilfy code. (*) Cas> lst := makelist(k -> (-1)^(k+1)/k^x, 1, 20) Cas> f := sum(lst) diff(f,x) or ∂(f,x) should now run very fast. (*) sum(lst) = '+' operator applied to list, see https://www.hpmuseum.org/forum/thread-20...#pid176469 Cas> (a+b)[1] (lst) 1 - 1/2^x + 1/3^x - 1/4^x + 1/5^x ... + 1/19^x - 1/20^x |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
The diff command counts faster than ∂/∂x - hp-zl - 12-06-2023, 06:55 AM
RE: The diff command counts faster than ∂/∂x - Albert Chan - 12-06-2023 04:24 PM
|
User(s) browsing this thread: