I want to calculate the solution to the Laplacian eigenvalue problem on the unit square with trivial Dirichlet boundary conditions: $$- \Delta u(x,y) = \lambda u(x,y) \text{ on } {[0,1]}^2$$ with $u(0,y)=0$,$u(1,y)=0$,$u(x,0)=0$,$u(x,1)=0$.
However, Mathematica 12 reports different eigenfunctions when using NDEigensystem in contrast to DEigensystem using the following codes:
DEigensystem version:
{vals, funs} =
DEigensystem[{-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} ∈ Rectangle[], 2];
Table[ContourPlot[funs[[i]], {x, y} ∈ Rectangle[],
PlotRange -> All, PlotLabel -> vals[[i]], PlotTheme -> "Minimal",
Axes -> True], {i, Length[vals]}]
NDEigensystem version:
{vals, funs} =
NDEigensystem[{-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} ∈ Rectangle[], 2,
Method -> {"PDEDiscretization" -> {"FiniteElement",
"MeshOptions" -> {"MaxCellMeasure" -> 0.0001}}}];
Table[ContourPlot[funs[[i]], {x, y} ∈ Rectangle[],
PlotRange -> All, PlotLabel -> vals[[i]], PlotTheme -> "Minimal",
Axes -> True], {i, Length[vals]}]
For the second eigenfunction, the DEigensystem
reports the classical textbook eigenfunction, while the numerical solution with NDEigensystem
is fundamentally different, although the mesh discretization is set to a very small value.
Why is that?
NDEigensystem
treats them as degenerate & starts showing different results. $\endgroup$ – Michael Seifert Aug 24 '20 at 19:29