# Convexity of a bi-variate function when its second derivatives are discontinuous?

A piecewise function $F(x_1,x_2)$ is continuous, so are its 1st partial derivatives. However, its 2nd partial derivatives are discontinuous, that is , $F$ is not of class $C^2$. But its Hessian satisfies the convexity condition piecewise (even turns out to be symmetric), i.e. all its principal minors are non-negative, so is $F$ jointly convex even it is not of class $C^2$?

• Do the second order derivatives exist at every point of $\mathbb R^2$, even at the boundaries of "pieces"? If not, how smooth are the pieces? Jun 1, 2013 at 13:29
• Specifically, $F''_{11}$ exists everywhere except for lines $x_1=S$ and $x_1+x_2=S$, $F''_{12}$ and $F''_{22}$ exist everywhere except for line $x_1+x_2=S$,where $S$ is a positive constant. Moreover, all $F''_{ij}$s are "piecewise" nonnegative, and the function is "piecewise" convex. The specific function seems convex to me, but I just wonder if there is a general conclusion, when is the "class of $C^2$" condition unnecessary? Jun 2, 2013 at 16:54

Proposition. Suppose $U\subset \mathbb R^n$ is a convex domain, and $F:U\to\mathbb R$ is a $C^1$ function. Suppose further that $F$ is second-order differentiable on $U\setminus N$, where $N$ is a closed set that is locally $(n-1)$-rectifiable. If the Hessian matrix of $F$ is positive semidefinite on $U\setminus N$, then $F$ is convex.

(Remark: a set that is a finite union of smooth $(n-1)$ hypersurfaces is locally $(n-1)$-rectifiable.)

Proof. A $C^1$ function $F:U \to \mathbb R$ is convex if and only if its derivative is monotone: $$\langle \nabla F(a)-\nabla F(b),a-b\rangle \ge 0,\quad \forall a,b\in U \tag1$$ For a given pair $a,b$, the intersection of the line segment $[a,b]$ with $N$ may happen to be infinite. But recall that the piece of $N$ in a ball surrounding $[a,b]$ has finite $(n-1)$-dimensional measure. Fubini's theorem implies that for almost every vector $u$ orthogonal to $[a,b]$, the shifted segment $[a+u,b+u]$ meets $N$ in a finite set (possibly empty). By continuity, it suffices to prove (1) for a dense subset of pairs $a,b$. Thus, we may assume that $[a,b]\cap N$ is finite.

The restriction of $F$ to $[a,b]$, denoted $f(t)=F((1-t)a+tb)$, has nonnegative second derivative outside of a finite subset of $[0,1]$. Since $f'$ is continuous on $[0,1]$, it follows that $f'(1)\ge f'(0)$. In terms of $F$ this says precisely that (1) holds. $\Box$

• Thanks, but I am a little confused with your link. (1) A $C^1$ function $F$ is convex $\iff$ its derivative is monotone or $\iff$ $\nabla F$ is monotone? But $\nabla F$ is gradient, not derivative. (2) The (total?) derivative of $F(x+tv)$ is $\langle\nabla F(x+tv), v\rangle$? $\langle,\rangle$ means inner product? Moreover, the Fubini's theorem from Wikipedia is "a result which gives conditions under which it is possible to compute a double integral using iterated integrals", it seems to me different from the one you used? Jun 3, 2013 at 23:07
• @jorter.ji (1) I'm in the habit of calling $\nabla F$ the derivative of $F$. You can call it the gradient if you prefer. (2) By $F(x+tv)$ I mean the function of one real variable $t$, which is the restriction of $F$ to a line. Its derivative is computed using the chain rule. Yes, $\langle,\rangle$ is inner product. (3) Not really Fubini's theorem, it's called the slicing lemma in geometric measure theory. See page 7 here for example. Jun 3, 2013 at 23:31
• Thanks. (1) and (2) now make more sense to me. But I am still lost on (3). The slicing lemma in the pdf link seems not very closely related, is there a "original" (Fubini's) lemma/theorem that leads to the implication in your answer? Jun 4, 2013 at 0:01
• @jorter.ji It is related, but the statement I really meant is: the $d$-dimensional measure of a set $A\subset \mathbb R^n$ is the integral of $(d-k)$-dimensional measure of intersections of $A$ with by parallel $(n-k)$-dimensional hyperplanes. In this case let $d=k=n-1$. The parallel hyperplanes become lines parallel to $[a,b]$. Also, $d-k=0$ and the $0$-dimensional measure is just the number of points. So, if the number of points in the intersection is infinite for a set of positive measure, than the integral is infinite, contradicting the finiteness of $(n-1)$-dimensional measure. Jun 4, 2013 at 0:13
• @jorter.ji A standard reference is: P. Mattila, "Geometry of sets and measures in Euclidean spaces. Fractals and rectifiability". Cambridge Studies in Advanced Mathematics, 44. Cambridge University Press, Cambridge, 1995. Jun 4, 2013 at 0:13