0

There is the following system $H=-\frac{1}{2}\Delta-a\frac{1}{r}$, where a is a parameter. I'd like to find eigenvalues and eigenfunctions depending on the parameter. To solve a differential equation with parameters, there is ParametricNDSolveValue. Is there something similar in case of NDEigensystem?

ClearAll["Global`*"]
rmax = 20; a = 1;
HH = -(1/2)*Laplacian[u[r], {r, \[Theta], \[Phi]}, "Spherical"] - 
   a*1/r*u[r];

{vals, funs} = NDEigensystem[{HH + u[r]}, u[r], {r, 0, rmax}, 50, Method -> {"SpatialDiscretization" -> {"FiniteElement",
{"MeshOptions" -> {"MaxCellMeasure" -> 0.015}}}, "Eigensystem" -> {"Arnoldi", "MaxIterations" -> 10000}}]; Sort[vals] - 1 ({-0.5, -0.125018, -0.0616851, -0.0225138, 0.0582443, 0.168841,
0.306885, 0.471408, 0.661866, 0.877922, 1.11936, 1.38602, 1.6778,
1.99462, 2.33642, 2.70316, 3.09479, 3.51129, 3.95264, 4.41881,
4.9098, 5.42558, 5.96614, 6.53148, 7.12159, 7.73645, 8.37606,
9.04042, 9.72952, 10.4434, 11.1819, 11.9452, 12.7332, 13.546,
14.3834, 15.2456, 16.1325, 17.0441, 17.9804, 18.9414, 19.9271,
20.9375, 21.9727, 23.0325, 24.117, 25.2263, 26.3602, 27.5188,
28.7021, 29.9101}
) funs[[1 ;; 5]]

Mam Mam
  • 1,843
  • 2
  • 9
  • 1
    All operators whose names begin with "N" are numerical operators, therefore they can not deal with parameters. But instead of "NEigensystem", use "DEigensystem that can deal with parameters." Further, why do you write "HH+u[r]" and not "HH? Where does the additional u[r] come from? – Daniel Huber Jun 30 '23 at 14:37
  • @Daniel Huber in my case, the system is more complicated than in the question, it is not solved analytically, only numerically. But ParametricNDSolveValue is with the "N" and it deals with parameters or not? – Mam Mam Jun 30 '23 at 15:18
  • @Daniel Huber, thanks! I added a function to the equation and then subtracted from the eigenvalues to get the eigenvalues I wanted. I did it because sometimes NDEigensystem does not return the minimum eigenvalue and the corresponding eigenfunction. This issue is discussed in more detail in the answer to this question https://mathematica.stackexchange.com/questions/235662/ndeigensystem-and-radial-function-equation-for-hydrogen-atom – Mam Mam Jun 30 '23 at 15:19

0 Answers0