3.1.4 David Griffiths, page 47

problem number 146

Taken from Introduction to Quantum mechanics, second edition, by David Griffiths, page 47. This is the same as the above problem but has an extra \(V(x) f(x,t)\) terms where \(V(x)\) is the infinite square well potential defined by \(V(x)=0\) if \(0\leq x \leq a\) and \(V(x)=\infty \) otherwise.

Solve for \(f(x,t)\) \[ I \hslash f_t = - \frac {\hslash ^2}{2 m} f_{xx} + V(x) f(x,t) \] With initial conditions \(f(x,0) = A x (a-x)\) for \(0\leq x \leq a\) and zero otherwise.

Mathematica

ClearAll["Global`*"]; 
ic  = f[x, y, 0] == Sqrt[2]*(Sin[2*Pi*x]*Sin[Pi*y] + Sin[Pi*x]*Sin[3*Pi*y]); 
bc  = {f[0, y, t] == 0, f[1, y, t] == 0, f[x, 1, t] == 0, f[x, 0, t] == 0}; 
pde =  I*h*D[f[x, y, t], t] == -((h^2*(D[f[x, y, t], {x, 2}] + D[f[x, y, t], {y, 2}]))/(2*m)); 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, f[x, y, t], {x, y, t}], 60*10]];
 

\[\left \{\left \{f(x,y,t)\to \sqrt {2} e^{-\frac {5 i \pi ^2 h t}{m}} \left (\sin (\pi x) \sin (3 \pi y)+\sin (2 \pi x) \sin (\pi y) e^{\frac {5 i \pi ^2 h t}{2 m}}\right )\right \}\right \}\]

Maple

restart; 
V:=x->piecewise(0<=x and x<=a,0,infinity); 
ic:=f(x,0)=piecewise(0<=x and x<=a,A*x*(a-x),0); 
pde :=I*h*diff(f(x,t),t)=-h^2/(2*m)*diff(f(x,t),x$2) +V(x)*f(x,t); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],f(x,t)) assuming a>0),output='realtime'));
 

Failed to convert to latex

____________________________________________________________________________________