NDEigensystem
NDEigensystem[ℒ[u[x,y,…]],u,{x,y,…}∈Ω,n]
gives the n smallest magnitude eigenvalues and eigenfunctions for the linear differential operator ℒ over the region Ω.NDEigensystem[{ℒ_{1}[u[x,y,…],v[x,y,…],…],ℒ_{2}[u[x,y,…],v[x,y,…],…],…},{u,v,…},{x,y,…}∈Ω,n]
gives eigenvalues and eigenfunctions for the coupled differential operators {op_{1},op_{2},…} over the region Ω.
NDEigensystem[eqns,{u,…},t,{x,y,…}∈Ω,n]
gives the eigenvalues and eigenfunctions in the spatial variables {x,y,…} for solutions u,… of the coupled timedependent differential equations eqns.
Details and Options
 NDEigensystem gives lists {{λ_{1},…,λ_{n}},{u_{1},…,u_{n}}} of eigenvalues λ_{i} and eigenfunctions u_{i} or {{λ_{1},…,λ_{n}},{{u_{1},v_{1},…},…,{u_{n},v_{n},…}} in case of coupled systems.
 The equations eqns are specified as in NDSolve.
 An eigenvalue and eigenfunction pair {λ_{i},u_{i}} for the differential operator ℒ satisfy ℒ[u[x,y,…]]==λ_{i} u_{i}[x,y,…].
 An eigenvalue and eigenfunctions pair {λ_{i},{u_{i},v_{i},…}} for coupled differential operators satisfy:

ℒ_{1}[u_{i}[x,y,…],v_{i}[x,y,…],…]λ_{i} u_{i}[x,y,…] ℒ_{2}[u_{i}[x,y,…],v_{i}[x,y,…],…]==λ_{i} v_{i}[x,y,…] ⋮  Eigenvalues are sorted in order of increasing absolute value.
 With the default normalization, the eigenfunctions u_{i} computed by NDEigensystem[ℒ[u[x,y,…]],u,{x,y,…}∈Ω,n] approximately satisfy . »
 With the default normalization, the eigenfunctions {u_{i},v_{i},…} for coupled differential operators approximately satisfy .
 Homogeneous DirichletCondition or NeumannValue boundary conditions may be included. »
 PeriodicBoundaryCondition may be included.
 When no boundary condition is specified on part of the boundary ∂Ω, then this is equivalent to specifying a Neumann 0 condition.
 For a system of firstorder timedependent equations, the time derivatives D[u[t,x,y,…],t], D[v[t,x,y,…],t],… are effectively replaced with λ u[x,y,…], λ v[x,y,…],….
 Systems of timedependent equations that are higher than first order are reduced to a coupled firstorder system with intermediate variables u_{t}=u^{*},=…, v_{t}=v^{*},=…, … Only the functions u, v, … are returned. »
 NDEigensystem accepts a Method option that may be used to control different stages of the solution. With Method>{s_{1}>m_{1},s_{2}>m_{2},…}, stage s_{i} is handled by method m_{i}. When stages are not given explicitly, NDEigensystem tries to automatically determine what stage to apply a given method to.
 Possible solution stages are:

"PDEDiscretization" discretization of spatial operators "Eigensystem" computation of the eigensystem from the discretized system "Interpolation" creation of interpolating functions "VectorNormalization" normalization of the eigenvectors that are used to construct the eigenfunctions
Examples
open allclose allBasic Examples (2)
Scope (14)
1D (8)
Specify homogeneous Dirichlet boundary conditions:
Find the 4 smallest eigenvalues and eigenfunctions:
Specify homogeneous Neumann boundary conditions:
Find the 4 smallest eigenvalues and eigenfunctions:
Specify a transient equation with homogeneous Dirichlet boundary conditions:
Find the 4 smallest eigenvalues and eigenfunctions:
Find 5 eigenvalues and eigenvectors of a Laplacian with periodic boundary conditions:
Compare the eigenvalues with the expected analytical eigenvalues:
Inspect to see that the bounds are periodic:
An equivalent formulation using PeriodicBoundaryCondition:
Specify a wave equation with homogeneous Dirichlet boundary conditions:
Find the 4 smallest eigenvalues and eigenfunctions:
Compute the eigensystem of a generalized wave equation :
Compare to the exact solution of an equivalent firstorder system of ordinary differential equations:
Compute the 4 smallest eigenvalues and eigenfunctions:
Compare the eigenvalues with the analytical eigenvalues:
Visualize the analytical eigenfunctions:
Specify a Schrödinger operator with parameter and potential :
Find the 10 smallest eigenvalues and eigenfunctions on a refined mesh:
Visualize the eigenfunctions scaled by and offset by the respective eigenvalue:
2D (6)
Find the 4 smallest eigenvalues and eigenfunctions:
Find the 4 smallest eigenvalues and eigenfunctions of the operator in a unit disk:
Specify a Laplacian operator with homogeneous Dirichlet boundary conditions:
Find the 9 smallest eigenvalues and eigenfunctions in a rectangle:
Specify a wave equation with homogeneous Dirichlet boundary conditions:
Find the 4 smallest eigenvalues and eigenfunctions in a disk:
The eigenvalues of the wave equation will be the square root of the angular frequencies:
Compare to the exact solution of an equivalent firstorder system of ordinary differential equations:
Options (8)
Method (8)
"Eigensystem" (3)
Specify a method to use for solving the eigensystem:
In this case, the default method is faster:
Arnoldi is used as the default method:
Specify a maximum number of iterations for the Arnoldi method:
Find two eigenvalues and eigenfunctions of a Sturm–Liouville operator within the band of with the FEAST method for Eigensystem:
According to the Sturm–Liouville theory, the eigenvalues must be distinct, but for this example they are close to degenerate:
The almost degenerate eigenfunctions are:
The interval end points are not included in the interval FEAST finds eigenvalues in; for more information, please refer to the Eigensystem reference page.
"Interpolation" (1)
By default, the eigenfunctions give Indeterminate for points outside the region :
Modify the default behavior to eliminate the warning messages:
Evaluate the second eigenfunction outside of the region :
Visualize part of the solution:
Change the eigenfunctions to return an extrapolated value outside of the region :
"PDEDiscretization" (1)
Change the MaxCellMeasure for the underlying computation:
The exact eigenvalues are 0,1,4,9,…, so the eigenvalue error is as follows:
"VectorNormalization" (3)
Compute without any normalization of the computed eigenvalues:
The default is to normalize with respect to the system matrices:
The functions are constructed by interpolating the eigenvectors:
NDEigensystem constructs the damping (mass) and stiffness system matrices to be solved as a generalized eigensystem. The normalization of the eigenvectors is constructed such that applying the normalized eigenvector to the damping (mass) matrix forms an identity matrix:
Applying the normalized eigenvector to the stiffness matrix produces eigenvalues on the diagonal:
With the default normalization, the L2 norm of the eigenfunctions will be approximately 1:
Degrees of freedom associated with Dirichlet conditions are removed before the eigensystem is computed, and 0 is reinserted after the solution. This results in different dimensions of the normalization vector and the eigenvector for constraint problems:
During the eigensystem computation, the two Dirichlet conditions are removed:
After the eigensystem computation, zero values are reintroduced into the functions:
Applications (8)
Acoustics (1)
Compute the acoustic eigenvalues and eigenfunctions for an approximation of a cross section through a Mini. Import an image of the cross section:
Use the mask tool to create a boundary graphic:
Compute 6 eigenvalues and eigenfunctions of the cross section:
Visualize the second eigenfunction in the cross section of the car:
The visualization shows qualitatively a standing wave assuming acoustically rigid walls. A large amplitude corresponds to a large change in pressure and thus a large acoustic volume.
Structural Mechanics (2)
Compute constraint eigenvalues and eigenfunctions:
Visualize the scaled norm of the eigenfunctions:
The visualization shows the principal deformation of the region.
Specify a plane stress operator for steel:
Compute the first eigenvalue and eigenfunction of a beam with length 10 meters and height 0.7 meters:
Compute resonant frequency from the eigenvalue:
Compute the first resonance frequency analytically utilizing Euler–Bernoulli beam theory:
Compare the difference in results; about half the difference is attributable to the different theoretical approaches:
Eigenfunction Expansions (4)
Construct a solution for a plucked clamped string using an eigenfunction expansion:
Approximate the initial condition as a linear combination of eigenfunctions:
Construct the timedependent solution using the coefficients and the eigenvalues as frequencies, assuming that the time derivative at is 0:
Make an animation of the approximation, including each of the functions with nonzero coefficients:
Compare to the timedependent solution found by NDSolve:
Make a plot of the difference:
Compare different harmonic frequencies on a circular drum:
Show a time evolution for each of the eigenfunctions over one cycle of the first:
Note that the eigenfunctions with larger eigenvalues oscillate more quickly:
Show the time evolution of a linear combination of eigenfunctions:
This is the solution of the wave equation with consistent initial conditions:
Show the difference between a finite eigenexpansion and full solution:
Use an eigenfunction expansion to get a solution of the heat equation on a region:
Compute the first 20 eigenvalues and eigenfunctions for the Laplacian on :
For computing integrals, it is faster and more consistent to use the discretized domain Ω_{d}:
Since does not satisfy the homogeneous boundary conditions, find the steady state solution that does on the discretized domain Ω_{d}, so that does satisfy them:
Compute the coefficients of the eigenfunction expansion for the difference :
The approximation to the solution of the heat equation is as follows:
Compute the timedependent solution:
Make a plot of the difference:
Properties & Relations (3)
With the default normalization, the eigenfunctions u_{i} approximately satisfy :
When the eigenvalues are complex, it is necessary to use the conjugate:
Compare the approximated eigensystem to one computed analytically for the wave equation.
Find the 6 smallest eigenvalues and eigenfunctions of a wave equation within 0 and :
The eigenvalues of the PDE system converted to first order in time correspond to eigenvalues of the matrix , where is an eigenvalue of with at the boundaries:
Show the relationship between higherorder timedependent PDEs and systems of firstorder PDEs.
Find the 6 smallest eigenvalues and eigenfunctions of the wave equation within 0 and :
Plot the modulus and the real and imaginary parts of the eigenfunctions:
Find the 6 smallest eigenvalues and eigenfunctions of a wave equation given as a system of firstorder PDEs :
Plot the modulus and the real and imaginary parts of the eigenfunctions:
The eigenvalues for the secondorder system and the system of firstorder equations are the same:
For a given eigenvalue, the eigenfunction returned for the secondorder system is the same as the first eigenfunction returned for the system:
For a given eigenvalue, times the eigenfunction returned for the secondorder system is the same as the second eigenfunction returned for the system:
The eigenfunctions for the system are normalized so that :
The eigenfunctions for the secondorder timedependent system are normalized in the same way as the system, and since , so :
Possible Issues (11)
The computed eigensystem depends on the granularity of the discretization:
The exact eigenvalues are 0,1,4,9,…, so the eigenvalue error is as follows:
Visualize the discretization error in :
A finer mesh results in a decreased discretization error:
Visualize the discretization error in :
The granularity of the discretization of the region influences the number of eigenvalues and eigenfunctions that can be found:
The differences between the eigenvalues and eigenfunctions in a coarser versus a finer discretization tend to increase with the mode number:
Eigensystems with inhomogeneous Dirichlet conditions cannot be solved:
Eigensystems with homogeneous Dirichlet conditions can be solved:
Eigensystems with inhomogeneous Neumann values cannot be solved:
Eigensystems with homogeneous Neumann values can be solved:
Eigensystems with inhomogeneous generalized Neumann values cannot be solved:
Eigensystems with homogeneous generalized Neumann values can be solved:
The operator and possible boundary conditions need to be stationary and linear:
Initial conditions will be set to zero and ignored:
The eigenvalues and eigenfunctions will be sorted by magnitude. Define a potential function:
Note the negative eigenvalues:
Obtain the eigenvalues by the real part:
Caution needs to be exercised when converting equations. Consider the Sturm–Liouville problem with homogeneous Dirichlet conditions. The analytical solution of the eigenvalues is given by:
To avoid numerical stability problems at , it is best to use the temporal description:
Compare this to the following formulation of the problem:
NDEigensystem converts PDEs to timedependent PDEs. This transformation is not unique and may lead to what seem to be unexpected results for coupled PDEs:
Internally, the given equations are rewritten as a system of timedependent PDEs. In the previous case from the given dependent variables {v[x],u[x]}, the following temporal system is generated: {D[v[t, x], t] ==  u[t, x]  Laplacian[u[t, x], {x}],D[u[t, x], t] == v[t, x]  Laplacian[v[t, x], {x}]}
To uniquely specify the system of equations, it is best to use the temporal description:
More information on this topic can be found in Finite Element Method Usage Tips.
In some cases, NDEigensystem may return what seem to be unexpected results for coupled PDEs:
One way to avoid this issue is to specify an ordering of the dependent variables via the "InterpolationOrder" option:
Alternatively, the "Direct" method can be used:
More information on this topic can be found in Finite Element Method Usage Tips.
Neat Examples (1)
Explore how eigenfunctions in this quantum mechanics example tend to cluster when the number of wells increases and in the infinite space limit form allowed energy bands. At the same time, the influence of the boundary conditions decreases with increasing structure size. Also note that within a band the eigenfunctions are quite different (they must be orthogonal to each other), while the squared eigenfunctions are similar. This indicates the various possibilities to form superpositions from the approximate eigenfunctions of a single well: