Is there any package for fractional derivatives?
I don’t think so. I more or less use fractional derivatives in my research. There are some related things in Julia.
Can you give more details on what you are looking for ?
Depending on your needs you can use ApproxFun: ApproxFunExamples/Fractional Integral Equations.ipynb at master · JuliaApproximation/ApproxFunExamples · GitHub
I have a data vector and I try to make the derivative of this data (I want to use it on a fractional controller.), I was developing a code using the Caputo derivative and power series but I decided to look for some package that already does that.
Few weeks ago I programmed the Grunwald-Letnikov fractional derivative for the analytic continuation of the Riemann zeta function. While there is a complex fractional differentiation recurrence relation I discovered which is generally applicable to any analytic function, the actual evaluations of this GL fractional derivative rather specific to the Hurwitz zeta function and requires the use of non-central Stirling numbers and MacLaurin summation… which is a specific formulation and is not universal.
I don’t know of a Julia package for this. Maybe this: GitHub - JuliaControl/ControlSystems.jl: A Control Systems Toolbox for Julia could be useful.
Here’s how to do it in ApproxFun, assuming the data is smooth:
S = Legendre()
n = 50; # number of data points
p = range(-1,stop=1,length=n); # a non-default grid
v = exp.(p); # values at the non-default grid
m = 20 # number of basis functions
V = Array{Float64}(undef,n,m); # Create a Vandermonde matrix by evaluating the basis at the grid
for k = 1:size(V,2)
V[:,k] = Fun(S,[zeros(k-1);1]).(p)
end
f = Fun(S,V\v); # least squares fit to data
f_rl = LeftDerivative(0.5)*f # RL left half-derivative
f_cap = LeftIntegral(0.5)*Fun(f', S) # Caputo left half-derivative
using Plots
plot(f_rl;ylims=(0,3),legend=:bottomright,label="RL")
plot!(f_cap; label="Caputo")
Thank you very much, it will be very useful.
Hi!
Recently, a Julia package for fractional calculus was released: FdeSolver.jl
The package provides an FDE solver, which implements the Caputo derivative and the Predictor-Corrector method for the numerical solution of systems or single equations. Originally, it was aiming at applications in the study of biological systems where memory plays a role.
At the moment, my supervisor and I are the main contributors of this young package. Since we are planning to improve the current solver and expand to other numerical methods, we happily seek for new collaborations, feedback and ideas, either by getting in touch or simply by pull request.
@Giulio_Benedetti This package is pretty awesome!
I also made a package mainly focus on fractional derivative and integral: https://github.com/ErikQQY/FractionalCalculus.jl
Advice and suggestions are welcomed!
Wow this thing blows my mind!
Half a differentiation. Quarter of an Integral. I found a gentle introduction to fractional calculus
Thanks for bring this to my attention.