Taken from Mathematica DSolve help pages
Solve a Schrodinger equation with potential over the whole real line.
Solve for \(f(x,t)\)
With boundary conditions
Mathematica ✓
ClearAll["Global`*"]; pde = I*D[f[x, t], t] == -D[f[x, t], {x, 2}] + 2*x^2*f[x, t]; bc = {f[-Infinity, t] == 0, f[Infinity, t] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, f[x, t], {x, t}], 60*10]]; sol = sol /. K[1] -> n;
Maple ✗
restart; pde :=I*diff(f(x,t),t)=-diff(f(x,t),x$2)+2*x^2*f(x,t); bc:=f(-infinity ,t)=0,f(infinity,t)=0; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],f(x,t))),output='realtime'));
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________