602 Appendix A
We shall take^2 / 2 m=1 in the following. This equation can be solved analytically
(it can be mapped onto the Laplace equation which plays an important role in the
solution of the hydrogen atom [25]), the bound state energies are given by
En=−V 0
(
1 −
n+^12
√
V 0
)
, n=0, 1, 2,...
In this problem it is assumed that you have a routine available for integrating the
one-dimensional Schrödinger equation: you can write a Numerov routine or use a
library routine. We want to determine the bound state spectrum numerically. This is
done in the following way. First, a rangexmaxis defined, beyond which we can safely
approximate the potential byV(x)=0;xmax≈10 is a good value for this range. For
some energyE, the Numerov routine can be used to integrate the Schrödinger
equation numerically up to the rangexmaxyielding a solutionu(x), and beyondxmax,
the solution, which we denote asv(x), is known analytically:
v(x)=Ae−qx+Beqx,
q=
√
−E.
Consider theWronskian W:
W=u′(xmax)v(xmax)−u(xmax)v′(xmax)
(the prime′denotes a derivative). For a bound state, the coefficientBin the solutionv
should vanish and we have for the Wronskian:
WB= 0 =[u′(xmax)+qu(xmax)]e−qxmax.
The matching condition between the analytical solutionvand the numerical one (u),
is equivalent to the Wronskian becoming equal to zero, and we thus have to find the
energies for which the Wronskian withB=0 vanishes. These energies can be found
using, for example, the secant method.
(a) [C] Write a function which uses the Numerov procedure for solving the
Schrödinger equation and returns the Wronskian withB=0 as a function of the
energyE.
(b) [C] Write a code for the secant method ofAppendix A3. Test this with some
simple function you know the roots of, for example sinx.
(c) [C] Use the secant code for finding the energies for which the Wronskian with
B=0 vanishes. Note that the energies lie between 0 and−V 0. The search starts
fromE=−V 0 , and after increasing the energy by a small step (which is
predefined in the program or by the user), it is checked if the Wronskian changes
sign. If this is the case, the secant method is executed for the last energy interval.
When the root is found, the energy is increased again until the Wronskian changes
sign. The procedure is repeated until the energy becomes positive.
Check if the energies match the exact values given above.