3
$\begingroup$

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:

enter image description here

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

$\endgroup$
1
  • 1
    $\begingroup$ 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. $\endgroup$
    – MarcoB
    Feb 17, 2016 at 13:46

1 Answer 1

7
$\begingroup$

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[2]
$\endgroup$
13
  • $\begingroup$ Many thanks, but I can not obtain answer for x(1+t^2). Please help me for this function. $\endgroup$
    – user37694
    Feb 17, 2016 at 15:01
  • $\begingroup$ Well, are you differintegrating with respect to $x$, or with respect to $t$? $\endgroup$ Feb 17, 2016 at 15:04
  • $\begingroup$ ...and $x$ is independent of $t$, no? $\endgroup$ Feb 17, 2016 at 15:12
  • 1
    $\begingroup$ 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? $\endgroup$ Feb 17, 2016 at 15:27
  • 2
    $\begingroup$ I presume you're aware of $\Gamma(k+1)=k\Gamma(k)$, yes? $\endgroup$ Feb 17, 2016 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.