Description of Orthogonality of the wave functions of a particle in one dimension box or infinite potential well:

Let $\psi_{n}(x)$ and $\psi_{m}(x)$ be the normalized wave functions of a particle in the interval $(0, L)$ corresponding to the different energy level $E_{n}$ and $E_{m}$ respectively. These wave functions are:

$\psi_{n}(x)= \sqrt{\frac{2}{L}} sin \frac{n \pi x}{L}$

$\psi_{m}(x)= \sqrt{\frac{2}{L}} sin \frac{m \pi x}{L}$

Where $m$ and $n$ are integers.

In this function are real. Therefore

$\psi_{n}^{*}(x) = \psi_{n}(x)$

$\psi_{m}^{*}(x) = \psi_{m}(x)$

Where $m=n$,

$\int_{0}^{L} \psi_{n}^{*}(x) \psi_{m}^{*}(x) dx = \frac{2}{L} \int_{0}^{L} sin \frac{m \pi x}{L} . sin \frac{n \pi x}{L} dx$

$\int_{0}^{L} \psi_{n}^{*}(x) \psi_{m}^{*}(x) dx =\frac{1}{L} \int_{0}^{L} \left[ cos \left\{ \frac{(m-n) \pi x}{L} \right\} - cos \left\{ \frac{(m+n) \pi x}{L} \right\} \right] dx $

$\int_{0}^{L} \psi_{n}^{*}(x) \psi_{m}^{*}(x) dx =\frac{1}{L} \left[ \frac{L}{\pi(m-n)} sin \left\{ \frac{(m-n) \pi x}{L} \right\} - \frac{L}{\pi(m+n)} sin \left\{ \frac{(m+n) \pi x}{L} \right\} \right]_{0}^{L} $

$\int_{0}^{L} \psi_{n}^{*}(x) \psi_{m}^{*}(x) dx =\frac{1}{L} \left[ \frac{L}{\pi(m-n)} sin \left\{ \frac{(m-n) \pi x}{L} \right\} - \frac{L}{\pi(m+n)} sin \left\{ \frac{(m+n) \pi x}{L} \right\} \right]_{0}^{L} $

$\int_{0}^{L} \psi_{n}^{*}(x) \psi_{m}^{*}(x) dx =0$

Hence, The function is mutually orthogonal in the interval $(0, L)$. These functions $\psi_{n}(x)$ and $\psi_{m}(x)$ are also normalized in this interval. The wave function, which is normalized and mutually orthogonal in an interval is said to form an orthogonal set in this interval. Since the wave function are zero outside the interval $(0, L)$, they are also orthogonal wave function in the whole range of $x$ axis in the interval $(-\infty, +\infty)$.