---
title: Operators, Expectation Values, and the Harmonic Oscillator
module: Wave Mechanics in One Dimension
moduleNumber: 3
lessonNumber: 4
order: 304
summary: >
  Measurable quantities are extracted from the wave function as expectation values, and
  each observable is represented by an operator that acts between Ψ* and Ψ — position by
  multiplication, momentum by a derivative, energy by the Hamiltonian. Applied to the
  harmonic oscillator, the machinery yields evenly spaced levels E_n = (n+½)ℏω, Gaussian-
  times-Hermite eigenfunctions of definite parity, and the selection rule Δn = ±1.
topics: [Wave Mechanics in One Dimension]
draft: false
sources:
  - book: Tipler & Llewellyn
    ref: "Ch. 6 — The Schrödinger Equation; §6-4 Expectation Values and Operators, §6-5 The Simple Harmonic Oscillator, Parity"
---

A classical solution reports the position of a particle as a function of time. The
[wave nature of matter](/quantum-mechanics/matter-waves/the-uncertainty-principle) makes that
impossible: the most that can be known is the probability distribution
$|\Psi(x,t)|^2$. Predictions about measurements are therefore statistical, and they are
computed from the wave function as **expectation values**.[^tl-64]

## Expectation values

The expectation value of position is the average of $x$ weighted by the probability
density, the value obtained by measuring $x$ on a large number of identically prepared
particles:

$$
\langle x\rangle = \int_{-\infty}^{\infty}\Psi^\ast(x,t)\,x\,\Psi(x,t)\,\d x.
$$

For a [stationary state](/quantum-mechanics/wave-mechanics-1d/the-schrodinger-equation-in-one-dimension)
the time-dependent phase cancels in $\Psi^\ast\Psi$, so

$$
\langle x\rangle = \int_{-\infty}^{\infty}\psi^\ast(x)\,x\,\psi(x)\,\d x.
$$

For the [infinite square well](/quantum-mechanics/wave-mechanics-1d/particle-in-infinite-and-finite-square-wells)
the density $|\psi_n|^2$ is symmetric about the midpoint, so $\langle x\rangle = L/2$ for
every $n$, whether by symmetry or direct integration.

> **Definition (Expectation value).** The probability-weighted mean of an observable.
> For any function of position,
> $$
> \langle f(x)\rangle = \int_{-\infty}^{\infty}\psi^\ast\,f(x)\,\psi\,\d x,
> $$
> the average of many measurements on identically prepared systems, not necessarily a
> value any single measurement can return.

The last clause matters. For even $n$ in the well, $\psi_n(L/2) = 0$, so the probability
of measuring $x = L/2$ is zero — yet $\langle x\rangle = L/2$, because the density is
symmetric about that point. The expectation value is a mean, not a prediction of one
outcome.

$$
% caption: The expectation value is the balance point of the probability density: each
% slice of x contributes weighted by the height of the modulus-squared curve, and the
% mean sits under the centroid.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black] (-0.2,0) -- (6.4,0) node[right, font=\scriptsize, text=black] {$x$};
  % skewed density hump
  \draw[acc, thick] (0.2,0) .. controls (1.6,0.3) and (2.0,2.4) .. (2.9,2.4)
    .. controls (3.9,2.4) and (5.2,0.6) .. (6.1,0);
  \node[acc, font=\scriptsize, anchor=south east] at (2.9,2.4) {density};
  % weighting bars
  \foreach \xx/\hh in {1.2/0.5, 1.9/1.55, 2.6/2.3, 3.3/2.25, 4.0/1.55, 4.7/0.85} {
    \draw[black] (\xx,0) -- (\xx,\hh);
  }
  % mean marker
  \draw[acc, very thick, dashed] (3.15,0) -- (3.15,2.55);
  \fill[acc] (3.15,0) circle (2.2pt);
  \node[acc, font=\scriptsize, anchor=north] at (3.15,-0.12) {mean};
\end{tikzpicture}
$$

## Operators

Position is easy because it is just a number multiplying $\psi$. Momentum is not: by the
uncertainty principle $p$ cannot be written as a function of $x$, so $\langle p\rangle$
cannot be computed as $\int\psi^\ast p(x)\psi\,\d x$. Momentum is instead represented by a
differential **operator** acting on the wave function.

> **Definition (Momentum operator).** The $x$ component of momentum is represented by
> $$
> p_{\text{op}} = \frac{\hbar}{i}\frac{\partial}{\partial x},
> $$
> and its expectation value is
> $$
> \langle p\rangle = \int_{-\infty}^{\infty}\Psi^\ast\,\frac{\hbar}{i}\frac{\partial \Psi}{\partial x}\,\d x.
> $$

The operator sits _between_ $\Psi^\ast$ and $\Psi$, acting on $\Psi$ to its right. For a
multiplicative operator like $f(x)$ the placement is immaterial, but for a derivative it
is essential: $\Psi^\ast\,\partial_x\Psi \ne (\partial_x\Psi^\ast)\,\Psi$ in general.
Squaring the operator gives $\langle p^2\rangle$:

$$
\langle p^2\rangle = \int_{-\infty}^{\infty}\Psi^\ast\Big(\frac{\hbar}{i}\frac{\partial}{\partial x}\Big)\Big(\frac{\hbar}{i}\frac{\partial}{\partial x}\Big)\Psi\,\d x
= -\hbar^2\int_{-\infty}^{\infty}\Psi^\ast\frac{\partial^2\Psi}{\partial x^2}\,\d x.
$$

**Momentum in the ground state.** For the well's ground state $\psi_1 = \sqrt{2/L}\sin(\pi x/L)$,

$$
\langle p\rangle = \frac{\hbar}{i}\frac{2}{L}\int_0^L \sin\frac{\pi x}{L}\,\frac{\pi}{L}\cos\frac{\pi x}{L}\,\d x = 0,
$$

since the particle is equally likely to move in either direction. But $\langle p^2\rangle$
is not zero:

$$
p_{\text{op}}^2\,\psi_1 = -\hbar^2\frac{\d^2\psi_1}{\d x^2} = \hbar^2\frac{\pi^2}{L^2}\psi_1
\quad\Longrightarrow\quad
\langle p^2\rangle = \frac{\hbar^2\pi^2}{L^2} = 2mE_1.
$$

A vanishing mean momentum with a nonzero mean-square momentum is the signature of a
standing wave: equal parts moving left and right, so the average cancels while the
average of the square does not.[^tl-ex65]

### The Hamiltonian operator

Writing the classical energy $H = p^2/2m + V$ and replacing $p$ by $p_{\text{op}}$ turns
the total energy into the **Hamiltonian operator**:

$$
H_{\text{op}} = \frac{p_{\text{op}}^2}{2m} + V(x) = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2} + V(x).
$$

The [time-independent Schrödinger equation](/quantum-mechanics/wave-mechanics-1d/the-schrodinger-equation-in-one-dimension)
compresses to an eigenvalue equation,

$$
H_{\text{op}}\,\psi = E\,\psi,
$$

read as: the stationary states are the eigenfunctions of the Hamiltonian, and the allowed
energies are its eigenvalues. This form generalizes cleanly — write the classical energy
in terms of position and momentum, replace each momentum by its operator, and the
Hamiltonian for many particles in three dimensions follows the same way, as it does for
[hydrogen](/quantum-mechanics/central-potentials/the-hydrogen-atom).

| Physical quantity | Operator |
| --- | --- |
| Function of position $f(x)$ | $f(x)$ (multiply) |
| $x$ component of momentum $p_x$ | $\dfrac{\hbar}{i}\dfrac{\partial}{\partial x}$ |
| Kinetic energy $E_k$ | $-\dfrac{\hbar^2}{2m}\dfrac{\partial^2}{\partial x^2}$ |
| Total energy (Hamiltonian) | $-\dfrac{\hbar^2}{2m}\dfrac{\partial^2}{\partial x^2} + V(x)$ |
| Total energy (time form) | $i\hbar\,\dfrac{\partial}{\partial t}$ |

Each observable is a rule for acting on $\psi$; its expectation value is the sandwich
$\int\psi^\ast(\text{operator})\psi\,\d x$.

## The simple harmonic oscillator

The next solvable potential is the harmonic oscillator, the parabolic well

$$
V(x) = \tfrac12 K x^2 = \tfrac12 m\omega^2 x^2,
\qquad \omega = \sqrt{K/m} = 2\pi f.
$$

Its importance is that any smooth potential near a minimum is parabolic to leading order,
so the oscillator describes the vibration of molecules in gases and solids and the normal
modes of a crystal.[^tl-65] Classically a particle of energy $E$ oscillates between the
**turning points** $x = \pm A$ where the kinetic energy vanishes,

$$
E = \tfrac12 m\omega^2 A^2,
$$

and any energy $E \ge 0$ is allowed, with the lowest being $E = 0$ (the particle at rest
at the origin).

The Schrödinger equation for this potential is

$$
-\frac{\hbar^2}{2m}\frac{\d^2\psi}{\d x^2} + \tfrac12 m\omega^2 x^2\,\psi = E\psi.
$$

The exact solution uses Hermite's differential equation, but the qualitative structure
follows from the [curvature rule](/quantum-mechanics/wave-mechanics-1d/the-schrodinger-equation-in-one-dimension)
alone. For $|x| < A$ the energy exceeds the potential, so $\psi$ curves toward the axis
and oscillates; for $|x| > A$ the potential exceeds the energy, so $\psi$ curves away and
must decay. Only special energies give a solution that decays on both sides. They are
evenly spaced:

$$
E_n = \Big(n + \tfrac12\Big)\hbar\omega, \qquad n = 0, 1, 2, \dots
$$

> **Theorem (Harmonic-oscillator levels).** The energies of the quantum harmonic
> oscillator are $E_n = (n+\tfrac12)\hbar\omega$, uniformly spaced by $\hbar\omega$, with
> ground-state energy $E_0 = \tfrac12\hbar\omega$. The zero-point energy $\tfrac12\hbar\omega$
> is the least energy compatible with the uncertainty principle.

Two features separate this from the square well. The spacing is _constant_, $\hbar\omega$,
rather than growing as $n^2$; and the ground state $E_0 = \tfrac12\hbar\omega$ is nonzero,
just as the well has a nonzero $E_1$.

$$
% caption: The parabolic potential holds equally spaced levels separated by one quantum
% hbar omega; every allowed transition obeying Delta n equals one releases or absorbs the
% same energy, the classical oscillation frequency times h.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % parabola  y = x^2 style, apex at origin, up to y=4 at x = +/- 2
  \draw[black, thick] (-2,4) .. controls (-1.1,0.35) and (-0.5,0) .. (0,0)
    .. controls (0.5,0) and (1.1,0.35) .. (2,4);
  \draw[black] (-2.4,0) -- (2.4,0) node[right, font=\scriptsize, text=black] {$x$};
  \node[black!70, font=\scriptsize, anchor=south west] at (1.35,2.9) {$V(x)$};
  % levels at heights h = (n+0.5)*something; use spacing 0.7, start 0.5
  \foreach \n/\h/\xt in {0/0.5/0.707, 1/1.2/1.095, 2/1.9/1.378, 3/2.6/1.612, 4/3.3/1.817} {
    \draw[acc, thick] (-\xt,\h) -- (\xt,\h);
    \node[acc, font=\scriptsize, anchor=west] at (2.5,\h) {$n = \n$};
  }
  \node[acc, font=\scriptsize, anchor=east] at (-2.55,0.5) {$E_0$};
  % transition arrows (equal length between adjacent levels)
  \draw[->, black!70, thick] (0.25,1.9) -- (0.25,1.2);
  \draw[->, black!70, thick] (-0.25,1.2) -- (-0.25,0.5);
  \node[black!70, font=\scriptsize, anchor=west] at (0.32,1.55) {equal gaps};
\end{tikzpicture}
$$

### The eigenfunctions

The solutions are a Gaussian envelope multiplied by a **Hermite polynomial** $H_n$ of
degree $n$:

$$
\psi_n(x) = C_n\,e^{-m\omega x^2/2\hbar}\,H_n(x),
$$

with $C_n$ fixed by normalization. The lowest three, in the shorthand
$A_n$ for the normalization constants, are

$$
\psi_0 = A_0\,e^{-m\omega x^2/2\hbar},
\qquad
\psi_1 = A_1\,\sqrt{\tfrac{m\omega}{\hbar}}\,x\,e^{-m\omega x^2/2\hbar},
\qquad
\psi_2 = A_2\Big(1 - \tfrac{2m\omega x^2}{\hbar}\Big)e^{-m\omega x^2/2\hbar}.
$$

The ground state is a pure Gaussian bell, the minimum-uncertainty wave packet; each higher
state adds one node. The polynomial degree equals $n$, so $\psi_n$ has $n$ zeros.

$$
% caption: The first three oscillator states: a Gaussian ground state, an antisymmetric
% first excited state with one node, and a symmetric second state with two nodes, each
% under a Gaussian envelope.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \foreach \row/\lab in {0/0, 1/1, 2/2} {
    \draw[black] ({-2.6},{\row*2.0}) -- ({2.6},{\row*2.0});
    \node[acc, font=\scriptsize, anchor=west] at (2.7,{\row*2.0}) {$n = \lab$};
  }
  % n = 0 Gaussian bump (bottom row y=0)
  \draw[acc, very thick] (-2.4,0.02) .. controls (-1.0,0.05) and (-0.7,1.0) .. (0,1.0)
    .. controls (0.7,1.0) and (1.0,0.05) .. (2.4,0.02);
  % n = 1 antisymmetric (middle row y=2)
  \draw[acc, very thick] (-2.4,2.0) .. controls (-1.5,2.05) and (-1.2,2.9) .. (-0.6,2.75)
    .. controls (-0.2,2.6) and (0.2,1.4) .. (0.6,1.25)
    .. controls (1.2,1.1) and (1.5,1.95) .. (2.4,2.0);
  % n = 2 symmetric two nodes (top row y=4)
  \draw[acc, very thick] (-2.4,4.0) .. controls (-1.7,4.05) and (-1.5,4.75) .. (-1.05,4.7)
    .. controls (-0.6,4.65) and (-0.45,3.35) .. (0,3.35)
    .. controls (0.45,3.35) and (0.6,4.65) .. (1.05,4.7)
    .. controls (1.5,4.75) and (1.7,4.05) .. (2.4,4.0);
  \draw[black, dashed] (0,-0.6) -- (0,4.9);
  \node[black, font=\scriptsize, anchor=north] at (0,-0.55) {$x = 0$};
\end{tikzpicture}
$$

At large $n$ the probability density $|\psi_n|^2$ develops $n$ peaks and, smeared over a
detector window, approaches the classical distribution, which piles up near the turning
points where the particle moves slowest. This is the
[correspondence principle](/quantum-mechanics/wave-mechanics-1d/particle-in-infinite-and-finite-square-wells) again,
now for the oscillator.

## Parity

The oscillator potential is symmetric, $V(-x) = V(x)$, so the Hamiltonian is unchanged by
the reflection $x \to -x$. This operation is **parity**, denoted $P$. If $\psi(x)$ solves
$H_{\text{op}}\psi = E\psi$, then $\psi(-x)$ solves the same equation with the same energy.
When the level is nondegenerate, $\psi(-x)$ can differ from $\psi(x)$ only by a constant
$C$, and applying $P$ twice gives $C^2 = 1$, so $C = \pm 1$.

> **Definition (Parity).** The behavior of $\psi$ under $x \to -x$. A state has **even
> parity** if $\psi(-x) = \psi(x)$ and **odd parity** if $\psi(-x) = -\psi(x)$. For a
> symmetric potential every nondegenerate stationary state has definite parity; the terms
> even and odd describe the reflection symmetry, not whether $n$ is even or odd.

For the oscillator, states with even $n$ are even and states with odd $n$ are odd: $\psi_0$
and $\psi_2$ are symmetric, $\psi_1$ is antisymmetric. Parity organizes the states of every
symmetric system and returns in the analysis of
[atomic and particle transitions](/atomic-physics/radiative-transitions-and-line-shapes/dipole-approximation-einstein-coefficients).

$$
% caption: An even state maps onto itself under reflection through the origin; an odd
% state maps onto its own negative, matching magnitude but flipping sign across x equals
% zero.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % even panel
  \draw[black] (-2.2,0) -- (2.2,0) node[right, font=\scriptsize, text=black]{$x$};
  \draw[black, dashed] (0,-1.3) -- (0,1.5);
  \draw[acc, very thick] (-2.0,0.05) .. controls (-0.9,0.1) and (-0.6,1.2) .. (0,1.2)
    .. controls (0.6,1.2) and (0.9,0.1) .. (2.0,0.05);
  \node[font=\scriptsize, text=black] at (0,-1.65) {even: maps onto itself};
  % odd panel
  \begin{scope}[xshift=6.0cm]
    \draw[black] (-2.2,0) -- (2.2,0) node[right, font=\scriptsize, text=black]{$x$};
    \draw[black, dashed] (0,-1.3) -- (0,1.5);
    \draw[acc, very thick] (-2.0,-0.05) .. controls (-1.1,-0.1) and (-0.7,-1.1) .. (0,0)
      .. controls (0.7,1.1) and (1.1,0.1) .. (2.0,0.05);
    \node[font=\scriptsize, text=black] at (0,-1.65) {odd: mirror, sign reversed};
  \end{scope}
\end{tikzpicture}
$$

## Transitions and the selection rule

A stationary state does not radiate; its density is time-independent. Emission or
absorption of light requires a superposition of two states whose combined density
oscillates. The strength of a dipole transition between states $n$ and $m$ is governed by
the integral $\int \psi_n\, x\, \psi_m\,\d x$, which for the oscillator has the property

$$
\int_{-\infty}^{\infty}\psi_n\,x\,\psi_m\,\d x = 0 \quad\text{unless}\quad n - m = \pm 1.
$$

Parity makes this immediate: $x$ is odd, so the product $\psi_n\,x\,\psi_m$ integrates to
zero over the symmetric range unless $\psi_n$ and $\psi_m$ have opposite parity, and for
the oscillator opposite parity plus a nonzero integral forces $|n - m| = 1$. The result is
a **selection rule**.

> **Selection rule ($\Delta n = \pm 1$).** Electric-dipole transitions of the harmonic
> oscillator connect only adjacent levels, $\Delta n = \pm 1$. Since adjacent levels are
> separated by $\hbar\omega$, every emitted or absorbed photon has energy $\hbar\omega$
> and frequency $f = \omega/2\pi$, the classical oscillation frequency.

The equal spacing and the $\Delta n = \pm 1$ rule together give a single emission line at
the classical frequency. This is the assumption
[Planck](/quantum-mechanics/old-quantum-theory/blackbody-radiation-and-the-planck-quantum) built into the
blackbody derivation: an oscillator exchanges energy with the field only in units of
$\hbar\omega$. When the potential is not symmetric or the barrier is finite, the states are
no longer confined, which is the setting for
[reflection, transmission, and tunneling](/quantum-mechanics/wave-mechanics-1d/barrier-penetration-and-quantum-tunneling).

[^tl-64]: **Tipler & Llewellyn**, _Modern Physics_, §6-4 — expectation values as probability-weighted averages, the momentum operator $p_{\text{op}} = (\hbar/i)\partial_x$, operator ordering, and the Hamiltonian form $H_{\text{op}}\psi = E\psi$ (Table 6-1).
[^tl-ex65]: **Tipler & Llewellyn**, _Modern Physics_, §6-4, Example 6-5 — $\langle p\rangle = 0$ and $\langle p^2\rangle = \hbar^2\pi^2/L^2 = 2mE_1$ for the infinite-well ground state.
[^tl-65]: **Tipler & Llewellyn**, _Modern Physics_, §6-5 — the simple harmonic oscillator: classical turning points, the levels $E_n = (n+\tfrac12)\hbar\omega$, the Gaussian-times-Hermite eigenfunctions, and the $\Delta n = \pm 1$ selection rule.
