# Hamiltonian of linear harmonic oscilator

1. May 27, 2013

### LagrangeEuler

Could hamiltonian of linear harmonic oscilator be written in the form?
$\hat{H}=\sum^{\infty}_{n=0}(n+\frac{1}{2})\hbar\omega |n\rangle \langle n|$

2. May 27, 2013

### lugita15

Yes, it can. The ket vectors |n> form a basis for the Hilbert space, so two operators on the Hilbert space are equal if the yield the same answer for each element of the basis. So you just need to check that when the left-hand side acts on an arbitrary |n>, it yields the same answer as when the right hand side acts on it.

3. May 27, 2013

### dextercioby

What you wrote there is called the spectral decomposition of the Hamiltonian operator. According to the spectral theorem, every self-adjoint operator has one.

4. May 27, 2013

### LagrangeEuler

$-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}$
Its hermitian. What is his spectral form?

5. May 27, 2013

### lugita15

That's the position space representation of the Hamiltonian of a free particle. Well, the Hamiltonian of a free particle can be written in terms of momentum eigenstates as $\hat{H}=\int^{\infty}_{-\infty}\frac{p^{2}}{2m}|p\rangle \langle p| dp$. Or did you want to express the Hamiltonian in terms of position eigenstates instead?

Last edited: May 27, 2013
6. May 27, 2013

### LagrangeEuler

I want in terms of positional eigenstates.

7. May 27, 2013

### dextercioby

It's more complicated than that. I'll take the free spinless particle in R.

If you Trans-Fourier it to momentum space (ignore hbar and m/2), it's the unit operator times p^2, so that the spectral decomposition would be

$\mathcal{F}\left(-\frac{d}{dx^2}\right) = \int_{k\in\mathbb{R}} k^2 \delta (k-p) dk$

8. May 27, 2013

### lugita15

You can only write an operator in terms of outer products formed from eigenstates of that operator. So you can't write the Hamiltonian of a free particle in terms of position states.

EDIT: Of course, you can always say $\hat{H}=\int^{\infty}_{-\infty}\hat{H}|x\rangle \langle x| dx$, but that's trivial. You can't write it the same way you can write it in terms of momentum eigenstates, because momentum eigenstates are eigenstates of the Hamiltonian of a free particle, while position eigenstates are not.

Last edited: May 27, 2013
9. May 27, 2013

### lugita15

Was that addressed to me? Did I say something wrong?

10. May 28, 2013

### LagrangeEuler

$E_n=\frac{n^2\pi^2\hbar^2}{2mL^2}$
$\psi_n(x)=\sqrt{\frac{2}{L}}\sin \frac{n\pi x}{L}$
Could you write Hamiltonian from here?

11. May 28, 2013

### Jorriss

What do you think about it?

12. May 28, 2013

### LagrangeEuler

I think it could be done, but I really don't know how?

Last edited: May 28, 2013
13. Jun 1, 2013

### lugita15

Yes, it's just $\hat{H}=\sum^{\infty}_{n=1} E_n |n\rangle \langle n|$, where $\hat{H}|n\rangle= E_n|n\rangle$.