5
$\begingroup$

I'm trying to solve this fractional PDE

a=1/2;
sol = NDSolveValue[{CaputoD[y[t,x], {t, a}] == D[y[t,x],{x,2}], y[0,x] ==Sin[Pi x], {y[t,0]==0,y[t,1]==0}},
y, {t,0,0.2},{x,0,1}]

It works for the usual case $a=1$, but for $a=1/2$ e.g, it returns many errors:

NDSolveValue, Some of the functions have zero differential order, so the equations will be solved as a system of differential-algebraic equations

NDSolveValue, an insufficient number of boundary conditions have been specified for the direction of independent variable

NDSolveValue, has computed initial values that give a zero residual for the differential-algebraic system, but some components are different from those specified. If you need them to be satisfied, giving initial conditions for all dependent variables and their derivatives is recommended

NDSolveValue, Repeated convergence test failure at t==0

Maybe such syntax is not allowed by MMA, if this is the case, I'm looking for an idea to handle it.

$\endgroup$

1 Answer 1

8
$\begingroup$

It's simply because NDSolve cannot handle fractional differential equation at the moment. (Fractional derivative isn't even supported by Mathematica until v13.1! ) But luckily, as mentioned in Summary of New Features in 13.1 , DSolve can now solve Caputo fractional differential equations:

a = 1/2;
DSolve[{CaputoD[y[t, x], {t, a}] == D[y[t, x], {x, 2}], 
  y[0, x] == Sin[Pi x], {y[t, 0] == 0, y[t, 1] == 0}}, y, {t, x}]
(* {{y -> Function[{t, x}, E^(π^4 t) Erfc[π^2 Sqrt[t]] Sin[π x]]}} *)

Alternatively, we can solve it with LaplaceTransform:

a = 1/2;

{eq, ic, bc} = {CaputoD[y[t, x], {t, a}] == D[y[t, x], {x, 2}], 
   y[0, x] == Sin[Pi x], {y[t, 0] == 0, y[t, 1] == 0}};

tset = 
 LaplaceTransform[{eq, bc}, t, s] /. Rule @@ ic /. 
   HoldPattern@LaplaceTransform[a_, __] :> a /. y -> (Y[#2] &)
(* {-(Sin[π x]/Sqrt[s]) + Sqrt[s] Y[x] == Y''[x], {Y[0] == 0, Y[1] == 0}} *)

tsol = DSolveValue[tset, Y[x], x]
(* Sin[π x]/((π^2 + Sqrt[s]) Sqrt[s]) *)

sol = InverseLaplaceTransform[tsol, s, t]
(* E^(π^4 t) Erfc[π^2 Sqrt[t]] Sin[π x] *)
$\endgroup$
1
  • $\begingroup$ Ah I see, thanks! $\endgroup$
    – S. Euler
    Aug 5 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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