Compute the Exact Eigenmodes of the Heat Equation
Specify a heat equation with homogeneous Dirichlet boundary conditions.
In[1]:=
{\[ScriptCapitalL], \[ScriptCapitalB]} = {D[u[t, x], t] ==
Laplacian[u[t, x], {x}], DirichletCondition[u[t, x] == 0, True]};
Find the four smallest eigenvalues and eigenfunctions.
In[2]:=
{vals, funs} =
DEigensystem[{\[ScriptCapitalL], \[ScriptCapitalB]}, u[t, x],
t, {x, 0, \[Pi]}, 4]
Out[2]=
Visualize the eigenfunctions.
In[3]:=
Table[Plot3D[funs[[i]] // Evaluate, {x, -3, 3}, {t, 0, 1/3},
PlotRange -> All, Ticks -> False, Mesh -> False], {i, 4}]
Out[3]=