Finding roots for transcendental equations
In this chapter, we will take "the square-well-potential problem" as an exercise of finding roots for transcendental equations with Python. Consider a potential well of width a and depth V0. Find the bound states and the corresponding energies.
The continuity of wave functions and their first order derivative at boundaries give us two transcendental equations. One for even wavefunctions and the other for odd wavefunctions.
It is important to make all of the quantities in a transcendental equation be dimensionless. By doing so, we can reduce the chance of making mistakes.
then, the transcendental equations become,
Let's plot them with Python3! (source code)
For more details about this physical problem, chick this link.
不負責任der結尾 我要去屏東啦。剩下來的解根請見"Titus A. Beu, Introduction to Numerical Programming" ch 6.5 Newton's Method (書在書架上,他長這樣)
如果懶得自己寫解根程式,SciPy有一個不錯的套件 fsolve





沒有留言:
張貼留言