Skip to content
AI360Xpert
Beta

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.

A V-shaped kink carries slope minus 1 left and plus 1 right, both square integrable, so the function belongs to H1
A V-shaped kink carries slope minus 1 left and plus 1 right, both square integrable, so the function belongs to H1

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 H1H^1 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: g=f′g = f' weakly when ∫fϕ′=−∫gϕ\int f \phi' = -\int g \phi for all smooth compactly supported ϕ\phi. L2L^2 energy ∫∣f∣2<∞\int |f|^2 < \infty 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 ±1\pm 1 almost everywhere. Where it stops: the code varies by dimension. In high dimensions H1H^1 members can still be discontinuous; extra derivatives buy back continuity through embedding theorems.

How It Actually Works

The Sobolev space H1(Ω)H^1(\Omega) holds f∈L2(Ω)f \in L^2(\Omega) whose weak first derivatives sit in L2L^2 too, with energy norm:

∥f∥H12=∫Ω∣f∣2+∫Ω∣∇f∣2\|f\|_{H^1}^2 = \int_\Omega |f|^2 + \int_\Omega |\nabla f|^2

In plain words: the first integral prices size, the second prices wiggle, and both must stay finite. H1H^1 is Hilbert under the matching inner product, so projections and Ritz-Galerkin approximations converge inside it. The ReLU x↦max⁡(0,x)x \mapsto \max(0,x) belongs to H1H^1 locally (weak slope 00/11); the step function does not (its derivative is a Dirac mass, not L2L^2).

Worked example

f(x)=∣x∣f(x) = |x| on (−1,1)(-1, 1). Size: ∫−11x2dx=[x3/3]−11=2/3\int_{-1}^{1} x^2 dx = [x^3/3]_{-1}^{1} = 2/3. Weak derivative g(x)=−1g(x) = -1 left, +1+1 right (integration by parts skips the single kink point of measure zero). Slope energy: ∫−1112dx=2\int_{-1}^{1} 1^2 dx = 2. Total: ∥f∥H12=2/3+2=8/3≈2.667\|f\|_{H^1}^2 = 2/3 + 2 = 8/3 \approx 2.667.

So ∣x∣∈H1|x| \in H^1 with energy 2.672.67. 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 0.6670.667, wiggle 2.02.0, total 2.6672.667: the 2/3+2=8/32/3 + 2 = 8/3 split, recovered numerically.

Watch Out For

Differentiating across the kink naively

Symptom: finite-difference code evaluates exactly at x=0x = 0, returns 00 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 H1H^1 function blows up at a point while analysis assumes pointwise values exist. Fix: in dimension d≥2d \ge 2, H1H^1 does not embed into continuous functions; need HsH^s with s>d/2s > d/2 for pointwise control.

The Quick Version

  • H1H^1 collects L2L^2 functions with L2L^2 weak derivatives, normed by size plus wiggle energy.
  • ∣x∣|x| on (−1,1)(-1,1) has energy 8/3≈2.678/3 \approx 2.67: 2/32/3 size plus 22 slope.
  • Kinks cost nothing (measure zero); jumps cost infinity and fail membership.
  • H1H^1 is Hilbert, so Galerkin projections converge inside it.
  • Continuity needs more derivatives in higher dimensions via Sobolev embeddings.