On the two different solution approaches of the quantum harmonic oscillator

The Hamiltonian for the harmonic oscillator (with $$\hbar = m = 1$$) is given by: $$\hat{H} = -\frac{1}{2}\frac{d^{2}}{dx^{2}} + \frac{1}{2}\omega^{2}x^{2}$$ This is assumed to be an operator on $$\mathscr{S}(\mathbb{R}^{d})\subset L^{2}(\mathbb{R}^{d})$$. One usual approach to solve it is the following. Define the operators $$a, a^{\dagger}$$: $$\begin{eqnarray} a = \sqrt{\frac{\omega}{2}}\bigg{(}-\frac{d}{dx} +x^{2}\bigg{)} \quad \mbox{and} \quad a^{\dagger} = \sqrt{\frac{\omega}{2}}\bigg{(}x-\frac{d}{dx}\bigg{)} \tag{1}\label{1} \end{eqnarray}$$ so that the Hamiltonian becomes: $$\begin{eqnarray} \hat{H} = aa^{\dagger}-\frac{1}{2}I = a^{\dagger}a + \frac{1}{2} I \tag{2}\label{2} \end{eqnarray}$$ and $$a,a^{\dagger}$$ satisfies $$[a,(a^{\dagger})^{k}] = k(a^{\dagger})^{k-1}$$. The eigenstates of $$\hat{H}$$ are given by Hermite polynomials: $$\begin{eqnarray} \phi_{0}(x) := \pi^{-\frac{1}{4}}e^{-\frac{1}{2}x^{2}} \quad \mbox{and} \quad \phi_{k}(x) := \frac{1}{\sqrt{k!}}(a^{\dagger})^{k}\phi_{0}(x) \tag{3}\label{3} \end{eqnarray}$$ Now, as far as I understand, when we move to Dirac's approach, the state $$|k\rangle$$ is actually an expansion in terms of the position eigenvectors, that is: $$\begin{eqnarray} |k\rangle = \int dx \phi_{k}(x)|x\rangle \tag{4}\label{4} \end{eqnarray}$$ However, one can attack the problem directly using Dirac's formalism.

Question: Using Dirac's approach directly, the operators $$a$$ and $$a^{\dagger}$$ now act on $$|k\rangle$$ instead of its components $$\phi_{k}(x)$$, so that $$a$$ and $$a^{\dagger}$$ must act on $$|x\rangle$$. However, the expression of the Hamiltonian $$\hat{H}$$ is precisely the same as in (\ref{2}). What is the connection between the two approaches? How are both $$a$$ and $$a^{\dagger}$$ (in both formalisms) related? I'm a bit confused.

• What is $\mathcal{S}(\mathbb{R}^d)$? Commented Feb 16, 2021 at 15:38
• It is the Schwarz space of rapid decrease functions. Commented Feb 16, 2021 at 16:22

Let us consider the following operator: $$a^\dagger \equiv \sqrt{\frac{m\omega}{2\hbar}}\left(\hat{x}-\frac{i\hat{p}}{m\omega}\right) \quad .$$
If we want to use the position-space representation, we have to note that $$\langle x| \hat{x} = x \langle x|$$ and $$\langle x| \hat{p} = -i\hbar\, \frac{\mathrm{d}}{\mathrm{d}x} \langle x|$$. We therefore find $$\langle x| a^\dagger = \sqrt{\frac{m\omega}{2\hbar}} \left(x-\frac{\hbar}{m\omega}\,\frac{\mathrm{d}}{\mathrm{d}x}\right) \langle x| \quad .$$ Consequently, we have to write (for example) $$\langle x|a^\dagger|k\rangle = \sqrt{\frac{m\omega}{2\hbar}} \left(x-\frac{\hbar}{m\omega}\,\frac{\mathrm{d}}{\mathrm{d}x}\right) \langle x|k\rangle \quad .$$
Note that the operators do not act on components (i.e. on $$\langle x|k\rangle$$), but on $$|k\rangle$$, as you can see in the LHS of the above equation.