Calculate expectation values for \(x^4\) in state \(n\) using ladder operators


 * 1) Find the Hamiltonian that describes a simple harmonic oscillator in ladder operator form as described here: \(\mathbf{\hat{H}}=\omega\hbar \left (\hat{a}^{\dagger}\hat{a} + \frac{1}{2} \right )\) \(\hat{a} = \sqrt{\frac{m\omega}{2\hbar}} \left ( \hat{x} + i\frac{\hat{p}}{m\omega} \right ) \) \(\hat{a}^{\dagger} = \sqrt{\frac{m\omega}{2\hbar}} \left ( \hat{x} - i\frac{\hat{p}}{m\omega} \right ) \)
 * 2) Calculate \(x\): \(x=\sqrt{\frac{\hbar}{2m\omega}}\left(\hat{a}+\hat{a}^{\dagger}\right)\)
 * 3) Substitute this into \(\langle n|\hat{x}^4|n\rangle\): \(\langle n|\hat{x}^4|n\rangle = \frac{\hbar^2}{4m^2\omega^2}\langle n|\left(\hat{a}+\hat{a}^{\dagger}\right)^4|n\rangle\)
 * 4) Expand, ignoring all terms with unequal numbers of raising and lowering operators (since \(\langle a|b \rangle = \delta_{ab}\), all these terms are zero): \(\frac{\hbar^2}{4m^2\omega^2} (\langle n| \hat{a}\hat{a}^{\dagger}\hat{a}\hat{a}^{\dagger}|n\rangle + \langle n| \hat{a}^{\dagger} \hat{a}\hat{a}^{\dagger} \hat{a}|n\rangle + \langle n|\hat{a}^{\dagger}\hat{a}\hat{a}\hat{a}^{\dagger}|n\rangle + \langle n|\hat{a}\hat{a}^{\dagger}\hat{a}^{\dagger}\hat{a}|n\rangle + \langle n| \hat{a}^{\dagger}\hat{a}^{\dagger}\hat{a}\hat{a}|n\rangle + \langle n| \hat{a}\hat{a}\hat{a}^{\dagger}\hat{a}^{\dagger}|n\rangle)\)
 * 5) Sum the terms.
 * 6) Use the commutator to rearrange \(\hat{a}\hat{a}^{\dagger}\), and substitute the number operator \(\hat{n}\) for \(\hat{a}^{\dagger}\hat{a}\) where possible: \(\frac{\hbar^2}{4m^2\omega^2} (\langle n| (\hat{n} + 1)(\hat{n} + 1)|n\rangle + \langle n| \hat{n}\hat{n}|n\rangle + \langle n|\hat{n}(\hat{n} + 1)|n\rangle + \langle n|(\hat{n} + 1)\hat{n}|n\rangle + \langle n| \hat{a}^{\dagger}(\hat{a}\hat{a}^{\dagger} - 1)\hat{a}|n\rangle + \langle n| \hat{a}(\hat{a}^{\dagger} \hat{a} + 1)\hat{a}^{\dagger}|n\rangle)\)
 * 7) Simplify: \(\frac{\hbar^2}{4m^2\omega^2} (\langle n| (\hat{n}^2 + 2\hat{n} + 1)|n\rangle + \langle n| \hat{n}^2|n\rangle + 2\langle n|\hat{n}^2+\hat{n}|n\rangle + \langle n| \hat{a}^{\dagger} \hat{a}\hat{a}^{\dagger}\hat{a} - \hat{a}^{\dagger}\hat{a}|n\rangle + \langle n| \hat{a}\hat{a}^{\dagger} \hat{a}\hat{a}^{\dagger} + \hat{a}\hat{a}^{\dagger}|n\rangle)\)
 * 8) Use the commutator to rearrange \(\hat{a}\hat{a}^{\dagger}\), and substitute the remaining number operators \(\hat{n}\) for \(\hat{a}^{\dagger}\hat{a}\): \(\frac{\hbar^2}{4m^2\omega^2} (\langle n| (\hat{n}^2 + 2\hat{n} + 1)|n\rangle + \langle n| \hat{n}^2|n\rangle + 2\langle n|\hat{n}^2+\hat{n}|n\rangle + \langle n| \hat{n}^2 - \hat{n}|n\rangle + \langle n| (\hat{n} + 1)(\hat{n} + 1) + (\hat{n} + 1)|n\rangle)\)
 * 9) Simplify: \(\frac{\hbar^2}{4m^2\omega^2} (\langle n| (\hat{n}^2 + 2\hat{n} + 1)|n\rangle + \langle n| \hat{n}^2|n\rangle + 2\langle n|\hat{n}^2+\hat{n}|n\rangle + \langle n| \hat{n}^2 - \hat{n}|n\rangle + \langle n| (\hat{n}^2 + 3\hat{n} +2)|n\rangle)\)
 * 10) Calculate the number operators and sum: \(\frac{\hbar^2}{4m^2\omega^2} ((6n^2 + 6n+ 3)\langle n|n\rangle\)
 * 11) Simplify: \(\frac{3\hbar^2}{2m^2\omega^2} (n^2 + n+ \frac{1}{2})\)