# Continuous and almost everywhere continuously differentiable with bounded gradient implies Lipschitz?

Let $f:\mathbb{R}^n\to \mathbb{R}$ be continuous and bounded. Let the gradient of $f$ be continuous almost everywhere and let it be uniformly bounded wherever it is defined, i.e. $\|\nabla f(x)\|\le M$ for any $x\in\mathbb{R}^n$, where $M$ is a positive constant. Can we say that $f$ is globally Lipschitz continuous?

If so, where can we find a formal proof?

If not, can we provide a counterexample? (I.e., a function $f:\mathbb{R}^n\to \mathbb{R}$ that is continuous and bounded, has uniformly bounded gradient but is not Lipschitz.)

Remark. This question has been answered (positively) for $n=1$ in If $f$ is continuous and piecewise $C^1$ and $f'$ is bounded a.e., is $f$ Lipschitz?.

Remark. This question has been answered (positively) for $f$ continuously differentiable in A continuously differentiable map is locally Lipschitz. However, from the answer given there, I seem to understand that continuity of the derivatives can be relaxed to boundedness of the derivatives. If this is actually the case, then my question is also answered (positively) in that post. But judging from the following remark, I may be missing something.

Remark This paper http://www.sciencedirect.com/science/article/pii/S0024379512002741 seems to prove that there DO exist counterexamples (i.e. functions that are continuous, have uniformly bounded derivatives but are NOT Lipschitz). However, I must confess I do not understand their proof.

• I am posting this as a separate question than math.stackexchange.com/q/1597154, since I may need to get rid of the compactness of the set where $f$ is defined, and I may want to generalize the result to any $n$. Jan 2, 2016 at 16:26
• What does "piecewise continuous" mean if $n>1?$
– zhw.
Jan 2, 2016 at 22:40
• @zhw. Thanks for bringing this up. I am thinking about a function defined on $\mathbb{R}^2$, i.e. on the plane. The plane is partitioned in 3 different regions. Within each of these regions the gradient is continuous, but on the boundaries between different regions, the gradient is not defined. I guess we should say that the gradient is "continuous almost everywhere". Does that help to clarify? Jan 3, 2016 at 2:07

As stated, the answer to your question is no. The Cantor function is a common counterexample when the derivative is required to exist only almost everywhere. It is continuous, has zero derivative a.e., in particular in an open set of full measure, but it is not Lipschitz continuous, nor absolutely continuous. You can make an analogous example in the cube $\mathbb{R}^n$ considering the Cantor function of the first variable.

If instead you take a function $f\in L^1_{loc}(\mathbb{R}^n)$ and require its gradient to exist in the distributional sense and to be represented by a function in $L^\infty$, then you are by definition stating that $f$ belongs to the Sobolev space $W^{1,\infty}(\mathbb{R}^n)$, which can be proven to coincide with the space of Lipschitz functions, see for example this question. This still holds if you replace $\mathbb{R}^n$ with a convex set $\Omega$ (there are some weaker conditions on $\Omega$ under which it works, but it doesn't work with arbitrary domains). Note that you don't need to assume a priori that $f$ is continuous, nor that the gradient is continuous almost everywhere.

Yes. The given assumptions imply that $f$ is locally absolutely continuous, that is, it is the integral of each of its derivatives (which are defined only at almost all points): $$\tag{*} f(x_1, \ldots x_j+h \ldots x_n) - f(x_1 \ldots x_n) = \int_0^h \frac{\partial f}{\partial x_j}(x_1 \ldots x_j + y \ldots x_n)\ dy, \qquad j=1\ldots n.$$ You can therefore use the mean value theorem as you would normally do for smooth functions.

Proving (*) is a bit annoying for me (I tend to gladly assume that those things are true without bothering to prove them), and is connected to a fine property of functions known as ACL property (see the book on Sobolev spaces by Giovanni Leoni - related).

If you know something about weak or distributional derivatives, then you might be happy to know that they satisfy property (*) (modulo almost-everywhere-related technicalities). Your assumptions give that the almost-everywhere-defined classical derivatives of $f$ are indeed weak derivatives, and so (*) is satisfied. The space of functions that satisfy your assumptions is (contained into) a space usually known as $W^{1, \infty}_{\rm loc}(\mathbb{R}^n)$.

EDIT You are right that my post is way too imprecise. For a rigorous proof using approximation by mollifying, see e.g. Evans's book on PDEs, second edition, Theorem 4 chapter 5 (Characterization of $W^{1,\infty}$ functions), pag. 294.

• In the context I am considering, it is all right to assume that (*) holds. However, the partial derivative $\frac{\partial f}{\partial x_j}$ may not be defined on any of the points on the line from $(x_1,...x_j,...,x_n)$ to $(x_1,...,x_j+h,...,x_n)$. In fact, that line may be one of the boundaries between different continuity regions of the gradient. Do you think that would be a problem? Or can I travel between those two points by integrating the gradient along a different line? Jan 2, 2016 at 16:54
• This is the almost-everywhere technicality I was talking about. Even if you are so unlucky that you chose a line on which $f$ is singular, your assumptions give that those lines form a null set (that is, a set that is ignored by integration theory). You can therefore act as if your function were smooth. Jan 2, 2016 at 16:58
• NOTE: Anything I have said is hand-waving. That's because of my ignorance. If you want rigorous proofs, then you should look for them on the book by Leoni. Jan 2, 2016 at 16:59
• NOTE 2: Changing the path won't work. You need to integrate along straight paths to prove Lipschitz continuity. Jan 2, 2016 at 17:01
• You are right, there is something I am sweeping under the rug. See my edit for a quick patch. Sorry about the confusion. Jan 2, 2016 at 22:32