Recovering the Hamiltonian from ladder operators The Hamiltonian for the quantum harmonic oscillator is
$$\hat{H}=-\dfrac{\hbar^2}{2m}\dfrac{\partial^2}{\partial x^2}+\dfrac{1}{2}m\omega^2 x^2$$
and one can try to factorise it by writing down what later on will turn out to be ladder operators of the eigenspectrum
$$\begin{align}\hat{A}&=\sqrt{\dfrac{m\omega}{2\hbar}}\left(\hat{x}+\dfrac{i}{m\omega}\hat{p}\right)\\
\hat{A}^\dagger&=\sqrt{\dfrac{m\omega}{2\hbar}}\left(\hat{x}-\dfrac{i}{m\omega}\hat{p}\right)\end{align}$$
Now, in a problem class I'm supervising, the students were asked to "show that we can express the Hamiltonian $\hat{H}$ in terms of $\hat{A}^\dagger$ and $\hat{A}$", with the idea of obtaining the relation
$$\hat{H}=\hbar\omega\left(\hat{A}^\dagger\hat{A}+\dfrac{1}{2}\right)$$
The way the solution to this question is laid out is that the students should simply "guess" the combination $\hat{A}^\dagger\hat{A}$ is the right way to go, or get there by trial and error.
Question: what's the best/most intuitive way to explain why this is the case?
Writing $\hat{p}=-i\hbar\partial_x$, it's easy to justify taking some form of quadratic form of the operators, but why not e.g. just square them?
 A: *

*We know the explicit form of $A$ and $A^\dagger$ in terms of $p$ and $x$.

*We know the expression of $H$ in terms of $p$ and $x$.


So just express $p$ and $x$ as a function of  $A$ and $A^\dagger$, then plug the result in the formula for $H$. To do that, simply find $A + A^\dagger$ and $A - A^\dagger$, the rest will easily follow.
A: How about this approach:


*

*We know that position measurements $\hat{x}\left|n\right\rangle$ yield real numbers;

*We know that momentum measurements $\hat{p}\left|n\right\rangle$ yield real numbers;

*We know that energy measurements $\hat{H}\left|n\right\rangle$ are supposed to yield real numbers as well.


Given these factors, we note that if we wish to construct the operator $\hat{H}$ from some operator $\hat{A} \sim \hat{x}+i\hat{p}$, then we would somehow need to get rid of the $i$ to get real values for the energies. The obvious way to do that, would be to multiply $\hat{A}$ by its Hermitian conjugate to eliminate the $i$, and then seeing what we can do with $\hat{A}\hat{A}^\dagger$. 
A: One notes that 
$$
H=\frac{p^2}{2m}+\frac{1}{2}kx^2 = \frac{1}{2}k
\left(x+\frac{ip}{m\omega}\right)\left(x-\frac{ip}{m\omega}\right)\, ,
$$
which suggests the form of the creation and destruction operators, up to appropriate constants.
In addition, the classical mechanical equations of motion for $x$ and $p$ for a harmonic oscillator are
$$
\dot{x}=\frac{p}{m}\, ,\qquad \dot p=-kx\, .
$$
Written in matrix form:
$$
\frac{d}{dt}\left(\begin{array}{c}
x \\ p\end{array}\right)= U\left(\begin{array}{c}
x \\ p\end{array}\right)\, ,\qquad U=\left(\begin{array}{cc} 0 & 1/m \\ -k & 0 \end{array}\right)\, .
$$
The matrix $U$ thus couples the evolution of $x$ and $p$.  One can search for new variables $X$ and $P$ so that the evolutions of these are decoupled; this amounts to finding the eigenvectors of $U$.  
It's an easy job to show that the eigenvalues of $U$ are $\pm i\omega$, and the eigenvectors 
$$
X={\cal A}\left(x+\frac{ip}{m\omega}\right)\, ,\qquad 
P={\cal B}\left(x-\frac{ip}{m\omega}\right)\, , \quad \omega^2=k/m\, ,
$$
which are proportional to the destruction and creation operators, respectively.
The first method is at the root of the Infeld-Hull factorization method, which in turn is closely related to superpotentials in supersymmetric quantum mechanics.   
A: You can make them look for the energy of every Fock state $ |n> $ and find out that it's $\hbar\omega(n+\frac{1}{2}) $ (oscillator's energy is quantized) and you can also see that $N=a^\dagger a$ is the number operator. $N|n>=n|n>$
