Let the initial and boundary value problem for the diffusion heat equation Set and transform the above problem into an equivalent new one with respect to the function First, calculate the derivatives:, Substitute these back into the PDE:which becomesThis simplifies to:Now, we transform the initial and boundary conditions:So,For the boundary condition at :Since is always non-zero, this impliesFor the boundary condition at $$:This impliesTherefore, the transformed problem is:This is the heat equation in () with the transformed initial and boundary conditions.
Clear["Global`*"]
Define the initial condition
In[]:=
f[x_]:=Exp[-a*x/2];
Now we use the FourierTransform to solve our problem
In[]:=
F[ω_]=FourierSinTransform[f[x],x,ω]
Out[]=
4ω
2
π
2
a
2
ω
In[]:=
FullSimplify[F[ω],a>0]
Out[]=
4ω
2
π
2
a
2
ω
In[]:=
v[ω_,t_]=+4
4ω
2
π
2
a
2
ω
Out[]=
4ω
2
π
2
a
2
ω
Inverse Fourier transform
In[]:=
u[x_,t_]=InverseFourierSinTransform[v[ω,t],ω,x]
Out[]=
-
x
2
1
2
a
In[]:=
u[x_,t_,a_]=
-
x
2
1
2
a
Out[]=
-
x
2
1
2
a
Plot-3D of the solution u (x, t) for = 0.5, 1, 4, 10
Plot-3D of the solution u (x, t) for = 0.5, 1, 4, 10
In[]:=
eik1=Plot3D[u[x,t,1],{x,0,10.1},{t,0,0.5},PlotRangeAll,ColorFunction"BrightBands"]eik2=Plot3D[u[x,t,3],{x,0,10.1},{t,0,1},PlotRangeAll,ColorFunction"BrightBands"] eik3=Plot3D[u[x,t,5],{x,0,10.1},{t,0,4},PlotRangeAll,ColorFunction"BrightBands"]eik4=Plot3D[u[x,t,8],{x,0,11},{t,0,10},PlotRangeAll,ColorFunction"BrightBands"]
Out[]=
Out[]=
Out[]=