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

____________________________________________________________________________________