Worksheet 4, PHY301 - Spring 2012 -

Write a C++ code to solve the following eigenvalue problem from quantum mechanics. Use the iterative power method code you developed in the last worksheet.
Problem

Find the lowest eigenvalue and eigenvector of a particle in the potential (i.e. solve $(-d^2/dx^2+V(x)) \psi(x) = E \psi(x)$)

V(x) = x2 + b x4, (1)

for a range of values of b. To do this calculation, you need to set up a matrix which represents the operator d2/dx2 - ask a TA how to do this if you are unfamiliar with it. Once you have set up your matrix, you will need to ``shift'' it so that the eigenvalue of largest magnitude is the lowest energy state in the potential. Plot the lowest eigenvalue you found as a function of b. Compare your result with that expected from first order perturbation theory (recall that for a harmonic oscillator $E=(n+1/2) \hbar \omega$, and the ground-state wavefunction is a Gaussian). Use Mathematica to evaluate the first order perturbation result and compare it to the numerical result you have found.