Wolfram Language

Differential Eigensystems

Compute the Exact Eigenmodes of the Heat Equation

Specify a heat equation with homogeneous Dirichlet boundary conditions.

In[1]:=
Click for copyable input
{\[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]:=
Click for copyable input
{vals, funs} = DEigensystem[{\[ScriptCapitalL], \[ScriptCapitalB]}, u[t, x], t, {x, 0, \[Pi]}, 4]
Out[2]=

Visualize the eigenfunctions.

In[3]:=
Click for copyable input
Table[Plot3D[funs[[i]] // Evaluate, {x, -3, 3}, {t, 0, 1/3}, PlotRange -> All, Ticks -> False, Mesh -> False], {i, 4}]
Out[3]=

Related Examples

de es fr ja ko pt-br ru zh