Sobolev Spaces
Sobolev spaces hold functions whose slopes carry finite energy. Kinks are welcome but wild oscillation is not, which makes them the natural home for PDE solutions and regularized models.
Why Does This Exist?
Classical calculus demands smooth solutions, but physics and learning keep producing kinks: ReLU activations, shock fronts, contact boundaries. Rejecting every non-smooth function leaves the equations unsolvable and the models unanalyzable. Sobolev spaces fix the membership rule: functions qualify when they and their weak derivatives carry finite energy, kinks included.
This page defines and prices one kinked function exactly. Integration behind weak derivatives is Lebesgue integration; the complete-room property is real analysis.
The one idea you need first
A weak derivative moves differentiation onto smooth test functions via integration by parts: weakly when for all smooth compactly supported . energy keeps functions and slopes square-integrable.
Think of It Like This
A building code for ramps
A building code allows ramps with one sharp turn (a kink) but bans staircases to nowhere and infinitely wiggly slides. Inspectors check two meters: total material (function energy) and total steepness (slope energy). Pass both and the ramp opens.
Sobolev membership is that inspection. Absolute value passes: finite material, slopes almost everywhere. Where it stops: the code varies by dimension. In high dimensions members can still be discontinuous; extra derivatives buy back continuity through embedding theorems.
How It Actually Works
The Sobolev space holds whose weak first derivatives sit in too, with energy norm:
In plain words: the first integral prices size, the second prices wiggle, and both must stay finite. is Hilbert under the matching inner product, so projections and Ritz-Galerkin approximations converge inside it. The ReLU belongs to locally (weak slope /); the step function does not (its derivative is a Dirac mass, not ).
Worked example
on . Size: . Weak derivative left, right (integration by parts skips the single kink point of measure zero). Slope energy: . Total: .
So with energy . A jump function would add infinite slope energy through its distributional spike and fail; the kink's single point costs nothing.
Code
Finite differences estimate both energies and land near the hand values.
import numpy as np
def h1_energy(n: int = 20001) -> tuple[float, float, float]: x = np.linspace(-1.0, 1.0, n) # dense grid over minus 1 to 1 f = np.abs(x) dx = x[1] - x[0] size = float((f**2).sum() * dx) # Riemann sum for L2 part slope = np.diff(f) / dx # weak slope almost everywhere wiggle = float((slope**2).sum() * dx) return size, wiggle, size + wiggle
print([round(v, 3) for v in h1_energy()]) # -> [0.667, 2.0, 2.667]Size , wiggle , total : the split, recovered numerically.
Watch Out For
Differentiating across the kink naively
Symptom: finite-difference code evaluates exactly at , returns or garbage, and energy estimates wobble with grid alignment. Fix: kinks have measure zero; offset grids or one-sided differences and never trust the single kink sample.
Assuming H1 means continuous in all dimensions
Symptom: a 3D function blows up at a point while analysis assumes pointwise values exist. Fix: in dimension , does not embed into continuous functions; need with for pointwise control.
The Quick Version
- collects functions with weak derivatives, normed by size plus wiggle energy.
- on has energy : size plus slope.
- Kinks cost nothing (measure zero); jumps cost infinity and fail membership.
- is Hilbert, so Galerkin projections converge inside it.
- Continuity needs more derivatives in higher dimensions via Sobolev embeddings.