# Uncertainty

Wave · y = f(x, t)

`y = ∫₋₆⁶ exp(−(2 + 1.5 · sin(t)) · u²) · cos(x · u) du`

[Open in the app](https://www.wavelace.com/app#p=104) · [This page](https://www.wavelace.com/presets/uncertainty)

### What it draws

The curve is an integral, computed at every point: `y = ∫ e^(−a·u²) · cos(x·u) du` from `−6` to `6`, with `a = 2 + 1.5·sin t`. `e^(−a·u²)` is a Gaussian packet in `u`, and multiplying it by `cos(x·u)` and integrating asks how much of the frequency `x` it contains. So `y` is the Fourier transform of the packet, drawn against frequency, while the packet itself is never on screen. The limits `±6` stand in for `±∞`: the integrand there is below `10⁻⁷` even for the widest packet.

The integral has a closed form, `√(π/a) · e^(−x²/(4a))`: the transform of a Gaussian is a Gaussian. As `a` breathes between `0.5` and `3.5` every `2π ≈ 6.28` seconds at `Speed` 1, the peak at `x = 0` moves between `2.51` and `0.95`. The width goes the other way. The curve is down to `1/e` of its peak at `x = 2√a`, which runs from `1.41` to `3.74`.

### Why it breathes backwards

The packet `e^(−a·u²)` falls to `1/e` at `u = 1/√a`, so a large `a` is a narrow packet. Its transform falls to `1/e` at `x = 2√a`, and the product of the two widths is `2` whatever `a` is. Squeeze the packet and its spectrum spreads; let it spread and the spectrum sharpens. When the unseen packet is at its narrowest, the curve on screen is at its widest and lowest.

In quantum mechanics `u` is position and `x` is momentum, and this trade is the uncertainty principle. In standard deviations of the squared magnitudes, the packet has `σ = 1/(2√a)` and its transform `σ = √a`, a product of exactly `1/2`. That is the smallest value Heisenberg's inequality `σₓ·σₚ ≥ ħ/2` allows with `ħ = 1`, and the Gaussian is the only shape that reaches it.

### History

Werner Heisenberg stated the principle in 1927, with a thought experiment about a gamma-ray microscope, and Earle Kennard proved the inequality `σₓ·σₚ ≥ ħ/2` the same year. Its mathematical core is older: the tighter a function, the wider its Fourier transform, a fact of harmonic analysis that holds for sound and radar pulses just as well.

### Try

- Draw the packet instead, `exp(−(2 + 1.5·sin(t))·x²)`: the same breathing the other way round, narrowest when the transform was widest.
- Shift the packet, `integral(exp(−(2 + 1.5·sin(t))·(u − 2)²)·cos(x·u), u, −6, 6)`: the same envelope now multiplied by `cos 2x`, with its first zero at `x = π/4 ≈ 0.79`. A shift in position is a ripple in frequency.
- Change `cos` to `sin`: the curve is flat zero, because the packet is even and a sine picks up only the odd part.
- Freeze the width, `integral(exp(−2·u²)·cos(x·u), u, −6, 6)`: a still Gaussian of height `√(π/2) ≈ 1.25`.

### Read more

- [Uncertainty principle](https://en.wikipedia.org/wiki/Uncertainty_principle)
- [Fourier transform](https://en.wikipedia.org/wiki/Fourier_transform)
- [Gaussian function](https://en.wikipedia.org/wiki/Gaussian_function)
- [Wave packet](https://en.wikipedia.org/wiki/Wave_packet)
