# A counterexample for Sard's theorem in $C^1$ regularity

I can't seem to find an example of a function $f \colon \mathbb{R}^2\to \mathbb{R}$ which is $C^1$ and such that the set of its critical values is not of zero measure.

What examples are there? $\phantom{aaa}$

• Remark: the question originally asked by the OP asked about functions $\mathbb{R}^2 \to \mathbb{R}$. An edit (by another party?) changed the question to be about $\mathbb{R}^2 \to \mathbb{R}^2$, which is why there are two different flavors of answers below, some addressing the original question, and some addressing the updated one. – Willie Wong Mar 18 '18 at 2:11
• I re-edited the question to its original form about functions from $\mathbb{R}^2$ to $\mathbb{R}$. – Piotr Hajlasz Mar 18 '18 at 14:22

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 can be chosen in such a way that it satisfies $$|\phi(x)-\phi(y)|=o(|x-y|)$$ uniformly on $$K$$. Therefore the data $$\phi$$ together with the zero field on $$K$$ satisfy 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$$.

$$*$$ Details. The standard parametrization of the Koch curve may be defined as the unique bounded function $$\kappa:[0,1]\to\mathbb{C}$$ satisfying the (linear, non-homogeneous) functional equation

$$3\kappa(x)=\cases{\kappa(4x)& if \;0\le x< {1\over4}\\\\ 1+e^{i\pi/3}\kappa(4x-1)& if \;{1\over4}\le x< {2\over4}\\\\ 1+e^{i\pi/3}-e^{i\pi/3}\kappa(4x-2)& if \;{2\over4}\le x< {3\over4}\\\\ 2+\kappa(4x-3)& if \;{3\over4}\le x\le 1}$$

that is $$\kappa$$ is the fixed point of an affine $$1/3$$-norm contraction on the Banach space of $$\mathbb{C}$$-valued bounded functions on $$[0,1]$$, whence its existence and uniqueness. It also follows from this, that $$\kappa$$ is $$\alpha$$-Hölder, with $$\alpha:={\log3\over\log4}$$, and in fact, for some constants $$0 it verifies, for all $$x$$ and $$y$$ in $$[0,1]$$ $$c|x-y|^\alpha\le|\kappa(x)-\kappa(y)|\le C|x-y|^\alpha,$$

which implies that its inverse $$\phi$$ satisfies a Hölder condition with exponent $$1/\alpha$$, larger than $$1$$ (a phenomenon that is not possible for non-constant functions on an interval, or more generally on metric spaces connected by rectifiable curves); in particular, it satisfies the stated $$|\phi(x)-\phi(y)|=o(|x-y|)$$.

• Very interesting. I actually had not heard about Whitney's extension theorem (Tras. AMS 1934) before. It is a very neat analogue to Tietze-Urysohn extension theorem. – BigM Dec 27 '16 at 23:13
• For generalizations of this example see mathscinet.ams.org/mathscinet-getitem?mr=1991757 – Piotr Hajlasz Mar 16 '18 at 20:50
• $\kappa$ having infinite variation is not sufficient to get the estimate on $\phi$: build "one third" of the Koch snowflake starting from the trivial map $\gamma_0:[0,1]\to\mathbb R^2$ (with $\gamma_0(t)=(t,0)$), subdividing $[0,1]$ into three thirds and replacing the straight segment with a tent on the middle interval (thus obtaining $\gamma_1$), and so on. The limiting map $f_\infty:[0,1]\to\mathbb R^2$ will have $f_\infty(0)=(0,0)$ and $f_\infty(3^{-k})=(3^{-k},0)$! Maybe you are reparametrizing by arclength before taking the limit? (I don't know how to deal with $f_\infty$ in that case...) – Mizar Jun 8 '18 at 16:24
• Ah yes, now it's clear! So at each iteration you are reparametrizing by arclength, right? If you don't do that, having infinite variation does not give $|\phi(x)-\phi(y)|=o(|x-y|)$ (this fails if you don't reparametrize by arclength, as I was saying in my previous comment). – Mizar Apr 13 '19 at 11:43
• (I edited and added details and rectified the unclear sentence about infinite variation. Thank you!) – Pietro Majer Apr 13 '19 at 16:41

If $$f\in C^1(\mathbb{R}^2,\mathbb{R})$$, then the set of critical values may have positive measure.

The classical construction due to Whitney was mentioned in the answer by T. Amdeberhan. However, the simplest one is due to E.L.Grinberg. The idea is as follows:

If $$C$$ is the Cantor middle thirds set, then $$C+C=[0,2]$$.

There is a $$C^1$$ function $$g:\mathbb{R}\to\mathbb{R}$$ such that the critical values of $$g$$ contain $$C$$.

Now $$f:\mathbb{R}^2\to\mathbb{R}$$ defined by $$f(x,y)=g(x)+g(y)$$ is of class $$C^1$$ and $$C+C=[0,2]$$ is contained in the set of critical values of $$f$$.

This has been known for some time, including the higher-dimensional problem, in $\mathbb{R}^n$, that if $f\in C^k$ where $k<n$ then the set of critical points need not be of zero measure.

H. Whitney, A function not constant on a connected set of its critical points, Duke Math. J. 1 (1935), 514-517.

I decided to challenge myself to make pictures of Piotr Hajlasz's example, partly for fun and partly for the next time I teach this. Let $$C_3$$ be the standard Cantor middle thirds set: $$C_3 = \left\{ \sum_{k=1}^{\infty} \frac{a_k}{3^k} : a_1, a_2, a_3, \cdots, \in \{ 0,2 \} \right\}.$$ Let $$C_4$$ be the variant "middle halves set" $$C_4 = \left\{ \sum_{k=1}^{\infty} \frac{b_k}{4^k} : b_1, b_2, b_3, \cdots, \in \{ 0,3 \} \right\}.$$ Note that every $$z$$ in $$[0,1]$$ can be written as $$(2/3) x + (1/3) y$$ for $$x$$, $$y \in C_4$$ in either $$1$$ or $$2$$ ways. Here is a drawing of $$C_4 \times C_4$$ and its intersection with the lines $$(2/3)x + (1/3) y = k/16$$ for $$0 \leq k \leq 16$$:

Here is a $$C^1$$ function $$\phi(x)$$ which maps $$C_3$$ to $$C_4$$ in an order preserving manner, with derivative $$0$$ at each point of $$C_3$$. On each interval of $$[0,1] \setminus C_3$$, it is an appropriately chosen sine curve.

And here is the final product, a depiction of the function $$f(x,y) = (2/3) \phi(x) + (1/3) \phi(y)$$. The level curves show $$f(x,y) = k/16$$ for $$0 \leq k \leq 16$$. The black dots are the critical points $$C_3 \times C_3$$; the red dots demonstrate how every level curve contains $$1$$ or $$2$$ critical points.