# Question Regarding Harmonic Oscillator Eigenkets

• Thunder_Jet
The infinite dimensionality is accounted for in the summation over n in the expectation value formula <X> = \sum_{n=0}^{\infty} x_n |\langle n | \psi \rangle|^2.In summary, the conversation discusses calculating <X>, <P>, <X^2>, etc. for a harmonic oscillator with eigenkstates |n>. It is not necessary to define a wavefunction in the |n> basis, as the operators X and P can be expressed as linear combinations of the raising and lowering ladder operators. The expectation values can be calculated using these ladder operators and the infinite dimensionality is accounted for in the summation over n.

#### Thunder_Jet

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!

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.

Thunder_Jet said:
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!

You don't express the kets as ladder operators acting on the vacuum, you express x and p as ladder operators.