Consider the following Schrodinger equation for the harmonic oscillator with real $x$: $$ −ψ''(x) + x^ 2 ψ(x) = Eψ(x). $$
I solve the last equation using shooting method and implicit Runge-Kutta integration. For the eigenvalue $E=1$, the corresponding eigenfunction looks like:
where I set $x=4$ as $+∞$ and $x=-4$ as $-∞$ . From the Fig, we see that the eigenfunction exponentially decay at $x=\pm 4$ .
The numerical infinity should be large (like $x=6$) for large eigenvalue $E$, and small (like $x=4$) for small eigenvalue. If independent from the eigenvalue, I uniformly set numerical infinity as a very large number, it would waste computational resource. So, is there any formula to determine the exact numerical infinity based on different inputted eigenvalue please?