"Exercise 2. Verify ladder operators." psi(n) = C(n) exp(-m omega x^2 / (2 hbar)) H(n, x sqrt(m omega / hbar)) C(n) = 1 / sqrt(2^n n!) (m omega / (pi hbar))^(1/4) H(n,y,z) = (-1)^n exp(y^2) eval(d(exp(-z^2),z,n),z,y) ahat(f) = sqrt(m omega / (2 hbar)) (x f + i phat(f) / (m omega)) ahat1(f) = sqrt(m omega / (2 hbar)) (x f - i phat(f) / (m omega)) phat(f) = -i hbar d(f,x) check(ahat(psi(0)) == 0) check(ahat(psi(1)) == psi(0)) check(ahat(psi(2)) == sqrt(2) psi(1)) check(ahat(psi(3)) == sqrt(3) psi(2)) check(ahat(psi(4)) == 2 psi(3)) check(ahat1(psi(0)) == psi(1)) check(ahat1(psi(1)) == sqrt(2) psi(2)) check(ahat1(psi(2)) == sqrt(3) psi(3)) check(ahat1(psi(3)) == 2 psi(4)) check(ahat1(psi(4)) == sqrt(5) psi(5)) -- number operator Nhat(f) = ahat1(ahat(f)) check(Nhat(psi(0)) == 0) check(Nhat(psi(1)) == psi(1)) check(Nhat(psi(2)) == 2 psi(2)) check(Nhat(psi(3)) == 3 psi(3)) check(Nhat(psi(4)) == 4 psi(4)) "ok"
Run