4
$\begingroup$

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]}]

DEigensystem

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]}]

NDEigensystem

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?

$\endgroup$
3
  • 7
    $\begingroup$ For the lowest state, they're just negatives of each other, so that's fine. The second state is doubly degenerate, and so I'm betting that the second state in the second code is a linear combination of the two degenerate states from the first code. $\endgroup$ – march Aug 20 '20 at 20:59
  • 2
    $\begingroup$ @march is right. Just observe the graphics of first 3 eigenfunctions and you'll know what happens. $\endgroup$ – xzczd Aug 21 '20 at 3:22
  • 2
    $\begingroup$ And, of course, the problem will go away if you work on a rectangular domain such as $[0,1] \times [0,1.1]$. It would be interesting to see how close the last of these numbers can get to 1 before NDEigensystem treats them as degenerate & starts showing different results. $\endgroup$ – Michael Seifert Aug 24 '20 at 19:29
5
$\begingroup$

As already pointed out in the comments by @march and @xzczd, the second lowest state with eigenvalue $\lambda_{1,2} = \lambda_{2,1} = 5 \pi^2$ is doubly degenerate.

DEigensystem

DEigensystem

NDEigensystem

NDEigensystem

This means that the corresponding eigenfunctions are not only determined up to a scaling (as for the lowest state). They are rather determined to be some orthogonal basis of the eigenspace

$$ E_{5 \pi^2} = \{a \phi_{1,2} + b \phi_{2,1} \mid a,b \in \mathbb{R}, \, -\Delta \phi_{1,2} = 5 \pi^2 \phi_{1,2}, \, -\Delta \phi_{2,1} = 5 \pi^2 \phi_{2,1}, \, \phi_{1,2} \perp \phi_{2,1}\} $$

We have $\text{dim}(E_{5 \pi^2}) = 2$. The results from NDEigensystem ($\phi_{1,2,\text{ND}}, \phi_{2,1,\text{ND}}$) are therefore also valid solutions because they span the same eigenspace:

$$ E_{5 \pi^2} = \text{span}\{\phi_{1,2,\text{NDEigen}}, \phi_{2,1,\text{NDEigen}}\} \\ = \text{span}\{\phi_{1,2,\text{DEigen}}, \phi_{2,1,\text{DEigen}}\} \\ = \text{span}\{\sin(1 \pi x)\sin(2 \pi y), \sin(2 \pi x)\sin(1 \pi y)\} $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.