Calculating $\langle{n} \; {| \; \hat{X}^2 \; |} \; m\rangle$ in the N-representation, where $| \; m\rangle$ and $| \; n\rangle$ are harmonic oscillator states and $\hat{X} = \sqrt{\frac{\hbar}{2mw}}( \hat{a} + \hat{a}^\dagger )$, I find that :
$ \; \hat{X}^2 = \frac{\hbar}{2mw} [\hat{a}^2 + \hat{a}^{\dagger2} + 2\hat{a}^{\dagger}\hat{a} + 1] \quad $ (1)
Next, omitting the work, I find :
$\langle{n} \; {| \; \hat{X}^2 \; |} \; m\rangle = \frac{\hbar}{2mw} [ \sqrt{m(m-1)}\delta_{n,m-2} + \sqrt{(m+1)(m+2)}\delta_{n,m+2} + (2n+1)\delta_{n,m}] \quad $ (2)
The problem I'm facing is figuring out how to approach the N-representation of $\langle{m} \; {| \; \hat{X}^4 \; |} \; n\rangle$ and would appreciate some guidance.
If I attempt to first expand $\hat{X}^4$ I have problems trying to reduce it, which leads me to wonder if I could simply just multiply the RHS of (2) by itself?
UPDATE
Upon reviewing the suggestions below I realise that a combination of misunderstanding and intimidation led me astray ...
With interest in the coefficients, as well as the form, I find that :
\begin{align} \langle{n} \; {| \; \hat{X}^2 \; |} \; m\rangle & = \sqrt{n(n-1)(n-2)(n-3)}\delta_{m,n-4} \; + \\ & \quad [ 2\sqrt{n(n-1)} + 2n\sqrt{n(n-1)} + 2(n-2)\sqrt{n(n-1)} ]\delta_{m,n-2} \; + \\ & \quad [4n + 1 + \sqrt{(n+1)(n+2)(n+1)(n+2)} + \sqrt{n(n-1)(n-1)n} + 4n^2]\delta_{m,n} \; + \\ & \quad [ 2\sqrt{(n+1)(n+2)} + 2n\sqrt{(n+1)(n+2)} + 2(n+2)\sqrt{(n+1)(n+2)} ]\delta_{m,n+2} \; + \\ & \quad \sqrt{(n+1)(n+2)(n+3)(n+4)}\delta_{m,n+4} \\ \end{align}
Which is then further simplified.
Try this for (maybe) less painful algebra $$ \langle m|X^4|n\rangle=\sum_{l_1, l_2, l_3} \langle m|X|l_1\rangle \langle l_1|X|l_2\rangle \langle l_2|X|l_3\rangle \langle l_3|X|n\rangle $$ And use the fact that $$ \langle p|X|q\rangle = \sqrt{\dfrac{\hbar}{2m\omega}}[\sqrt{q}\delta_{p,q-1}+\sqrt{q+1}\delta_{p, q+1}] $$ You will get a lot of Kronecker deltas. The end result is of the form $$A\delta_{m,n-4}+ B\delta_{m,n-2}+C \delta_{m,n}+D \delta_{m,n+2}+E\delta_{m,n+4}$$ Actually if the form interests you and not the coefficients it is quite clear why the form is as above: Every time you have a pairing $a^\dagger a$ or $aa^\dagger$ in $X^4$ you can ignore it since it will give just a number which goes into the coefficients.