2.3.5 David Griffiths, page 47

problem number 87

Taken from Introduction to Quantum mechanics, second edition, by David Griffiths, page 47.

Solve for \(f(x,t)\)

\[ I \hbar f_t = - \frac {\hbar ^2}{2 m} f_{xx} \]

With initial conditions \(f(x,0) = A x (a-x)\) for \(0\leq x \leq a\) and zero otherwise.

Mathematica

ClearAll["Global`*"]; 
ic  = Piecewise[{{A*x*(a - x), 0 <= x <= a}, {0, True}}]; 
pde =  I*h*D[f[x, t], t] == -((h^2*D[f[x, t], {x, 2}])/(2*m)); 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, f[x, 0] == ic}, f[x, t], {x, t}, Assumptions -> a > 0], 60*10]];
 
\[\left \{\left \{f(x,t)\to \frac {\int _{-\infty }^{\infty }-\frac {A \exp \left (-\frac {i K[1] (2 a m-2 x m+h t K[1])}{2 m}\right ) \left (a K[1]+e^{i a K[1]} (a K[1]+2 i)-2 i\right )}{K[1]^3}dK[1]}{2 \pi }\right \}\right \}\]

Maple

restart; 
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); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',dsolve([pde,ic],f(x,t)) assuming a>0),output='realtime')); 
sol:=convert(sol,Int);
 
\[f \left (x , t\right ) = -\frac {\left (\int _{-\infty }^{\infty }\frac {{\mathrm e}^{-\frac {i s \left (\left (a -x \right ) m +\frac {h s t}{2}\right )}{m}}}{s^{2}}d s a +\int _{-\infty }^{\infty }\frac {{\mathrm e}^{-\frac {i s \left (h s t -2 x m \right )}{2 m}}}{s^{2}}d s a -2 i \int _{-\infty }^{\infty }\frac {{\mathrm e}^{-\frac {i s \left (\left (a -x \right ) m +\frac {h s t}{2}\right )}{m}}}{s^{3}}d s +2 i \int _{-\infty }^{\infty }\frac {{\mathrm e}^{-\frac {i s \left (h s t -2 x m \right )}{2 m}}}{s^{3}}d s \right ) A}{2 \pi }\]

___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________