Consider the following eigenvalue equation
$$-\frac{d^2}{dx^2}\Psi_n(x)+\left(gx^4+\frac{1}{x^2}\right)\Psi_n(x)=E_n\Psi_n(x),\qquad x\in(-10,10),\qquad\Psi(-10)=\Psi(10)=0$$
The boundary of $x$ is arbitrary, Ideally it should be $x\in(-\infty,\infty)$ but since we are doing numerics we cant impose that. I want to solve this system using NDEigensystem. I have tried the following so far
n = 25;
l = 10;
g = 1/4;
V[x_] := (g*x^4 + 1/x^2);
op = -D[D[\[Psi][x], x], x] + V[x]*\[Psi][x];
bc = DirichletCondition[\[Psi][x] == 0, True];
{vals, funs} = NDEigensystem[{op, bc}, \[Psi][x], {x, -l, l}, n];
When I run this code, I get all sorts of crazy eigenfunctions with singularities. Not ideal at all. But when I run it with a smaller $l$, say l=Pi
, I get much well behaved functions. How should I adjust my boundaries, if ideally they need to be infinity. Should I somehow consider the potential too?
l=10 Pi
, it runs perfectly fine, and the corresponding solutions look just fine when I plot them, with no singularities. Can you clarify what the issue is, or give an example of when things go wrong? $\endgroup$