Animation

sol=NDSolve[{
I D[u[t,x],t]==-D[u[t,x],{x,2}]+3*Sin[x*Pi/3-Pi/2]*u[t,x],
u[0.,x]==Exp[-((x*3)^2.)],
u[t,-9.]==u[t,9.]
},u[t,x],{t,0.,2.},{x,-9.,9.},Method->{"MethodOfLines","SpatialDiscretization"->{"TensorProductGrid","DifferenceOrder"->"Pseudospectral"}},MaxSteps->100000];
s=(u[t,x]/.sol)[[1]];

Manipulate[Plot[{Abs[s/.t->T],ReIm[s/.t->T]+3*Sin[x*Pi/3-Pi/2],3*Sin[x*Pi/3-Pi/2]},{x,-9,9},PlotRange->{{-9,9},{-4,4}},PlotStyle->{ColorData[97][1],ColorData[97][4],Opacity[0.3,Black]}],{T,0,2}]

Monitor[
frames=Table[Plot[{Abs[s/.t->T],Abs[s/.t->T]+3*Sin[x*Pi/3-Pi/2],3*Sin[x*Pi/3-Pi/2]},{x,-9,9},PlotRange->{{-9,9},{-4,4}},FrameLabel->{Style["Ort",14],Style["Amplitude",14]}],{T,0,2,2/250}];
,N[T]]

Export[NotebookDirectory[]<>"3L_SchroedingerGauss.gif",frames]

Solution Graph

preFactor=NIntegrate[Abs[s/.t->0]^2,{x,-9,9}];
ergGraph=Plot[NIntegrate[Abs[s/.t->T]^2,{x,-3,3}]/preFactor*100,{T,0,1},PlotPoints->100,MaxRecursion->1,FrameLabel->{Style["Zeit t",16],Style["Zustandswahrscheinlichkeit P(t) [%]",15,FontTracking->"Extended"]},PlotRange->{{0,1},{50,105}}]

ergOutGraph=Show[ergGraph,Graphics[{Opacity[0.2,Blue],Rectangle[{0,50},{0.15,110}],Opacity[0.2,Green],Rectangle[{0.15,50},{0.25,110}],Opacity[0.2,Yellow],Rectangle[{0.25,50},{0.7,110}],Opacity[0.2,Black],Rectangle[{0.7,50},{1,110}],Opacity[1,Black],Inset[Style["{1}",{FontSize->20,FontColor->Black}],{0.15/2,57},{Center,Top}],Inset[Style["{2}",{FontSize->20,FontColor->Black}],{0.2,57},{Center,Top}],Inset[Style["{3}",{FontSize->20,FontColor->Black}],{(0.7-0.25)/2+0.25,57},{Center,Top}],Inset[Style["{4}",{FontSize->20,FontColor->Black}],{0.7+0.15,57},{Center,Top}]}]]

Export[NotebookDirectory[]<>"3LSolu.pdf",ergOutGraph]

Title Image

timg=Legended[Plot[Evaluate@{3*Sin[x*Pi/3-Pi/2],Abs[s/.t->0],ReIm[s/.t->0]+3*Sin[x*Pi/3-Pi/2]},{x,-9,9},PlotRange->{{-9,9},{-4,4}},PlotStyle->{Directive[{Gray}],Directive[{ColorData[97][2]}],Directive[{ColorData[97][1]}]},FrameTicks->{{Table[{i,If[Mod[i,1]==0,N[i,2],Null],{If[Mod[i,2]==0,0.01,0.005],0}},{i,-4,4,1/2}],Automatic},{{{0,Style["0",14]},{-3,Style["(SubMinus[p])",14]},{3,Style["(SubPlus[p])",14]}},Automatic}},GridLines->{{-3,0,3},{0}},ImageSize->Medium],LineLegend[{Directive[{Gray}],Directive[{ColorData[97][2]}],Directive[{ColorData[97][1]}]},{Style[ToString[V[x],TraditionalForm],14],Style["| "<>ToString[Ψ[t,x],TraditionalForm]<>" ((|)^2)",14],Style["| "<>ToString[Ψ[t,x],TraditionalForm]<>" ((|)^2) + "<>ToString[V[x],TraditionalForm],14]}]]

Export[NotebookDirectory[]<>"GedankenExpTitleImg.pdf",timg]