2.3.1 Logan textbook, page 30

problem number 83

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

Schrodinger PDE with zero potential (Logan p. 30)

Solve \[ I \hbar f_t = - \frac {\hbar ^2}{2 m} f_{xx} \] With boundary conditions \begin {align*} f(0,t) &= 0\\ f(L,0) &=0 \end {align*}

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;
 

\[\left \{\left \{f(x,t)\to \underset {n=1}{\overset {\infty }{\sum }}e^{-\frac {i h n^2 \pi ^2 t}{2 L^2 m}} c_n \sin \left (\frac {n \pi x}{L}\right )\right \}\right \}\]

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 \left ( x,t \right ) =\sum _{n=1}^{\infty }{\it \_C1} \left ( n \right ) \sin \left ( {\frac {n\pi \,x}{L}} \right ) {{\rm e}^{{\frac {-{\frac {i}{2}}h{\pi }^{2}{n}^{2}t}{m{L}^{2}}}}}\]

____________________________________________________________________________________