Midterm Exam 03: Solving An ODE Like It's The Transcontinental Railroad
Midterm Exam 03: Solving An ODE Like It's The Transcontinental Railroad
Midterm Exam 03
When studying the problem of a particle in a finite potential well, we solved for the wave
(in position x space) and from right-to-left, iterating over the value of the particle’s
energy E until the two integrations match at some prescribed location xmatch. What
was different about this particular problem as compared to other ODE problems? Why
was it important that we integrate from both directions? Discuss the advantages (and
disadvantages) of solving the problem in this way. Can you envision an-other way to
solve the problem while still satisfying all of the requirements that originally motivated
The biggest difference in this problem was although the ODE was like what we had
already solved and was quite simple the difference in the finite potential well was the
boundary conditions that had to be met. Having boundary conditions turned the ODE
problem into an eigenvalue problem that has solutions only for particle values of E or
the energy which in our problem was represented as k. We had to integrate from both
sides as those were the boundary conditions that we were using. The potential on each
side outside the box vanishes to zero exponentially. An advantage to solving the
problem this way would be that it is relatively simple. Though I did not understand it very
well at first, it is much more general by just solving an ODE solver plus a ‘searcher’ for
the lowest eigenvalue which in this case is the most negative energy the particle can
Bradley Andrew
have at the bottom of the potential well. This makes it only have a few lines of code and
see for a problem similar to this would be if you did not know one or both of the
boundary conditions. You would then not be able to integrate from both sides. This
would also prevent you from find the eigenvalues unless you used a different method.
Another slight disadvantage with this method is that using the ODE solver means you
solve for the first derivative to then solve for the function though the equation to begin
with only relates the function to the second derivative so this method could be
computing more than you actually need. A different method for solving this problem is
the Numerov Algorithm, which is specialized for ODEs not containing any first
derivatives. This method is less general than our previous, but it does provide more
precision.
A brief derivation of the method is that you do a Taylor series expansion on the wave
function plus some h as well as minus some h ( w(x+h) and w(x-h) ). You then sum
these two, drop terms past the fourth derivative and rearrange to solve for the second
derivative. Then the fourth derivative is substituted by a derived expression that only
depends on the second derivative. Finally using the central-difference approximation for
the second derivative you obtain the Numerov algorithm which only uses values of the
wave function at the two previous steps x and x-h to move the wave function forward to
x + h.
This method only uses the second derivative and does not require the use of specific
boundary conditions. However, from looking at the example code in the book, it is more
Bradley Andrew
longer and more complicated than our original method which was much more general
and easier to understand though again less precise and requiring boundary conditions.