# How can I convert a wave function to Dirac Notation?

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}}$$

• I'm not sure what you mean by "convert a wave function into Dirac notation". The "Dirac Notation"-name for your wave function is $|\psi(t)\rangle$. You can write its representation in position space as $\langle x|\psi(0)\rangle=\sqrt{\dots}\cos (\pi x/a)\dots$ – Adomas Baliuka Sep 24 '17 at 15:02

## 2 Answers

Welcome to physics stackexchange. This general type of question has been asked before here.

Your version of this question in particular, however, shows a slight misunderstanding, so I will make an additional comment:

You can not generally convert from a function to a Dirac ket with respect to energy eigenstates without knowing the Hamiltonian (which defines energy eigenstates).

Once you know the Hamiltonian and find its space of solutions, you can use an integral transformation to go from a wavefunction to a superposition of eigenstates of the Hamiltonian. If you are considering an infinite well, which has a space of solutions $\psi_n = \sin(\frac{n\pi x}{L})$ in the standard coordinate system, then expanding an arbitrary wavefunction, let's call it $\Phi(x)$, into Dirac notation is the same as doing the Fourier transformation $$|\Phi \rangle = c_0|\psi_0\rangle + c_1 |\psi_1\rangle + ... + c_n |\psi_n\rangle ,$$ where $$c_n = \int \limits_0^L \Phi(x) \sin\left(\frac{n\pi x}{L}\right) dx .$$

In Dirac notation, you represent this by saying $| \Phi \rangle$ is the state. The overlap of the state $|\Phi\rangle$ with a state $|x\rangle$, meant to be interpreted as an eigenstate of position -- a state with definite position $x$, is

$$\langle x | \Phi \rangle = \sqrt{\cfrac{8}{5a}}\left[1+\cos\left({\cfrac{\pi x}{a}}\right)\right]\sin\left({\cfrac{\pi x}{a}}\right)$$

(using your example), that's how you "recover the wave-function form." Some people like to write $\Phi(x) = \langle x| \Phi \rangle$.

The expansion in terms of Hamiltonian Eigenstates is

$$\sum \limits_n | \psi_n \rangle \langle \psi_n | \Phi \rangle$$

Where $\langle \psi_n | \Phi \rangle = c_i$, defined with the integral shown above.

• Thank you for your explanation, it is very clear. I think I could write it down. I know the similar question has been asked. But the answer is quite abstract for me to comprehend. – Physics World Sep 24 '17 at 15:43
• Note that \Sigma$\to\Sigma$ and \sum$\to\sum$. – AccidentalFourierTransform Sep 24 '17 at 15:53
• So I think the initial state should be written as follow from your guidance: $$|\psi>=\sqrt{\cfrac{8}{5a}}(1+\cos{\cfrac{\pi x}{a}})\sin{\cfrac{\pi x}{a}}|x>$$ – Physics World Sep 24 '17 at 15:54
• Hi Physics World, yes that is basically correct, except you need an integral over states $| x \rangle$ there. What you've done there is multiply $| \psi \rangle$ with the identity operator expressed as $\mathbb{1} = \int | x \rangle \langle x | dx$. Then $| \psi \rangle = \mathbb{1} | \psi \rangle = \int | x \rangle \langle x | \psi \rangle dx = \int \psi(x) | x \rangle dx$. Again making the identification that $\langle x | \psi \rangle$ is your "wave-function". What you wrote there is $\langle x | \psi\rangle | x \rangle$ without an integral over states $| x \rangle$ – Bobak Hashemi Sep 24 '17 at 16:16
• Thanks a lot, @BobakHashemi. I have not learned that 𝟙 can be written as ∫|x⟩⟨x|dx, is there any textbook or materials that I can learn these conversions? – Physics World Sep 24 '17 at 17:19

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.

• Thanks for your comment. I can get better grasp on the idea. – Physics World Sep 24 '17 at 15:45