# Solving Transcendental equation involving special functions becoming nightmare any one can help?

Simply i want to solve for schrodinger equation for finite potential well problems in spherical coordinates. For case in which l=0 . It is simple but when l changes. The solution are spherical bessel and spherical hankel function. Hankel function have an imaginary argument. Using scipy python library i am not even able to define the equation properly. Is there any better way to do that ..

• What do you want to do? If you want to solve for the spherical well wavefunction numerically, which is what this forum is mainly for, you need neither Hankel nor Bessel functions, but rather you discretlze the radial grid using finite differences or related methods. Commented Mar 28, 2023 at 23:29
• This seems like homework. I think there are analytical solutions to your homework problem, so solving it via numerical methods, although possible, might miss the point. Note that there is a physics stackexchange where people are more inclined to help with such problems. Commented Mar 29, 2023 at 6:22

Considering the following finite potential $$U(r)= \begin{cases} -U_0, & r \leq R \\ 0 & r > R \end{cases}$$ The radial equation is given by $$$$-\frac{\hbar^2}{2m} \frac{d^2u(r )}{dr^2}+\left[U(r)+\frac{\hbar^2 \ell(\ell+1)}{2mr^2} \right]u(r)=Eu(r).$$$$ This is identical to the one-dimensional Schrödinger equation with an effective potential, where the centrifugal term pushes the particle outwards. You seem to be looking for the case where $$\ell=0$$. To solve this analytically, rewrite the equation and consider the boundary conditions. $$$$\frac{d^2 u(r )}{dr^2}+\frac{M}{\hbar^2} \left[E-U(r) \right]u(r)=0,$$$$ where I plugged in the expression for the reduced mass, $$m=2M$$ (two particles). For a bound state the energy eigenvalue, $$E$$, is negative and $$E_B$$ is a positive binding energy. This leads to the following expressions
$$$$\label{diff1} \frac{d^2 u(r )}{dr^2}+\frac{M}{\hbar^2} \left(U_0-E_B \right)u(r)=0, \quad r \leq R,$$$$ $$$$\label{diff2} \frac{d^2 u(r )}{dr^2}-\frac{M}{\hbar^2} E_B u(r)=0, \quad r > R.$$$$ Introduce two variables given by $$$$\label{constants} k=\sqrt{\frac{M}{\hbar^2}\left(U_0-E_B\right)}, \quad \kappa=\sqrt{\frac{M E_B}{\hbar^2}}.$$$$ Rewriting the equation and solving the differential equation yields $$$$\label{solu1} \frac{d^2 u(r )}{dr^2} = -ku(r) \Rightarrow u(r) = A\sin(kr)+B\cos(kr).$$$$ Since $$R(r) = u(r)/r$$ and $$\cos(kr)/r$$ blows up as $$r \rightarrow 0 \Rightarrow B=0$$ and the solution is $$$$u(r)=A\sin(kr), \quad r \leq R$$$$ Now, $$$$\label{solu2} \frac{d^2 u(r )}{dr^2} = \kappa^2 u(r) \Rightarrow u(r) = Ce^{\kappa r}+De^{-\kappa r}$$$$ Here $$Ce^{\kappa r}$$ blows up as $$r\rightarrow \infty$$. The wavefunction must be continuous and this means the two solutions must match at $$r=R$$. The same applies for the derivative. This leads to two equations for $$r=R$$. $$$$\label{sin} A\sin(kR) =De^{-\kappa R}$$$$ $$$$\label{expo} Ak\cos(kR) =-D\kappa e^{-\kappa R}$$$$ Dividing leads to $$$$\label{cot} -\cot(kR) = \frac{\kappa}{k}$$$$ This equation can be solved by requiring $$kR=\pi/2$$.
In relation to the Hankel functions I assume you are looking for a solution for $$r>a$$ with a finite $$\ell$$. The radial wave function with the orbital momentum $$\ell$$ is for $$r is given by the spherical Bessel function. For a bound state, this function has to be continuously matched to the exponentially decaying Hankel function.
$$$$h_0^{(1)}(i\kappa r) = -\frac{\exp(-\kappa r)}{\kappa r}$$$$