I am a Quantum Mechanics beginner, I have learnt wave function and Dirac Notation recently, however, I do not know how to convert wave function into the Dirac Notation. For example, how can I express the following initial system state (at time $t=0$ ) as a superposition the energy eigenstates defined by a potential well, for the region $0\leq x \leq a$:

$$\psi(x,0)=\sqrt{\cfrac{8}{5a}}\left(1+\cos{\cfrac{\pi x}{a}}\right)\sin{\cfrac{\pi x}{a}}$$

# [Physics] How to convert a wave function to Dirac Notation

hilbert-spacenotationquantum mechanicswavefunction

## Best Answer

You can write $$ \vert \psi\rangle = \sum_n a_n \vert n\rangle\, ,\qquad n=1,2,\ldots $$ with $$ a_n=\langle n\vert \psi\rangle = \int_0^a dx \langle n\vert x\rangle\langle x\vert n\rangle=\int_0^a\,dx\, \psi_n(x)\,\psi(x) $$ and $\langle x\vert n\rangle := \psi_n(x)$ the wavefunction for the $n$'th energy eigenstate of your problem.