I'm trying to solve Schrödinger 1D equation for hydrogen atom but I found several difficulties.

To get in context I want to solve this equation

enter image description here

For Z and l real and arbitraries. To start with I tried for Z=1 and l=0 and I tried in the following way

    Z = 1
    l = 0
    U[x_] := -Z/x - l (l + 1)/(2 x ^2)
    {RM} = Solve[U[x] == Ei && x > 0 && Ei < 0, x, Reals][[All, 1, -1]]

    (*What I'm going to do is to find for wich x the potential energy U[x] 
     is equal to the eigenenergy Ei. 
     Then I'll solve only in the interval {0,RM} and Ei will be a parameter*)

So far now I only defined the things I'm going to use, Now I'll solve from 0 to RM and as boundary conditions given by the Oppenheimer conditions that says

enter image description here

So I can set the wave function at (r=0) to any arbitrary value, say 2 and then I have the other condition on the derivative. Then the normalization factor will fix to the correct value.

What I did next was to use ParametricNDSolveValue

    SCHR1 = ParametricNDSolveValue[{-1/2 \[Psi]''[x] + U[x] \[Psi][x] == 
Ei \[Psi][x], \[Psi][.0001] == 
2., \[Psi]'[.0001] == -2}, \[Psi], {x, .0001, RM}, {Ei}]

Now I'll solve for RM to infinity (I mean far away, like 10RM would be ok), with continuity as contour condition and in infinity the function has to be zero

    SCHR2 = ParametricNDSolveValue[{-1/2 f''[x] + U[x] f[x] == Ei f[x],

    f[RM] == SCHR1[Ei][RM], f[10 RM] == 0}, f, {x, RM, 10 RM}, {Ei}]        

This actually solves something, but not the something I want and it hasn't even the correct shape.

I hope I'd be clear. Any help will be appreciated

  • $\begingroup$ Greetings! Make the most of Mma.SE and take the tour now. Help us to help you, write an excellent question. Edit if improvable, show due diligence, give brief context, include minimal working examples of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. $\endgroup$ – rhermans Feb 9 '16 at 13:28
  • $\begingroup$ related $\endgroup$ – egwene sedai Feb 9 '16 at 14:00
  • 5
    $\begingroup$ Your solution approach seems overly complicated because it still requires matching the derivatives at $RM$ after already having introduced the (not strictly valid) condition of vanishing amplitude at $10RM$. You may as well do just a single ParametricNDSolveValue up to $10RM$ and solve for the Ei that makes the amplitude vanish at the end point. Then the continuity of the function and its derivative is automatically insured. Also, SCHR2 didn't solve anything when I tried it. $\endgroup$ – Jens Feb 9 '16 at 17:04
  • $\begingroup$ Yes, still needs to match the derivates at that point. I tried on this way because using one ParametricNDSolveValue didn't solve de Schrödinger equation, because it has the wrong energies and I had a solution for every energy (even if it was the wrong energry). I hoped solving on this way to force all those solution to be only one $\endgroup$ – Daniel Feb 11 '16 at 12:34