Fractional derivative

To get started with fractional derivatives, you need to know that unlike Newtonian derivatives, fractional derivative is defined via integral.

Non-Local Operators

It is noteworthy that the fractional derivatives are not local operators, which means that we cannot calculate the fractional derivative solely on the basis of function values of $f(x)$ taken from neighborhood of the point $x$. Instead, we have to take the entire history of $f(x)$ (i.e., all function values $f(x)$ for $0<x<a$) into account.

Riemann Liouville sense derivative

Riemann Liouville sense derivative is built upon the Riemann Liouville sense integral.

\[_aD^\alpha_tf(t)=\frac{d^n}{dt^n}\ _aD^{-(n-\alpha)}_tf(t)=\frac{d^n}{dt^n}\ _aI^{n-\alpha}_tf(t)\]

\[_tD^\alpha_bf(t)=\frac{d^n}{dt^n}\ _tD^{-(n-\alpha)}_bf(t)=\frac{d^n}{dt^n}\ _tI^{n-\alpha}_bf(t)\]

We can use FractionalCalculus.jl to compute Riemann Liouville sense $0.5$ order fractional derivative of $f(x)=x$ at $x=1$ with step size $0.0001$:

julia> fracdiff(x->x, 0.5, 1, 0.0001, RLDiffL1())

Caputo sense derivative

There are many types of definitions of fractional derivatives, Caputo is one of these useful definitions. The Caputo fractional derivative is first proposed in Michele Caputo's Paper,

\[^CD_t^\alpha f(t) = \frac{1}{\Gamma(n-\alpha)}\int_0^t\frac{f^{(n)}(\tau)d\tau}{(t-\tau)^{\alpha+1-n}}, n=\lceil{\alpha}\rceil\]

In FractionalCalculus.jl, let's see, if you want to calculate the $0.5$ order fractional derivative of $f(x)=x$ at a $x=1$ with step size $0.0001$, simply type these:

julia>fracdiff(x->x, 0.5, 1, 0.0001, CaputoTrap())

We can see the result is closely resembling with the result in Riemann Liouville sense.


The Riemann Liouville sense derivative and Caputo sense derivative have the following relationship:

\[_{RL}D^{\alpha}_{a, t}f(t)={_CD^\alpha_{a, t}f(t)}+\sum_{k=0}^{m-1}\frac{f^{(k)}(a)(t-a)^{k-a}}{\Gamma(k+1-\alpha)}\]

Here $m-1<\alpha<m$, $f^{(m)}$ is integrable on $[a, t]$.

Grünwald Letnikov sense derivative

\[D^\alpha f(t)=\displaystyle \lim_{h\rightarrow0}\frac{1}{h^\alpha}\sum_{0\leq m\lt\infty}(-1)^m {{\alpha}\choose{m}}f(t+(\alpha-m)h)\]

To compute the Grünwald Letnikov sense derivative, you can use FractionalCalculus.jl by:

julia> fracdiff(x->x, 0.5, collect(0:0.01:1), 2, GLHighPrecision())
101-element Vector{Float64}:

Here, we use the high-precision algorithm, the fourth parameter means we set the precision order as p=2. The returned result means the derivative on the interval $[0, 1]$.


If the function $f(t)$ is suitably smooth, then the Grünwald Letnikov sense derivative and the Riemann Liouville sense derivative are equivalent.

Riesz sense derivative

The Riesz sense symmetric fractional derivative is defined by Caputo derivative:

\[ \frac{d^\beta \phi(x)}{d|x|^\mu}=D_{R}^{\beta}\phi(x)=\frac{1}{2}\Bigl({_{a}D}_{x}^{\beta}\phi(x)+{_{x}D_{b}^{\beta}}\phi(x) \Bigr) \]

In FractionalCalculus.jl, we can use the RieszSymmetric algorithm to compute the fractional derivative:

julia> fracdiff(x->x, 0.5, 1, 0.01, RieszSymmetric())

Hadamard sense derivative

The Hadamard sense derivative is defined using Hadamard sense integral:

\[ {_HD_{a+}^{-\alpha}}f(x)=\frac{1}{\Gamma(\alpha)}\int_a^x(\log\frac{x}{t})^{-(1-\alpha)}f(t)\frac{dt}{t},\ x > a \]

So we can know the Hadamard sense fractional derivative:

\[ {_HD_{a+}^\alpha}f(x)=\delta^n[{_HD_{a+}^{-(n-\alpha)}f(x)}],\ x>a \]

\[ \delta=x\frac{d}{dx},\ n-1\leq\alpha<n\in\mathrm{Z^+} \]

To compute Hadamard fractional derivative, we can use the Hadamard relating algorithms in FractionalCalculus.jl:

julia> fracdiff(x->x, 0.5, 0, 1, 0.01, HadamardLRect())
Non-singular kernel

When we are using the "fractional derivative" with non-singular kernel, like Caputo-Fabrizio and Atangana-Baleanu-Caputo sense, we should know these operators are in fact integer order operators, for more details we recommend you to read the paper Why Fractional Derivatives with Nonsingular Kernels Should Not Be Used

Caputo-Fabrizio sense derivative

Caputo-Fabrizio sense fractional order derivative is defined by:

\[{^{CF}_0D^\alpha_t u(t)}=\frac{M(\alpha)}{1-\alpha}\int^t_0\frac{d}{d\tau}u(\tau)\exp[-\frac{\alpha}{1-\alpha}(t-\tau)]d\tau\\ M(\alpha)=1-\alpha+\alpha/\Gamma(\alpha)\]

To compute the Caputo-Fabrizio sense derivative, we can use the CaputoFabrizioAS algorithm in FractionalCalculus.jl:

julia> fracdiff(x->x, 0.5, 1, 0.01, CaputoFabrizioAS())

Atangana-Baleanu sense derivative

Atangana-Baleanu sense fractional order derivative is defined by:

\[{^{ABC}_0D^\alpha_t f(t)}=\frac{AB(\alpha)}{1-\alpha}\int^t_0\frac{d}{d\tau}f(\tau)E_\alpha[-\frac{\alpha}{1-\alpha}(t-\tau)^\alpha]d\tau\\ AB(\alpha)=1-\alpha+\alpha/\Gamma(\alpha)\]

To compute the Atangana-Baleanu sense derivative, we can use the AtanganaSeda algorithm in FractionalCalculus.jl:

julia> fracdiff(x->x, 0.5, 1, 0.01, AtanganaSeda())

Here we need to specify the start point and end point

There are different approximating methods being used in computing, choose the one you need😉