# Computing the Caputo fractional derivative of a polynomial

In fractional calculus, the Caputo derivative of a monomial has the following form:

$$\operatorname{\mathit D}_t^\alpha\,t^\beta = \frac{\Gamma(\beta+1)}{\Gamma(\beta-\alpha+1)}t^{\beta-\alpha}$$

I wish to compute the Caputo derivative of $x(1+t^2)$ with respect to $t$.

I tried the following code:

 β = 2;
u[x_, t_] = x*(t^0 +t^β);
u[x, t] /. {x -> x, t^0 -> t^α/Gamma[1 - α],
t^β ->
Gamma[β + 1]/
Gamma[β - α + 1] t^(β - α)}


and obtain the following output:

But I think this code is not correct. Any suggestion?

• What do you mean by "not interesting"? What would make it more interesting to you? You may want to make your request more specific for people to help you. – MarcoB Feb 17 '16 at 13:46

Here is a somewhat general implementation of the Caputo fractional derivative with arbitrary lower limit (set to $0$ by default):

caputo[f_, {x_, α_, a_: 0}, opts___] /; Positive[α] && ! IntegerQ[α] :=
Module[{n = Ceiling[α], t},
(Convolve[UnitStep[x - a] D[f, {x, n}], x^(n - α - 1), x, t, opts] /.
t -> x)/Gamma[n - α]]


(A fully general routine will include the special case of integer $\alpha$, of course; that is left as an exercise for the reader.)

This should now work for any arbitrary function; e.g.

caputo[x^6, {x, 4/3}]
(2187 x^(14/3))/(154 Gamma[2/3])

caputo[Sin[x], {x, 1/2}] // FullSimplify
(Cos[x] (-I + 2 FresnelC[Sqrt[2/Pi] Sqrt[x]]) +
(I + 2 FresnelS[Sqrt[2/Pi] Sqrt[x]]) Sin[x])/Sqrt

• Many thanks, but I can not obtain answer for x(1+t^2). Please help me for this function. – user37694 Feb 17 '16 at 15:01
• Well, are you differintegrating with respect to $x$, or with respect to $t$? – J. M. is in limbo Feb 17 '16 at 15:04
• ...and $x$ is independent of $t$, no? – J. M. is in limbo Feb 17 '16 at 15:12
• Then yes, it is independent. My caputo[] routine should work here, and the result in your post is correct, I believe. What exactly do you believe to be wrong? – J. M. is in limbo Feb 17 '16 at 15:27
• I presume you're aware of $\Gamma(k+1)=k\Gamma(k)$, yes? – J. M. is in limbo Feb 17 '16 at 15:37