In[]:=
Clear["Global`*"]
Define the initial condition
In[]:=
f[x_]=Exp[-x^2]
Out[]=
-
2
x
the corresponding solution to solve the linear Schrödinger equation
u
t
u
xx
u(x,0)f(x)
it is given by the function
u(x,t)f(y)dy,t>0
1
4
+infty
∫
-∞
-+
iπ
4
i
2
(x-y)
4vt
e
In[]:=
u[x_,t_,v_]=Integrate[(Exp[-(I*Pi)/(4)+I*(x-y)^2/(4*v*t)])*f[y],{y,-Infinity,Infinity},Assumptions{v>0,t>0}]/(Sqrt[4Pi*v*t])
Out[]=
(1-)
2
x
-1-4tv
2
4-
tv
tv
Greaphs for Re[u[x, t, 0.25]], Re[u[x, t, 0.5]]
Greaphs for Re[u[x, t, 0.25]], Re[u[x, t, 0.5]]
In[]:=
eik1=Plot3D[Re[u[x,t,0.25]],{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
In[]:=
eik2=Plot3D[Re[u[x,t,0.5]],{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
Greaphs for Im[u[x, t, 0.25]], Im[u[x, t, 0.5]]
Greaphs for Im[u[x, t, 0.25]], Im[u[x, t, 0.5]]
In[]:=
eik3=Plot3D[Im[u[x,t,0.25]],{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
In[]:=
eik4=Plot3D[Im[u[x,t,0.5]],{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
Greaphs for Abs[u[x, t, 0.25]]^2, Abs[u[x, t, 0.5]]^2
Greaphs for Abs[u[x, t, 0.25]]^2, Abs[u[x, t, 0.5]]^2
In[]:=
eik5=Plot3D[Abs[u[x,t,0.25]]^2,{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
2
1.77901×
-271
10
Out[]=
In[]:=
eik6=Plot3D[Abs[u[x,t,0.5]]^2,{x,-25,25},{t,0.05,30},PlotRangeAll,PlotPoints->250]
2
1.85986×
-269
10
Out[]=
In[]:=
Limit[u[x,t,0.25],tInfinity]
Out[]=
0.+0.
In[]:=
Plot[Evaluate[Table[Re[u[x,t,0.25]],{t,0.05,30,2}]],{x,-25,25},PlotRangeAll,AxesLabel{x,u},PlotStyleThick,ImageSize500]Plot[Evaluate[Table[Re[u[x,t,0.5]],{t,0.05,30,2}]],{x,-25,25},PlotRangeAll,AxesLabel{x,u},PlotStyleThick,ImageSize500]
For large values of ν, propagation is faster
Now we are going to solve the above problem numerically
Now we are going to solve the above problem numerically
(*Fouriertranformfortheequation(x,t)=i*v*(x,t)*)
u
t
u
xx
FourierSinTransform[D[u[x,t],{t,1}],x,ω]==FourierSinTransform[I*v*D[u[x,t],{x,2}],x,ω,FourierParameters{1,-1}]
Out[]=
FourierSinTransform[x,t],x,ωvω(-ωFourierSinTransform[u[x,t],x,ω]-2u[0,t])
(0,1)
u
We define the transformed equation
In[]:=
ode=D[ω,t],{t,1}I*v*ω*-ω*[ω,t]-2*T0;
u
u
Now we use the command DSolve
In[]:=
sol=DSolveode,[ω,t],t
u
Out[]=
[ω,t]-+
u
2T0
ω
-tv
2
ω
1
We need now to calculate the coefficient c1. We use the same initial condition f[x_]=Exp[-x^2] and we calculate the Fourier Sine Transform as follows
In[]:=
FourierSinTransform[u[x,0],x,ω]==FourierSinTransform[f[x],x,ω,FourierParameters{1,-1}]
Out[]=
FourierSinTransform[u[x,0],x,ω]-2DawsonF
ω
2
Thus the transformed I . C is
In[]:=
ic=[ω,0]==FourierSinTransform[f[x],x,ω,FourierParameters{1,-1}]
u
Out[]=
u
ω
2
In[]:=
sol=DSolve{ode,ic},[ω,t],t
u
Out[]=
[ω,t]-
u
2-T0+T0+ωDawsonF
-tv
2
ω
tv
2
ω
ω
2
ω
Now we define the solution as
In[]:=
u
2-T0+T0+ωDawsonF
-tv
2
ω
tv
2
ω
ω
2
ω
Out[]=
-
2-T0+T0+ωDawsonF
-tv
2
ω
tv
2
ω
ω
2
ω
And the solution of our initial problem is
In[]:=
u[x_,t_]=InverseFourierSinTransform[ω,t],ω,x,FourierParameters{1,-1},Assumptions{x>0}
u
Out[]=
InverseFourierSinTransform-,ω,x,FourierParameters{1,-1},Assumptions{x>0}
2-T0+T0+ωDawsonF
-tv
2
ω
tv
2
ω
ω
2
ω
In[]:=
T0=1;Plot[Abs[u[x,t]]^2,{x,0,20},PlotRangeAll]
2-1++(0.+ω)DawsonF(0.+ω)Sin[0.000408571ω]
-tv
2
(0.+ω)
tv
2
(0.+ω)
1
2
0.+ω
2-1++(0.+ω)DawsonF(0.+ω)Sin[0.000408571ω]
-tv
2
(0.+ω)
tv
2
(0.+ω)
1
2
0.+ω
2-1++(0.+ω)DawsonF(0.+ω)Sin[0.000408571ω]
-tv
2
(0.+ω)
tv
2
(0.+ω)
1
2
0.+ω
