Worksheet 4, PHY301 - Fall 2004

Due Nov 12, 2004 - two weeks

In this worksheet, you will write C++ code to solve an eigenvalue problem from quantum mechanics, using the iterative power method code you developed in the preceding worksheet.

Problem 1.
First, write and test a new C++ function that computes both the largest and the smallest eigenvalue of a matrix by (1) calling your previous function to find the eigenvalue of largest magnitude; (2) creating a new matrix by subtracting that eigenvalue times the identity matrix from the original matrix and calling your previous function again to find a new extreme eigenvalue; (3) calculating the other extreme eigenvalue of the original matrix by combining these results.

Problem 2.
Find the lowest eigenvalue and eigenvector of a particle in the potential V(x), i.e. solve the Schroedinger equation

$-d^2/dx^2+V(x)) \psi(x) = E \psi(x)$


where
V(x) = x2 + b x4,

Do this for a range of values of b, and make a plot of your result for the ground state energy as a function of b.

To do this calculation, you will make the continuous problem into a discrete one by limiting the range in x to -L < x < +L, and representing the wave function by its value at uniformly spaced lattice points within that interval. You will of course have to check that your final results are independent of L and the lattice spacing. (This approach has an enormous range of applications in modern physics and engineering.)

You will need to set up a matrix that represents the operator d2/dx2 by finite differences. Use Taylor's series for the wave function expanded about each lattice point to see how to do this. The simplest method uses only the nearest neighbors. However, it is not difficult to figure out how to do better by also using next-nearest neighbors; or even next-next-nearest; if you prefer to get fancy.

Problem 3.
Compare your result to the result expected expected from first order perturbation theory, which you can calculate with the help of Mathematica. (Recall that for a harmonic oscillator $E=(n+1/2) \hbar \omega$, and the ground-state wavefunction is a Gaussian.)

Problem 4.
Also compare your result for the ground state energy as a function of the parameter b to the result obtained from a variational calculation using a Gaussian trial wave function. Explicitly, use a trial wave function of the form psi(x) = c1 * exp(-c2*x^2), where c1 is a normalization constant and c2 is adjusted for each value of b to minimize the expectation value of the Hamiltonian. This calculation gives an upper bound to the ground state energy, and it becomes exact in the limit b-->0 since the true wave function for the harmonic oscillator is well known to be a Gaussian. Use Mathematica to do this calculation.

Extra credit
A different approach to converting this Schroedinger Equation problem to matrix form would be to use harmonic oscillator basis states, i.e., the full set of eigenstates of the Hamiltonian with b set to 0. The resulting infinite dimensional matrix would be truncated at some appropriate dimension. Feel free to try it this way also, if you are sufficiently familiar with the ``raising'' and ``lowering'' operators. (Hint: to find the infinite-dimensional matrix of x^4, you can just find the infinite-dimensional matrix of x^2 and square it!)