Harmonic Oscillator: The hannonic oscillator can be solved exactly for the
quantized energies, and here we compare those results with a numerical
approach. Along with the values of and discussed above, we choose
our units so that the spring constant is also 1 . The potential energy
function is then simply For , use
. (a) Following the above guidelines on choosing and
, test both odd and even functions at different trial values
of by finding at all positive multiples of out
and plotting the results. Note that because of the functions' symmetries there
is no need to plot negative values of . Find four allowed energies. (b)
What tells you that an energy is correct? (c) Compare your results with the
exact values given in equation .