Skip to content

Ladder-Operator Solution: First Encounter

The ladder-operator method solves the harmonic oscillator by factorizing its Hamiltonian. Instead of integrating a differential equation, it uses the canonical commutator to identify a nonnegative number operator, prove that its eigenvalues are nonnegative integers, and construct every energy eigenstate from one lowest state.

This is a first encounter with spectrum-generating operators. The goal here is the oscillator derivation and its immediate consequences. The general algebraic formalism, representation theory, and quantum-field interpretation have separate canonical homes.

The oscillator Hamiltonian is

H^=p^22m+12mω2x^2,\hat H =\frac{\hat p^2}{2m} +\frac12m\omega^2\hat x^2,

with

[x^,p^]=iℏ.[\hat x,\hat p]=i\hbar.

Introduce the oscillator length

ℓ=ℏmω.\ell=\sqrt{\frac{\hbar}{m\omega}}.

The dimensionless operators

X^=x^ℓ,P^=ℓp^ℏ\hat X=\frac{\hat x}{\ell}, \qquad \hat P=\frac{\ell\hat p}{\hbar}

satisfy [X^,P^]=i[\hat X,\hat P]=i, and

H^=ℏω2(X^2+P^2).\hat H =\frac{\hbar\omega}{2} \left(\hat X^2+\hat P^2\right).

This symmetric quadratic form suggests combining X^\hat X and P^\hat P into complex linear combinations.

Define

a^=12(x^ℓ+iℓℏp^)=X^+iP^2,\hat a =\frac{1}{\sqrt2} \left( \frac{\hat x}{\ell} +\frac{i\ell}{\hbar}\hat p \right) =\frac{\hat X+i\hat P}{\sqrt2},

and

a^†=12(x^ℓ−iℓℏp^)=X^−iP^2.\hat a^\dagger =\frac{1}{\sqrt2} \left( \frac{\hat x}{\ell} -\frac{i\ell}{\hbar}\hat p \right) =\frac{\hat X-i\hat P}{\sqrt2}.

Equivalently,

a^=mω2ℏ x^+i2mℏω p^,\hat a =\sqrt{\frac{m\omega}{2\hbar}}\,\hat x +\frac{i}{\sqrt{2m\hbar\omega}}\,\hat p, a^†=mω2ℏ x^−i2mℏω p^.\hat a^\dagger =\sqrt{\frac{m\omega}{2\hbar}}\,\hat x -\frac{i}{\sqrt{2m\hbar\omega}}\,\hat p.

Every term is dimensionless. This is a useful first check; omitting a factor of ℏ\hbar, mm, or ω\omega destroys both the dimensions and the commutator.

Using bilinearity and [x^,p^]=iℏ[\hat x,\hat p]=i\hbar,

[a^,a^†]=12[x^ℓ+iℓℏp^, x^ℓ−iℓℏp^]=12(−iℏ[x^,p^]+iℏ[p^,x^])=1.\begin{aligned} [\hat a,\hat a^\dagger] &=\frac12 \left[ \frac{\hat x}{\ell} +\frac{i\ell}{\hbar}\hat p,\, \frac{\hat x}{\ell} -\frac{i\ell}{\hbar}\hat p \right]\\ &=\frac12\left( -\frac{i}{\hbar}[\hat x,\hat p] +\frac{i}{\hbar}[\hat p,\hat x] \right)\\ &=1. \end{aligned}

The order matters:

a^a^†=a^†a^+1.\hat a\hat a^\dagger =\hat a^\dagger\hat a+1.

Multiply the operators in the stated order:

a^†a^=12(x^ℓ−iℓℏp^)(x^ℓ+iℓℏp^)=12(x^2ℓ2+ℓ2p^2ℏ2+iℏ[x^,p^])=12(x^2ℓ2+ℓ2p^2ℏ2−1).\begin{aligned} \hat a^\dagger\hat a &=\frac12 \left( \frac{\hat x}{\ell} -\frac{i\ell}{\hbar}\hat p \right) \left( \frac{\hat x}{\ell} +\frac{i\ell}{\hbar}\hat p \right)\\ &=\frac12\left( \frac{\hat x^2}{\ell^2} +\frac{\ell^2\hat p^2}{\hbar^2} +\frac{i}{\hbar}[\hat x,\hat p] \right)\\ &=\frac12\left( \frac{\hat x^2}{\ell^2} +\frac{\ell^2\hat p^2}{\hbar^2} -1 \right). \end{aligned}

Because ℓ2=ℏ/(mω)\ell^2=\hbar/(m\omega), this gives

H^=ℏω(a^†a^+12).\hat H =\hbar\omega \left( \hat a^\dagger\hat a+\frac12 \right).

Define the number operator

N^=a^†a^.\hat N=\hat a^\dagger\hat a.

Then

H^=ℏω(N^+12).\hat H=\hbar\omega\left(\hat N+\frac12\right).

The constant 1/21/2 originates in the noncommutativity of x^\hat x and p^\hat p. If they commuted, there would be no ordering correction in the factorization.

For every normalized state in the domain of a^\hat a,

⟨ψ∣N^∣ψ⟩=⟨ψ∣a^†a^∣ψ⟩=∥a^∣ψ⟩∥2≥0.\langle\psi\vert\hat N\vert\psi\rangle =\langle\psi\vert \hat a^\dagger\hat a \vert\psi\rangle =\lVert\hat a\lvert\psi\rangle\rVert^2 \ge0.

Thus N^\hat N is a positive operator. If

N^∣ν⟩=ν∣ν⟩,\hat N\lvert\nu\rangle =\nu\lvert\nu\rangle,

then ν≥0\nu\ge0. Positivity by itself does not yet prove that ν\nu is an integer. The ladder relations provide the missing step.

The basic commutator implies

[N^,a^]=−a^,[N^,a^†]=a^†.[\hat N,\hat a] =-\hat a, \qquad [\hat N,\hat a^\dagger] =\hat a^\dagger.

For example,

[N^,a^]=[a^†a^,a^]=a^†[a^,a^]+[a^†,a^]a^=−a^.\begin{aligned} [\hat N,\hat a] &=[\hat a^\dagger\hat a,\hat a]\\ &=\hat a^\dagger[\hat a,\hat a] +[\hat a^\dagger,\hat a]\hat a\\ &=-\hat a. \end{aligned}

If ∣ν⟩\lvert\nu\rangle is an eigenstate of N^\hat N, then

N^a^∣ν⟩=(a^N^−a^)∣ν⟩=(ν−1)a^∣ν⟩,\begin{aligned} \hat N\hat a\lvert\nu\rangle &=(\hat a\hat N-\hat a)\lvert\nu\rangle\\ &=(\nu-1)\hat a\lvert\nu\rangle, \end{aligned}

unless a^∣ν⟩=0\hat a\lvert\nu\rangle=0. Similarly,

N^a^†∣ν⟩=(ν+1)a^†∣ν⟩.\hat N\hat a^\dagger\lvert\nu\rangle =(\nu+1)\hat a^\dagger\lvert\nu\rangle.

The operators therefore lower and raise the number eigenvalue by one. Since H^\hat H is an affine function of N^\hat N,

[H^,a^]=−ℏωa^,[H^,a^†]=ℏωa^†.[\hat H,\hat a]=-\hbar\omega\hat a, \qquad [\hat H,\hat a^\dagger] =\hbar\omega\hat a^\dagger.

They change the energy by exactly one level spacing.

The norm of a lowered state is

∥a^∣ν⟩∥2=⟨ν∣a^†a^∣ν⟩=ν.\begin{aligned} \lVert\hat a\lvert\nu\rangle\rVert^2 &=\langle\nu\vert \hat a^\dagger\hat a \vert\nu\rangle\\ &=\nu. \end{aligned}

Repeated lowering gives

∥a^k∣ν⟩∥2=ν(ν−1)⋯(ν−k+1).\left\lVert \hat a^k\lvert\nu\rangle \right\rVert^2 =\nu(\nu-1)\cdots(\nu-k+1).

Suppose ν\nu were not an integer. Let rr be the greatest integer smaller than ν\nu. Then a^r+1∣ν⟩\hat a^{r+1}\lvert\nu\rangle has positive norm but is an eigenstate of N^\hat N with eigenvalue ν−r−1<0\nu-r-1<0, contradicting positivity. Therefore every number eigenvalue is a nonnegative integer:

ν=n,n=0,1,2,…\nu=n, \qquad n=0,1,2,\ldots

The lowering chain must terminate in a state satisfying

a^∣0⟩=0.\hat a\lvert0\rangle=0.

This lowest state has N^∣0⟩=0\hat N\lvert0\rangle=0 and

H^∣0⟩=12ℏω∣0⟩.\hat H\lvert0\rangle =\frac12\hbar\omega\lvert0\rangle.

The algebra has produced both the existence of a ground state and its nonzero energy.

For a normalized number state,

∥a^∣n⟩∥2=n.\lVert\hat a\lvert n\rangle\rVert^2=n.

After fixing the relative phases of the basis states in the standard way,

a^∣n⟩=n ∣n−1⟩.\hat a\lvert n\rangle =\sqrt n\,\lvert n-1\rangle.

Likewise,

∥a^†∣n⟩∥2=⟨n∣a^a^†∣n⟩=⟨n∣(N^+1)∣n⟩=n+1,\begin{aligned} \lVert\hat a^\dagger\lvert n\rangle\rVert^2 &=\langle n\vert \hat a\hat a^\dagger \vert n\rangle\\ &=\langle n\vert(\hat N+1)\vert n\rangle\\ &=n+1, \end{aligned}

so

a^†∣n⟩=n+1 ∣n+1⟩.\hat a^\dagger\lvert n\rangle =\sqrt{n+1}\,\lvert n+1\rangle.

Starting from a normalized vacuum,

∣n⟩=(a^†)nn!∣0⟩.\lvert n\rangle =\frac{(\hat a^\dagger)^n}{\sqrt{n!}} \lvert0\rangle.

The factorial follows from the product of normalization factors 12⋯n\sqrt1\sqrt2\cdots\sqrt n.

Since N^∣n⟩=n∣n⟩\hat N\lvert n\rangle=n\lvert n\rangle,

H^∣n⟩=ℏω(n+12)∣n⟩.\hat H\lvert n\rangle =\hbar\omega\left(n+\frac12\right) \lvert n\rangle.

Thus

En=ℏω(n+12),n=0,1,2,…E_n =\hbar\omega\left(n+\frac12\right), \qquad n=0,1,2,\ldots

This agrees with the Differential-Equation Solution, but its origin looks different. In the differential route, decay at both infinities forces a power series to terminate. Here, positivity forces the lowering chain to terminate.

These are two representations of the same structure. The Gaussian vacuum found below is the terminating chain’s position-space realization, and repeated raising generates its Hermite-polynomial descendants.

In position representation,

p^=−iℏddx,\hat p=-i\hbar\frac{d}{dx},

so

a^=12(xℓ+ℓddx).\hat a =\frac{1}{\sqrt2} \left( \frac{x}{\ell} +\ell\frac{d}{dx} \right).

Let ψ0(x)=⟨x∣0⟩\psi_0(x)=\langle x\vert0\rangle. The vacuum condition becomes

(xℓ+ℓddx)ψ0(x)=0,\left( \frac{x}{\ell} +\ell\frac{d}{dx} \right)\psi_0(x)=0,

or

dψ0dx=−xℓ2ψ0.\frac{d\psi_0}{dx} =-\frac{x}{\ell^2}\psi_0.

Integrating gives

ψ0(x)=Ce−x2/(2ℓ2).\psi_0(x)=C e^{-x^2/(2\ell^2)}.

Normalization fixes

C=1π1/4ℓ=(1πℓ2)1/4,C=\frac{1}{\pi^{1/4}\sqrt{\ell}} =\left(\frac{1}{\pi\ell^2}\right)^{1/4},

up to an arbitrary global phase. Therefore

ψ0(x)=(1πℓ2)1/4e−x2/(2ℓ2).\psi_0(x) =\left(\frac{1}{\pi\ell^2}\right)^{1/4} e^{-x^2/(2\ell^2)}.

The first-order vacuum equation has only one square-integrable solution up to scale. This establishes the uniqueness of the one-dimensional oscillator ground state within this representation.

In position representation,

a^†=12(xℓ−ℓddx).\hat a^\dagger =\frac{1}{\sqrt2} \left( \frac{x}{\ell} -\ell\frac{d}{dx} \right).

Applying it once gives

ψ1(x)=⟨x∣a^†∣0⟩=12(xℓ−ℓddx)ψ0(x)=2 xℓψ0(x).\begin{aligned} \psi_1(x) &=\langle x\vert\hat a^\dagger\vert0\rangle\\ &=\frac{1}{\sqrt2} \left( \frac{x}{\ell} -\ell\frac{d}{dx} \right)\psi_0(x)\\ &=\sqrt2\,\frac{x}{\ell}\psi_0(x). \end{aligned}

Repeated application produces a degree-nn polynomial multiplying the same Gaussian:

ψn(x)=1n![12(xℓ−ℓddx)]nψ0(x).\psi_n(x) =\frac{1}{\sqrt{n!}} \left[ \frac{1}{\sqrt2} \left( \frac{x}{\ell} -\ell\frac{d}{dx} \right) \right]^n \psi_0(x).

The polynomial is the physicists’ Hermite polynomial, yielding

ψn(x)=12nn!(1πℓ2)1/4Hn(xℓ)e−x2/(2ℓ2).\psi_n(x) =\frac{1}{\sqrt{2^n n!}} \left(\frac{1}{\pi\ell^2}\right)^{1/4} H_n\left(\frac{x}{\ell}\right) e^{-x^2/(2\ell^2)}.

The algebraic method therefore does produce wavefunctions; it only postpones the coordinate representation until after the spectrum is known.

Invert the definitions:

x^=ℓ2(a^+a^†),\hat x =\frac{\ell}{\sqrt2} \left(\hat a+\hat a^\dagger\right), p^=ℏiℓ2(a^−a^†).\hat p =\frac{\hbar}{i\ell\sqrt2} \left(\hat a-\hat a^\dagger\right).

The matrix elements follow immediately:

⟨m∣x^∣n⟩=ℓ2(n δm,n−1+n+1 δm,n+1),\langle m\vert\hat x\vert n\rangle =\frac{\ell}{\sqrt2} \left( \sqrt n\,\delta_{m,n-1} +\sqrt{n+1}\,\delta_{m,n+1} \right), ⟨m∣p^∣n⟩=ℏiℓ2(n δm,n−1−n+1 δm,n+1).\langle m\vert\hat p\vert n\rangle =\frac{\hbar}{i\ell\sqrt2} \left( \sqrt n\,\delta_{m,n-1} -\sqrt{n+1}\,\delta_{m,n+1} \right).

Both operators connect only adjacent number states. Consequently, a perturbation proportional to xx obeys Δn=±1\Delta n=\pm1 in the ideal oscillator. By contrast, x2x^2 contains a^2\hat a^2, (a^†)2(\hat a^\dagger)^2, and diagonal terms, so it connects Δn=0,±2\Delta n=0,\pm2.

Using

x^2=ℓ22(a^2+a^a^†+a^†a^+(a^†)2),\hat x^2 =\frac{\ell^2}{2} \left( \hat a^2 +\hat a\hat a^\dagger +\hat a^\dagger\hat a +(\hat a^\dagger)^2 \right),

the terms that change nn have zero diagonal expectation value. Since a^a^†=N^+1\hat a\hat a^\dagger=\hat N+1,

⟨n∣x^2∣n⟩=ℓ2(n+12).\langle n\vert\hat x^2\vert n\rangle =\ell^2\left(n+\frac12\right).

Similarly,

⟨n∣p^2∣n⟩=mℏω(n+12).\langle n\vert\hat p^2\vert n\rangle =m\hbar\omega\left(n+\frac12\right).

Hence

⟨T⟩n=⟨V⟩n=12ℏω(n+12)=En2.\langle T\rangle_n =\langle V\rangle_n =\frac12\hbar\omega\left(n+\frac12\right) =\frac{E_n}{2}.

The algebra recovers the virial theorem without integrating any Hermite functions.

In the Heisenberg picture,

da^dt=iℏ[H^,a^]=−iωa^,\frac{d\hat a}{dt} =\frac{i}{\hbar}[\hat H,\hat a] =-i\omega\hat a,

so

a^(t)=e−iωta^(0),a^†(t)=eiωta^†(0).\hat a(t)=e^{-i\omega t}\hat a(0), \qquad \hat a^\dagger(t)=e^{i\omega t}\hat a^\dagger(0).

Substitution into x^=ℓ(a^+a^†)/2\hat x=\ell(\hat a+\hat a^\dagger)/\sqrt2 gives the exact sinusoidal motion of the position and momentum operators. This simple phase rotation is why oscillator variables are so effective in quantum optics and normal-mode dynamics.

Coherent States are eigenstates of a^\hat a, not of N^\hat N. Under oscillator evolution their eigenvalue rotates as e−iωte^{-i\omega t}, producing a localized packet whose center follows the classical orbit.

For this single particle in an external quadratic potential, a^†\hat a^\dagger raises the oscillator excitation number and a^\hat a lowers it. Neither operator creates nor destroys the particle itself. The particle remains present in every ∣n⟩\lvert n\rangle.

In many-body theory and quantum field theory, independent normal modes are quantized as oscillators, and the same algebra is interpreted in terms of particles or quasiparticles occupying those modes. That later interpretation is powerful, but importing it too early obscures the present problem.

x^\hat x, p^\hat p, a^\hat a, and a^†\hat a^\dagger are unbounded operators, so products and commutators are not automatically defined on every vector in L2(R)L^2(\mathbb R). The manipulations above are valid on a common dense invariant domain, such as the Schwartz space, and on finite linear combinations of oscillator eigenstates. Their closures then define the standard oscillator operators.

At an introductory level this domain language is often suppressed, but it matters conceptually: an operator identity is meaningful only where both sides act on the same states.

  • Assuming positivity alone proves that the number eigenvalues are integers.
  • Dropping the 1/21/2 when factorizing H^\hat H.
  • Reversing a^†a^\hat a^\dagger\hat a and a^a^†\hat a\hat a^\dagger.
  • Forgetting the factors n\sqrt n and n+1\sqrt{n+1} in normalized ladder actions.
  • Writing a dimensionful annihilation operator.
  • Treating a^∣0⟩=0\hat a\lvert0\rangle=0 as though it meant the zero vector is the ground state; it means the lowered result is zero.
  • Calling a^†\hat a^\dagger a particle-creation operator in this one-particle model.
  • Concluding that the algebraic method contains no position-space information.
  • Using commutator identities without ensuring that the relevant operator products share a domain.
  • Quantum Harmonic Oscillator supplies the physical interpretation and classical comparison.
  • Number States develops occupation probabilities, functions of N^\hat N, and number-basis calculations.
  • Dynamical Symmetry distinguishes spectrum-generating operators from symmetries that preserve each energy eigenspace.
  • Ladder Operators as Lie Algebra Tools abstracts the commutator pattern beyond this model.
  • Heisenberg Group places the canonical commutation relation in its group-theoretic setting.
  • Canonical Commutation Relations develops the relation from which the oscillator algebra follows.
  • Operators gives the domain and product background needed to interpret the ordering in a^†a^\hat a^\dagger\hat a.
  • Later pages on phonons, photons, and free fields reuse one ladder pair for each independent normal mode.
  • R. Shankar, Principles of Quantum Mechanics, 2nd ed., Springer, 1994, sec. 7.1.
  • J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020, sec. 2.3.
  • C. Cohen-Tannoudji, B. Diu, and F. Laloë, Quantum Mechanics, vol. 1, Wiley, 1977, ch. V.
  • D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd ed., Cambridge University Press, 2018, sec. 2.3.1.
  • B. C. Hall, Quantum Theory for Mathematicians, Springer, 2013, secs. 9.1 and 12.2.
  1. Derive [a^,a^†]=1[\hat a,\hat a^\dagger]=1 directly from the dimensional definitions.
Solution

Write

a^=αx^+iβp^,a^†=αx^−iβp^,\hat a=\alpha\hat x+i\beta\hat p, \qquad \hat a^\dagger=\alpha\hat x-i\beta\hat p,

where

α=mω2ℏ,β=12mℏω.\alpha=\sqrt{\frac{m\omega}{2\hbar}}, \qquad \beta=\frac{1}{\sqrt{2m\hbar\omega}}.

Only the cross commutators survive:

[a^,a^†]=−iαβ[x^,p^]+iαβ[p^,x^]=2αβℏ=1.\begin{aligned} [\hat a,\hat a^\dagger] &=-i\alpha\beta[\hat x,\hat p] +i\alpha\beta[\hat p,\hat x]\\ &=2\alpha\beta\hbar\\ &=1. \end{aligned}
  1. Compute both a^†a^\hat a^\dagger\hat a and a^a^†\hat a\hat a^\dagger. Explain the difference.
Solution

Direct multiplication gives

a^†a^=12(x^2ℓ2+ℓ2p^2ℏ2−1),\hat a^\dagger\hat a =\frac12\left( \frac{\hat x^2}{\ell^2} +\frac{\ell^2\hat p^2}{\hbar^2} -1 \right),

whereas

a^a^†=12(x^2ℓ2+ℓ2p^2ℏ2+1).\hat a\hat a^\dagger =\frac12\left( \frac{\hat x^2}{\ell^2} +\frac{\ell^2\hat p^2}{\hbar^2} +1 \right).

Their difference is

a^a^†−a^†a^=1,\hat a\hat a^\dagger-\hat a^\dagger\hat a=1,

which is exactly the commutator. The sign change comes from reversing the order of x^\hat x and p^\hat p in the cross terms.

  1. Complete the noninteger contradiction for a hypothetical number eigenvalue ν=2.4\nu=2.4.
Solution

The successive lowered states would have number eigenvalues 1.41.4, 0.40.4, and −0.6-0.6. The third lowered state is not zero because

∥a^3∣2.4⟩∥2=2.4(1.4)(0.4)>0.\left\lVert \hat a^3\lvert2.4\rangle \right\rVert^2 =2.4(1.4)(0.4)>0.

It would therefore be a nonzero eigenstate of the positive operator N^\hat N with negative eigenvalue −0.6-0.6, which is impossible. The same argument excludes every noninteger ν≥0\nu\ge0.

  1. Derive the matrix element ⟨m∣x^∣n⟩\langle m\vert\hat x\vert n\rangle and state the selection rule for a perturbation proportional to xx.
Solution

Using

x^=ℓ2(a^+a^†),\hat x=\frac{\ell}{\sqrt2} \left(\hat a+\hat a^\dagger\right),

one obtains

⟨m∣x^∣n⟩=ℓ2(n ⟨m∣n−1⟩+n+1 ⟨m∣n+1⟩)=ℓ2(n δm,n−1+n+1 δm,n+1).\begin{aligned} \langle m\vert\hat x\vert n\rangle &=\frac{\ell}{\sqrt2} \left( \sqrt n\,\langle m\vert n-1\rangle +\sqrt{n+1}\,\langle m\vert n+1\rangle \right)\\ &=\frac{\ell}{\sqrt2} \left( \sqrt n\,\delta_{m,n-1} +\sqrt{n+1}\,\delta_{m,n+1} \right). \end{aligned}

It vanishes unless m=n±1m=n\pm1, so a linear position coupling has Δn=±1\Delta n=\pm1.

  1. Use ladder operators to calculate ⟨n∣x^2∣n⟩\langle n\vert\hat x^2\vert n\rangle without integrating wavefunctions.
Solution

Expand

x^2=ℓ22[a^2+(a^†)2+a^a^†+a^†a^].\hat x^2 =\frac{\ell^2}{2} \left[ \hat a^2 +(\hat a^\dagger)^2 +\hat a\hat a^\dagger +\hat a^\dagger\hat a \right].

The first two terms inside the brackets change nn by two and have zero diagonal matrix elements. The remaining terms give

⟨n∣x^2∣n⟩=ℓ22⟨n∣(N^+1)+N^∣n⟩=ℓ2(n+12).\begin{aligned} \langle n\vert\hat x^2\vert n\rangle &=\frac{\ell^2}{2} \langle n\vert (\hat N+1)+\hat N \vert n\rangle\\ &=\ell^2\left(n+\frac12\right). \end{aligned}
  1. Show that the Heisenberg-picture position operator obeys the classical oscillator equation.
Solution

From

a^(t)=e−iωta^(0),a^†(t)=eiωta^†(0),\hat a(t)=e^{-i\omega t}\hat a(0), \qquad \hat a^\dagger(t)=e^{i\omega t}\hat a^\dagger(0),

and

x^(t)=ℓ2[a^(t)+a^†(t)],\hat x(t)=\frac{\ell}{\sqrt2} \left[\hat a(t)+\hat a^\dagger(t)\right],

differentiate twice:

d2x^dt2=−ω2ℓ2[a^(t)+a^†(t)]=−ω2x^(t).\frac{d^2\hat x}{dt^2} =-\omega^2\frac{\ell}{\sqrt2} \left[\hat a(t)+\hat a^\dagger(t)\right] =-\omega^2\hat x(t).

Thus

d2x^dt2+ω2x^=0\frac{d^2\hat x}{dt^2}+\omega^2\hat x=0

as an operator equation.