2.3.3 From Mathematica help pages

problem number 85

Taken from Mathematica DSolve help pages

Initial value problem with Dirichlet boundary conditions. 1D, zero potential.

Solve for \(f(x,t)\) \[ I f_t = - 2 f_{xx} \] With boundary conditions \begin {align*} f(5,t) &= 0\\ f(10,t) &=0 \\ \end {align*}

And initial conditions \(f(x,2)=f(x)\) where \(f(x)=-350 + 155 x - 22 x^2 + x^3\)

Mathematica

ClearAll["Global`*"]; 
pde =  I*D[f[x, t], t] == -2*D[f[x, t], {x, 2}]; 
 g[x_] := -350 + 155*x - 22*x^2 + x^3; 
ic  = f[x, 2] == g[x]; 
bc  = {f[5, t] == 0, f[10, t] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, f[x, t], {x, t}], 60*10]]; 
sol =  sol /. K[1] -> n;
 

\[ \text {Unable to process latex} \]

Maple

restart; 
pde :=I*diff(f(x,t),t)=-2*diff(f(x,t),x$2); 
bc:=f(5,t)=0,f(10,t)=0; 
g:=x->-350+155*x-22*x^2+x^3; 
ic:=f(x,2)=g(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc,ic],f(x,t))),output='realtime'));
 

\[ \text {Unable to process latex} \]

____________________________________________________________________________________