# Infinite square well parities

I have an infinite square well centred at the origin, I get a wavefunction corresponding to even values of $n$ and an odd wavefunction corresponding to odd values of $n$. If I wanted to calculate the expectation value of position, do I calculate: $$\left<x \right>=\int x|\psi_\mathrm{even}|^2\ \mathrm dx+\int x|\psi_\mathrm{odd}|^2\ \mathrm dx$$ This was my intuitive guess, but something seems wrong about this. If I did this, this first integral would yield something containing even $n$ while the right integral would give even $n$. Can I really just add these two or do I have to do something else?

• What is the state you are considering ? Is it one of the eigenstate of the Hamiltonian, or is it a linear combination ? – Adam Aug 23 '17 at 8:19

Nope, that's completely bogus. Since both $\psi_\mathrm{even}$ and $\psi_\mathrm{odd}$ have definite parity, $|\psi_\mathrm{even}|^2$ and $|\psi_\mathrm{odd}|^2$ are even, and therefore both of the integrals you've written vanish identically.
To do things properly, you take your wavefunction and you write it in terms of its even and odd parts, $$\psi(x)=\psi_\mathrm{even}(x)+\psi_\mathrm{odd}(x)$$ where $\psi_\mathrm{even}(x) = \frac12(\psi(x)+\psi(-x))$ and $\psi_\mathrm{odd}(x) = \frac12(\psi(x)-\psi(-x))$, and you plug the decomposition into the integral to get \begin{align} ⟨x⟩ &= \int x|\psi(x)|^2\mathrm dx \\ & = \int x|\psi_\mathrm{even}(x)+\psi_\mathrm{odd}(x)|^2\mathrm dx \\ & = \int x|\psi_\mathrm{even}(x)|^2\mathrm dx +\int x|\psi_\mathrm{odd}(x)|^2\mathrm dx \\ & \qquad +\int x\psi_\mathrm{even}^*(x)\psi_\mathrm{odd}(x)\mathrm dx +\int x\psi_\mathrm{even}(x)\psi_\mathrm{odd}^*(x)\mathrm dx \\ & = \int x\left(\psi_\mathrm{even}^*(x)\psi_\mathrm{odd}(x) + \psi_\mathrm{even}(x)\psi_\mathrm{odd}^*(x)\right)\mathrm dx, \end{align} because the self terms vanish. The cross terms, on the other hand, have an even global parity and therefore they need not vanish.