Find the matrix elements ⟨n∣x∣n′⟩ and ⟨n∣p∣n′⟩ in the (orthonormal) basis of stationary states for the harmonic oscillator (Equation 2.68). You already calculated the "diagonal" elements (n=n′) in Problem 2.12; use the same technique for the general case. Construct the corresponding (infinite) matrices, X and P. Show that (1/2m)P2+(mω2/2)X2=H is diagonal, in this basis. Are its diagonal elements what you would expect? *Partial answer:*
⟨n∣x∣n′⟩=2mωℏ(n′δn,n′−1+nδn′,n−1).(3.114)