Calculate Exact Eigenfunctions for the Laplacian in a Rectangle
Specify a 2D Laplacian operator with homogeneous Dirichlet boundary conditions.
In[1]:=
![Click for copyable input](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/In_115.png)
{\[ScriptCapitalL], \[ScriptCapitalB]} = {-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]};
Find the four smallest eigenvalues and eigenfunctions in a rectangle.
In[2]:=
![Click for copyable input](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/In_116.png)
{vals, funs} =
DEigensystem[{\[ScriptCapitalL], \[ScriptCapitalB]},
u[x, y], {x, 0, \[Pi]}, {y, 0, \[Pi]}, 4];
The eigenfunctions are trigonometric.
In[3]:=
![Click for copyable input](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/In_117.png)
funs
Out[3]=
![](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/O_57.png)
Visualize the eigenfunctions.
In[4]:=
![Click for copyable input](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/In_118.png)
Plot3D[#, {x, 0, \[Pi]}, {y, 0, \[Pi]}] & /@ funs
Out[4]=
![](assets.en/calculate-exact-eigenfunctions-for-the-laplacian-i/O_58.png)