See further down for an important note
Background
I study (one component of) the semi-classical Pauli operator, $$ P_h=-h^2\Delta+ih(-y,x)\cdot\nabla+\frac{x^2+y^2}{4}-h. $$ For this particular question, let us consider the Dirichlet problem in the disk $x^2+y^2<1$ (I work in more general settings, but my question applies to this case). I am interested in the size of the lowest eigenvalue $\lambda_1(h)$ of the Pauli operator (it will be exponentially small, like $\exp(-C/h)$ for some $C>0$), as the semiclassical parameter $h\to 0$. For this purpose I am trying to study $\lambda_1(h)$ numerically for small $h$.
Current code
My code looks at the moment like this:
paulieigenvalue[h_, cells_] := NDEigenvalues[
{(1/4)*((-4*h + x^2 + y^2)*u[x, y] - 4*h*(I*x*D[u[x, y],y] -
I*y*D[u[x, y],x] + h*(D[u[x, y],{x,2}] + D[u[x, y],{y,2}]))),
DirichletCondition[u[x, y] == 0, True]},
u[x, y],
Element[{x, y}, Disk[]],
1,
Method -> {"SpatialDiscretization" -> {
"FiniteElement", {"MeshOptions" -> {MaxCellMeasure -> cells}}}}
]
The input
paulieigenvalue[0.001, 0.001]
gives
$$\bigl\{1.542\times 10^{-6}-3.09081\times 10^{-20}i\bigr\},$$
while if I change MaxCellMeasure
to $0.0001$,
paulieigenvalue[0.001, 0.0001]
I get $$\bigl\{1.91835\times 10^{-8} - 7.75138\times 10^{-21} i\bigr\}.$$
Even though I know that the eigenvalues should be real, the tiny imaginary parts is not the big issue for me. The big issue is that the real part changes so much, almost by a factor of $100$, when I change the MaxCellMeasure
option. For this reason I cannot trust (any of) these values.
Questions
1) Is there some way to gain precision with
NDEigenvalues
, (except playing withMaxCellMeasure
, or playing with it in a more controlled way)?2) Is there some way, with the built-in functions, to get some error control?
3) Is there a better way in Mathematica to obtain, with high numerical accuracy, the eigenvalue $\lambda_1(h)$ with high precision for small $h$?
Update: An important note
I realize this is not fair to Mathematica. In fact, by calculating the energy of $$ u(x,y)=\exp((1-x^2+y^2)/(4h))-\exp(-(1-x^2+y^2)/(4h)) $$ one finds the true inequality $$ \lambda_1(h)<\frac{h \left(e^{\left.-\frac{1}{4}\right/h}-4 h \sinh \left(\frac{1}{4 h}\right)\right)}{1-2 h \sinh \left(\frac{1}{2 h}\right)}. $$ Inserting $h=0.0001$ into the right-hand side, one gets the tiny number $$ 3.369\times 10^{-2172}. $$ I certainly need to do some transformation before I can attack, numerically, this problem. (In this case that transformation has typically to scale the operator by a factor of $e^{-1/(2h)}$, but in general I'm a bit lost.) In any case, I let the question stand, since I am still curious about if it is possible to work on the precision/accuracy in the eigenvalue solver of Mathematica (perhaps in less extreme situations).