I used NDEigensystem for finding eigenvalues and eigenfunctions of specified dif. operator. If I set R=1 everything is good and I get right results, but when I set R=10 and more I get complex eigenvalues with tiny Im parts (which are errors as I suppose) and right Re parts(which seem to be the true eigenvalues), but I can't plot eigenfunctions. If they are complex how can I get some real result from them (real part)?
ClearAll["Global`*"]
R = 10; m = 1/2;
U1 = 1/R^2*z/(z + r)*
Hypergeometric2F1[1/2, 1/2, 1, (4*z*r)/(z + r)^2] /.
z -> \[Xi] r // Simplify[#, r > 0] &
V1[r_?NumericQ] := -2 r NIntegrate[U1, {\[Xi], 0, R/r},
Method -> "LocalAdaptive",
AccuracyGoal -> 10] + ((m - 1/2)*(m + 1/2))/r^2
H = -(1/2) P''[r] + V1[r]*P[r] + P[r]
{vals, funs} =
NDEigensystem[{H, DirichletCondition[P[r] == 0, True]},
P[r], {r, 0, 200}, 5,
Method -> {"SpatialDiscretization" -> {"FiniteElement", \
{"MeshOptions" -> {"MaxCellMeasure" -> 0.1}}}} ]
vals - 1
Plot[Evaluate[funs], {r, 0, 120}]
Eigenvalues:
{-0.147842 + 5.56982*10^-11 I, -0.0735129 +
3.43556*10^-11 I, -0.0387015 + 1.35624*10^-11 I, -0.0236214 +
5.65771*10^-12 I, -0.0159122 + 2.85885*10^-12 I}
Also I got this message, maybe I should change some Method settings of NDEigensystems? What do you suggest to get real eigenfunctions?
Eigensystem::maxit2: Warning: the maximum number of iterations, 1000, has been reached by the Arnoldi algorithm without convergence to the specified tolerance, but the current best computed value has been returned. You can use method options with Method -> {Arnoldi, opts} to increase the size of basis vectors, the maximum number of iterations, reduce the tolerance or use an estimate as a shift, any of which may help.
Eigensystem::chnpdef: Warning: there is a possibility that the second matrix SparseArray[Specified elements: 19991
Dimensions: {4999,4999}
] in the first argument is not positive definite, which is necessary for the Arnoldi method to give accurate results.
```

ReImPlot[Evaluate[funs], {r, 0, 120}]$\endgroup$