# 1.69: The Wigner Distribution Function for the Harmonic Oscillator


Given the quantum number this Mathcad file calculates the Wigner distribution function for the specified harmonic oscillator eigenstate using the coordinate wave function.

Quantum number: $$n :=4$$

Harmonic oscillator coordinate eigenstate:

$\Psi(\mathrm{n}, \mathrm{x}) :=\frac{1}{\sqrt{2^{\mathrm{n}} \cdot \mathrm{n} ! \sqrt{\pi}}} \cdot \operatorname{Her}(\mathrm{n}, \mathrm{x}) \cdot \exp \left(-\frac{\mathrm{x}^{2}}{2}\right) \nonumber$

Display coordinate wave function and distribution function:

Calculate Wigner distribution:

$\mathrm{W}(\mathrm{n}, \mathrm{x}, \mathrm{p}) :=\frac{1}{\pi^{\frac{3}{2}}} \cdot \int_{-\infty}^{\infty} \Psi\left(\mathrm{n}, \mathrm{x}+\frac{\mathrm{s}}{2}\right) \cdot \exp (\mathrm{i} \cdot \mathrm{s} \cdot \mathrm{p}) \cdot \Psi\left(\mathrm{n}, \mathrm{x}-\frac{\mathrm{s}}{2}\right) \mathrm{ds} \nonumber$

Display Wigner distribution:

$\mathrm{N} :=80 \qquad \mathrm{i} :=0 \ldots \mathrm{N} \qquad \mathrm{x}_{\mathrm{i}}=-4+\frac{8 \cdot \mathrm{i}}{\mathrm{N}} \\ \mathrm{j} :=0 \ldots \mathrm{N} \qquad \mathrm{p}_{\mathrm{j}}=-5+\frac{10 \cdot \mathrm{j}}{\mathrm{N}} \qquad \text{Wigner}_{i,j} : = W(n, x_{i}, p_{j}) \nonumber$

Calculate the momentum distribution function using the Wigner function:

$\rho(\mathrm{p}) :=\int_{-\infty}^{\infty} \mathrm{W}(\mathrm{n}, \mathrm{x}, \mathrm{p}) \mathrm{dx} \qquad \mathrm{p} :=-5,-4.95 \ldots5 \nonumber$

This page titled 1.69: The Wigner Distribution Function for the Harmonic Oscillator is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Frank Rioux via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.