My favourite example is as follows. Let the simple curve $\kappa:[0,1]\to K\subset \mathbb{R}^2$ be a parametrization of (half of) the Koch curve, and let $\phi:K\to[0,1]$ be its inverse; it is a continuous function, and, due to the fact that $\kappa$ has infinite variation on any non-empty interval $J\subset [0,1]$, it verifies $$|\phi(x)-\phi(y)|=o(|x-y|)$$ uniformly on $K$. Therefore the data $\phi$ together with the zero field on $K$ verify the hypotheses of the Whitney extension theorem for the case of $C^1$ regularity. Thus $\phi$ extends to a $C^1$ function $f:\mathbb{R}^2\to\mathbb{R}$ whose gradient vanishes identically on $K$.
Pietro Majer
- 60.6k
- 4
- 122
- 269