Fractional derivatives generalize the idea of taking a classic derivative to taking a derivative of order α where α can be non-integer.
In this post the demo uses the Riemann–Liouville definition with a lower limit at 0. For 0<α<1 (so n=1) one common form is
Dαf(t)=dtd(Γ(1−α)1∫0t(t−τ)−αf(τ)dτ)
and for 1<α<2 (so n=2) it becomes
Dαf(t)=dt2d2(Γ(2−α)1∫0t(t−τ)1−αf(τ)dτ).
The implementation is fully numeric: it evaluates the convolution-like integral on a uniform grid and then takes one or two finite-difference derivatives. (Near t=0 the kernel is singular, so the first couple of samples can be less accurate.)
Interactive
Use the Example dropdown to switch between two cases with known closed forms (to verify the numeric method): sin(t) and x2. The dashed line is the analytic reference.
Fractional Derivatives
Pick a function and move the slider to change alpha in [0,2]. The solid curve is a numerically integrated Riemann–Liouville fractional derivative; the dashed curve is the known analytic result for verification.