# Question Regarding Harmonic Oscillator Eigenkets

Hi everyone!

Given that a harmonic oscillator has eigenkstates |n> where n = 1,2,3,..., how can we calculate <X>, <P>, <X^2>, etc. Is there a need to define a wavefunction in the |n> basis?

Thanks!

dextercioby
Homework Helper
Essentially no, because |n>'s are eigenkets of the number operator/Hamiltonian and X and P, though unbounded & with purely continuous spectrum, can be expressed as linear combinations of the raising & lowering ladder operators whose action on the eigenket's space becomes known once you establish that |n>'s are eigenkets of H and N.

So that means just express the |n> kets as linear combinations of the ladder operators, and then use them as ψ in the formula <X> = <ψ|X|ψ>? But how would you deal with the infinite dimensionality? Will the answer be finite in that case?

Thank you by the way for the idea!

Consider that
$$\hat{a}=\frac{1}{\sqrt{2}}(\hat{x}+i\hat{p})$$
and
$$\hat{a}^{\dagger}=\frac{1}{\sqrt{2}}(\hat{x}-i\hat{p})$$
You can use these to write $\hat{x}$ and $\hat{p}$ in terms of $\hat{a}$ and $\hat{a}^{\dagger}$. Then you know
$$\hat{a}|n\rangle = \sqrt{n}|n-1\rangle$$
and
$$\hat{a}^{\dagger}|n\rangle=\sqrt{n+1}|n+1\rangle$$
You have the tools to take the expectation value.

Matterwave