Find the Spectrum of a Schrödinger Operator
Solve the eigenproblem of a Schrödinger equation over a 1D region.
Specify an unconstrained Schrödinger operator.
In[1]:=

h = 1/10; V[x_] := x^2
\[ScriptCapitalL] = -h^2*u''[x] + V[x]*u[x];
Find the 10 smallest eigenvalues and eigenfunctions on a refined mesh.
In[2]:=

{vals, funs} =
NDEigensystem[\[ScriptCapitalL], u[x], {x, -3, 3}, 10,
Method -> {"SpatialDiscretization" -> {"FiniteElement", \
{"MeshOptions" -> {MaxCellMeasure -> 0.01}}}}];
Inspect the eigenvalues.
In[3]:=

vals
Out[3]=

Visualize the eigenfunctions scaled by and offset by the respective eigenvalues.
show complete Wolfram Language input
Out[4]=
