derivative extension #3510
Replies: 1 comment
-
|
Thanks for your thoughts and interest! As a general-purpose math package, mathjs is definitely open to any of the following contributions:
I don't think there would be much value to making the rules for symbolic differentiation specifiable in the call to derivative, as they aren't something subject to change: the derivative of sin is always cos, etc. We might accept a contribution of code for fractional derivatives, but as there are quite a few different concepts of fractional derivatives, the documentation would have to be very clear and the implementation high-quality. We might accept a contribution of code for "automatic differentiation" and/or computation with "dual numbers" if it were well-integrated with mathjs and added value beyond the current symbolic differentiation. I am not aware of any current regular maintainer/developer of mathjs that has the bandwidth to take on any of these projects, so at the moment, any of them would have to be a community contribution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I was searching in the documentation how I could implement some way to do the derivative of the gamma function.
Well, to my surprise there's currently no way to implement the rules, it's even worse when I realized that the digamma function doesn't even exist. Implementing an approximation wasn't difficult but I still can't do the derivative sadly (now that I think about it, we don't have the lambert W too).
I've seen things about dual numbers to evaluate a derivative (and it's incredibly fast to evaluate, I was shocked when I test it out) but this means that we won't get a derivative but evaluating it at some point. Worst of all, we can't do the 2nd derivative using this method sadly (except if we extends the dual numbers themselves but it's going to be more expensive in computation).
Now I'm left to wonder: wouldn't it be good to be able to add more rules for derivatives as a user?
We could even go a little further and do the fractional derivative but I'm not sure how this would play of nor if it can be implemented the same was as the usual derivative rules.
What are your thoughts about it?
Beta Was this translation helpful? Give feedback.
All reactions