3.1.1 Logan textbook, page 30

problem number 143

From page 30, David J Logan textbook, applied PDE textbook.

Schrodinger PDE with zero potential (Logan p. 30)

Solve Ift=22mfxx With boundary conditions f(0,t)=0f(L,0)=0

Mathematica

ClearAll["Global`*"]; 
pde =  I*h*D[f[x, t], t] == -((h^2*D[f[x, t], {x, 2}])/(2*m)); 
bc  = {f[0, t] == 0, f[L, t] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, f[x, t], {x, t}, Assumptions -> L > 0], 60*10]]; 
sol =  sol /. K[1] -> n;
 

{{f(x,t)n=1eihn2π2t2L2mcnsin(nπxL)}}

Maple

restart; 
interface(showassumed=0); 
pde :=I*h*diff(f(x,t),t)=-h^2/(2*m)*diff(f(x,t),x$2); 
bc:=f(0,t)=0,f(L,t)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],f(x,t)) assuming L>0),output='realtime'));
 

f(x,t)=n=1_F1(n)eiπ2hn2t2L2msin(πnxL)

____________________________________________________________________________________