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 becomes​
​This simplifies to:​​
​​Now, we transform the initial and boundary conditions:​
​So,​
​​For the boundary condition at
:​
​​Since
is always non-zero, this implies​
​​For the boundary condition at $
$:​​​
​​This implies​​
​​Therefore, 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
+4
2
ω
In[]:=
FullSimplify[F[ω],a>0]
Out[]=
4
2
π
ω
2
a
+4
2
ω
In[]:=
v[ω_,t_]=
4
2
π
ω
2
a
+4
2
ω
Out[]=
4
2
π
ω
2
a
+4
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

In[]:=
eik1=Plot3D[u[x,t,1],{x,0,10.1},{t,0,0.5},PlotRangeAll,ColorFunction"BrightBands"]​​eik2=Plot3D[u[x,t,3],{x,0,10.1},{t,0,1},PlotRangeAll,ColorFunction"BrightBands"]​​ eik3=Plot3D[u[x,t,5],{x,0,10.1},{t,0,4},PlotRangeAll,ColorFunction"BrightBands"]​​eik4=Plot3D[u[x,t,8],{x,0,11},{t,0,10},PlotRangeAll,ColorFunction"BrightBands"]
Out[]=
Out[]=
Out[]=