I'm going through Griffith's Introduction to Quantum Mechanics. The author defines the hamiltonian operator the following way: $$ \hat{H}=-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x)$$ and then claims that:
$$ \hat{H}^2E=\hat{H}(\hat{H}E)$$
without specifying any proof.
I was thinking about ,,proving'' it (actually, obtaining an intuitive explanation of why this might be true) this way:
$$ \hat{H}(\hat{H})=-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\left[-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x)\right]+V(x)\left[-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x)\right]$$
$$ \hat{H}(\hat{H})=\left(-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\right)^2-V(x)\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}-V(x)\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V^2(x)$$
$$ \hat{H}(\hat{H})=\left(-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\right)^2-2V(x)\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V^2(x)$$
$$ \hat{H}(\hat{H})=\left(-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V(x)\right)^2=\hat{H}^2$$
But this is not a correct proof! For example, we cannot write $$ \frac{\partial^2}{\partial x^2}\cdot \frac{\partial^2}{\partial x^2}=\left(\frac{\partial^2}{\partial x^2}\right)^2$$ as they're not numbers, they're operators, each acting on another!
What's the proper method for proving such statement? (or - what can be done to make mine more rigorous?)
Meybe it's a silly question, but the problem with Griffith's book is that it in many places completely skips explanations and proofs, and this result is certainly not so trivial.
You said $E$ is a constant. So you are just trying to prove $$\hat{H}^2=\hat{H}\hat{H}$$ But that's the definition! $\hat{H}^2$ is the shorthand for $\hat{H}\hat{H}$