Wolfram Language

Differential Eigensystems

Compute Eigenfunctions in an L-shaped Region

Specify an L-shaped region.

In[1]:=
Click for copyable input
L = Polygon[{{1, 0}, {2, 0}, {2, 2}, {0, 2}, {0, 1}, {1, 1}}];

Specify a Laplacian operator.

In[2]:=
Click for copyable input
\[ScriptCapitalL] = Laplacian[u[x, y], {x, y}];

Specify a Dirichlet boundary condition.

In[3]:=
Click for copyable input
\[ScriptCapitalB] = DirichletCondition[u[x, y] == 0., True];

Compute the eigenfunctions in the L-shaped region.

In[4]:=
Click for copyable input
{vals, funs} = NDEigensystem[{\[ScriptCapitalL], \[ScriptCapitalB]}, u[x, y], {x, y} \[Element] L, 6];

Inspect the eigenvalues.

In[5]:=
Click for copyable input
vals
Out[5]=

Visualize the eigenfunctions.

In[6]:=
Click for copyable input
Plot3D[#, {x, y} \[Element] L, PlotPoints -> 75, Mesh -> None, PlotStyle -> Directive[Orange, Specularity[White, 30]], BoxRatios -> {1, 1, 0.8}] & /@ funs
Out[6]=

Related Examples

de es fr ja pt-br ru zh