Reflection from Wells and Barriers
What we have done so far applies also to waves in quantum mechanics provided we keep in mind the fact that the waves are complex and we are plotting only their real or imaginary parts. Waves in quantum mechanics have an additional property which mechanical waves and optical waves (at least at normal incidence) do not: the k-vector can be an imaginary quantity, i.e. its square can be negative. Our complex algebra has no problem treating k as imaginary - it is the physical significance of an imaginary k-vector that is the problem. Consider the following situation: a wave is travelling along a long string. A segment of the string one wavelength long is replaced by a piece with a linear mass density that is different - either heavier or lighter. A heavier segment will have a higher k (shorter wavelength) and a lighter segment will have a lower k (longer wavelength). We can calculate the amplitude of the transmitted wave and plot it as a function of the square of the k ratio. This is what is done in the next example.
The "in" and "out" labels on k anticipate the quantum application - for the string "in" is the segment and "out" is the rest of the string. Whenever the k-ratio is an integer or half integer an integral number of half-wavelengths fit into the inserted segment and there is no reflection. Note that as the ratio tends to zero the transmitted amplitude decreases, but does not go to zero. The values plotted in the negative region are those resulting from the algebra with an imaginary value for the k-ratio. These values have no physical significance for the string - the mass of the inserted segment cannot be less than zero. Quantum mechanics differs from classical mechanics in that it allows kinetic energy to have a negative value, so the negative region is physically significant. The next example explores the significance of the negative region by showing what happens when the k-ratio is i/4.
The wave "tunnels" through the region of negative kinetic energy and a fraction appears on the far side as a transmitted wave. Amusing though the example may be, it is somewhat misleading. What is plotted is the real (or imaginary) part of the wavefunction. This is done so we can see our boundary-condition matching algebra in action. Waves in quantum mechanics are complex, and neither the modulus of the wavefunction nor its square, the probability density, is time dependent. The probability density exhibits standing waves in the incident region, but has no spatial dependence in the transmission region. We can 'discover' this by extending the program to calculate both real and imaginary parts and combine them to find the modulus and its square. When we plot the result, we find that nothing varies with time. We get the same result if we use algebra to cancel out the time dependence. This is the approach taken in the program below.