Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this for fractional derivatives at a point? #4

Closed
shaunster0 opened this issue Jan 8, 2020 · 10 comments
Closed

How to use this for fractional derivatives at a point? #4

shaunster0 opened this issue Jan 8, 2020 · 10 comments

Comments

@shaunster0
Copy link

shaunster0 commented Jan 8, 2020

hi, i’d just like an example of how to use this to get fractional derivatives. I want to get fractional derivatives of a Gaussian. Seems like the RL function doesn’t return this (at least the numbers it returns do not seem to be the fractional derivative at a point, maybe they’re the integral of it or something)

So how would I do this?

@uniformlyMatt
Copy link
Contributor

The RL function is for calculating the RL derivative at every point on a function's domain. You pass in an array of function values and get an array of fractional derivatives back.

The 'RLpoint' function is for calculating the RL derivative at a specific point. You can pass in the point as the 'domain_end' parameter.

Please let me know how this goes!

@shaunster0
Copy link
Author

shaunster0 commented Jan 8, 2020 via email

@uniformlyMatt
Copy link
Contributor

It looks like you've found an oversight in the code. I'll have to revisit this after I review Diethelm et al, since it's been a long time since I wrote this.

@shaunster0
Copy link
Author

shaunster0 commented Jan 11, 2020 via email

@cooperhatfield
Copy link
Collaborator

I've compared the result given by your code snippet with the expected result given by
image
Note, this is the theoretical result when the left endpoint is 0. For exponential functions, generally a left endpoint of negative infinity is used. But in any case, this is a comparison of the results:
image
In the case where the left endpoint decreases to -100, the result becomes
image
Which is likely closer to what you're expecting.

@shaunster0
Copy link
Author

thanks Cooper!

@shaunster0
Copy link
Author

it’d be good if a couple examples of this usage could be given on the project main page, this would be confusing to a new user … ie. setting the endpoint correctly on some common function

@cooperhatfield
Copy link
Collaborator

cooperhatfield commented Nov 19, 2022

Hi shaunster0,
A github wiki page has been made for this repo here please let me know if that is helpful, or what you think could be improved!

And just a note WRT the wiki, the Caputo methods are only available on a fork currently, not on the main package.

@cooperhatfield
Copy link
Collaborator

Tomorrow I will update the readme with more examples though, you're right.

@shaunster0
Copy link
Author

thanks, appreciate what ure doing here, this project needed a makeover … it was amazing to me that there was no good quality python library for fractional derivatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants