# Convex functions in convex sets

Suppose $$\Omega \subset \mathbb{R}^n$$ is some bounded, convex set. For which domains $$\Omega$$ is it true that for every convex function $$f:\Omega \rightarrow \mathbb{R}$$ the average of the function in the domain is dominated by the average of the function on the boundary $$\frac{1}{|\Omega|} \int_{\Omega} f(x) dx \leq \frac{1}{|\partial \Omega|} \int_{\partial \Omega} f(x) dx \quad ?$$ This inequality is trivially true on an interval $$\Omega = [a,b]$$ (this case is sometimes known as the Hermite-Hadamard inequality) and it's not too hard to see that it's true on the unit ball. However, starting in $$n \geq 2$$ dimensions, there are also domains for which the inequality fails and, indeed, the inequality will `generically' be false.

There is a particularly fun way to think about this that I learned from a paper of Pasteczka. Affine functions $$f(x) = \left\langle a,x\right\rangle + b$$ where $$a \in \mathbb{R}^n, b \in \mathbb{R}$$ have the property that both $$f$$ and $$-f$$ are convex and therefore the inequality, if true, has to be an equation for affine functions. This has an immediate geometric implication.

Lemma (Pasteczka). If the inequality holds, then the center of mass of $$\Omega$$ and the center of mass of $$\partial \Omega$$ have to coincide.

Pasteczka then conjectures that the converse might be true.

Question. Does the inequality hold on every convex domain for which the center of mass of $$\Omega$$ and $$\partial \Omega$$ coincide?

I was never quite sure what to believe: on the one hand, it does seem like the statement would be a little bit too good to be true. On the other hand, if the centers of mass agree, one can always add any affine function to $$f$$ without changing the truth of the inequality. In any case, if true, it would certainly be a very nice Theorem, so I figured it might be a good question for mathoverflow.

## 3 Answers

Zachary Chase said that he is still interested, so I'll make a post. It is a bit on the long side and I'll need to draw a few pictures to make it comprehensible, so today I'll just post a counterexample for $$n\ge 3$$. It is rather straightforward, so, in all honesty, I don't understand why Pasteczka didn't see it in the first place and made the conjecture in all dimensions.

The idea is very simple. We'll construct a needle-like 3D body $$\Omega$$ symmetric with respect to the origin and use the function $$f(x)=|x_1|$$. What we need is that when we go away from the plane $$x_1=0$$, the perimeter of the cross-section should decay faster than the area. That calls for making the central cross-section rather loose and the faraway section rather tight for the isoperimetric inequality in 2D, so it is not surprising that we shall take the cross-section at $$x_1=0$$ to be a square with a very small sidelength $$r>0$$ and the endpoint sections at $$x_1=\pm 1$$ to be disks of radius $$r/2$$ (all centered on the $$x_1$$-axis (see the figure).

Then the cross-section area $$A(t)$$ at $$x_1=t>0$$) is just $$r^2[(1-t)^2+4\tfrac t2(1-t)+\pi(t/2)^2]=r^2(1-ct^2)$$ where $$c=1-\frac\pi 4$$ while the cross-section perimeter $$P(t)$$ is $$r[4(1-t)+2\pi\tfrac t2]=4r(1-ct)\,.$$ Since our $$r$$ is very small, the surface area between $$x_1=t$$ and $$x_1=t+dt$$ is about $$P(t)\,dt$$ (the surface is nearly parallel to the $$x_1$$-axis, so the extra cosine of the angle in the exact formula is nearly $$1$$) and the ending disks have area of order $$r^2$$, which is negligible compared to the area of the main part of $$\partial\Omega$$. Thus, we have the average of $$f$$ over the volume exactly $$\frac{\int_0^1(1-ct^2)t\,dt}{\int_0^1(1-ct^2)\,dt}=\frac{\frac 12-\frac c4}{1-\frac c3}$$ while the average of $$f$$ over the surface area is nearly (up to $$O(r)$$) $$\frac{\int_0^1(1-ct)t\,dt}{\int_0^1(1-ct)\,dt}=\frac{\frac 12-\frac c3}{1-\frac c2}$$ It remains to check that $$\frac{\frac 12-\frac c4}{1-\frac c3}>\frac{\frac 12-\frac c3}{1-\frac c2}$$ which, after multiplying by the denominators, becomes $$(\tfrac 12-\tfrac c4)(1-\tfrac c2)=\tfrac 12-\tfrac c2+\tfrac{c^2}8 \\ >\tfrac 12-\tfrac c2+\tfrac{c^2}9=(\tfrac 12-\tfrac c3)(1-\tfrac c3)\,.$$

To get a counterexample in higher dimension, just take the Cartesian product of our $$\Omega$$ with an interval a few times and notice that every time you do it, the volume average of $$f$$ is preserved and the surface area average becomes a convex combination of the volume average and the surface area one, so the inequality between them is preserved.

The much less trivial (but now, when we know that the conjecture fails even for origin-symmetric convex bodies in 3D, probably not so exciting anymore) statement is that the Pasteczka conjecture does hold in 2D as stated. The proof consists of a few steps for one of which I'll just refer to a lemma in one of our papers on arXiv (it is essentially self-contained, so you'll not need to read around it unless you want to except to understand the notation), but that will come a bit later :-)

Now the proof in 2D. The first claim is that it suffices to prove the inequality for the functions $$f=\max(A,0)$$ where $$A$$ is an affine function. It is based on the idea that, given the boundary values of $$f$$ on $$\partial\Omega$$, the largest convex function with those boundary values can be written as (or, rather, approximated with arbitrary precision by) a linear combination of such functions with positive coefficients. I'll show this decomposition for the case when $$\Omega$$ is a convex polygon and the boundary values are prescribed arbitrarily at the vertices in a generic position and extended linearly to each side. The general case follows by appropriate approximation.

Start with any generic point $$p_0$$ inside the polygon $$\Omega$$ and find an affine function $$A_0$$ that is not exceeding the prescribed values at the vertices of $$\Omega$$ and maximizes $$A_0(p_0)$$ under that condition. It will have to attain the prescribed values exactly at some 3 vertices of $$\Omega$$ so that the corresponding triangle contains $$p_0$$ (see the figure).

The difference $$f-A_0$$ will vanish at those three vertices, be positive at the other ones and still be convex. It will be certainly non-positive in the triangle. Now take one of the three "outer" regions of $$\Omega$$ adjacent to the triangle (say, $$\Omega_1$$), choose a point $$p_1$$ there and consider the affine function $$A_1$$ vanishing on the corresponding triangle side and maximizing the value at the chosen point (note that that maximal value will certainly be positive, so $$A_1$$ will be negative in $$\Omega\setminus \Omega_1$$). It will have to attain the prescribed value at some other vertex of $$\Omega$$ thus generating one more triangle (not necessarily containing $$p_1$$ in general). The function $$f-A_0-\max(A_1,0)$$ will be non-positive in the union of the two constructed triangles, vanish at the triangle vertices, be positive at the remaining vertices of $$\Omega$$, and stay convex in each remaining outer region. Now continue in the same fashion working your way out to get a combination $$A_0+\sum_{k=1}^K\max(A_k,0)$$ dominating $$f$$ and having exactly the prescribed boundary values. In general this combination is just the largest convex function with prescribed boundary values (so it does not depend on where we are choosing the points, etc.), but we need the above decomposition rather than the function itself (which is not unique). Since the inequality turns into equality for affine functions, we need to consider just the case when $$f=\max(A,0)$$ where the affine function $$A$$ vanishes on some line intersecting $$\Omega$$. Note also that the same $$f$$ can be written as $$\max(-A,0)+A$$, so once we know that line, we can choose on which side of it $$A$$ is positive in our proof.

The next thing we'll need is the following lemma from plane geometry, which is essentially Lemma 2 in https://arxiv.org/abs/2305.15646.

Let $$\Omega$$ be a convex body and let $$\ell$$, $$L$$ be two parallel (say, vertical) lines intersecting $$\Omega$$ with $$\ell$$ lying to the left of $$L$$ (see the figure).

Let $$a$$ and $$A$$ be the parts of the area of $$\Omega$$ on the left of $$\ell$$ and $$L$$ respectively (so $$a$$ is yellow and $$A$$ is yellow and blue together) and let $$p$$ and $$P$$ be the corresponding parts of the perimeter (green and green and red together). If the sum $$\gamma_++\gamma_-$$ of the angles between the boundary of $$\Omega$$ and $$L$$ on the side of $$\ell$$ is not greater than $$\pi$$, then $$\frac aA<\frac pP\,.$$ Note that in Lemma 2 in the paper we claimed just the non-strict inequality, which was sufficient for our purposes there, but one can see that several $$\le$$ near the end of the proof are actually $$<$$ unless the lines coincide or $$\ell$$ just touches $$\Omega$$ instead of honestly cutting it.

This lemma has a curious corollary. Let $$\ell(t)$$ be the vertical (parallel to the $$y$$-axis) line $$\{(x,y): x=t\}$$. Let $$p(t)$$ and $$a(t)$$ be the parts of the perimeter and the area of $$\Omega$$ on the left of $$\ell(t)$$ respectively. Let $$P$$ and $$A$$ be the full perimeter and area of $$\Omega$$. Then there exists $$t_0$$ such that the difference $$D(t)=\frac{p(t)}{P}-\frac{a(t)}A$$ stays non-negative for $$t\le t_0$$ and non-positive for $$t\ge t_0$$.

Indeed, it is interesting to consider only $$t$$ for which $$\ell=\ell(t)$$ cuts $$\Omega$$. It is easy to see that $$D$$ is positive when $$\ell$$ is almost all the way to the left and negative when $$\ell$$ is almost all the way to the right, so if there is a change of sign somewhere and if there is more than one, there should be at least three, i.e., there should exist three positions $$\ell_1,L,\ell_2$$ of the line $$\ell$$ for which $$D=0$$ (see the figure)

But then either $$\alpha_++\alpha_-\le\pi$$ or $$\gamma_++\gamma_-\le\pi$$. Suppose that it is the sum of $$\gamma$$'s (the other case is similar, just reflect the picture around the vertical axis). Then, if $$\ell_1=\ell(t)$$ and $$L=\ell(T)$$, we have $$\frac{p(t)}P=\frac{a(t)}A\text{ and }\frac{p(T)}P=\frac{a(T)}A\,,$$ so $$\frac{p(t)}{p(T)}=\frac{a(t)}{a(T)}$$ but that contradicts the conclusion $$\frac{p(t)}{p(T)}>\frac{a(t)}{a(T)}$$ of the Lemma!

Now we are almost done. Let us assume WLOG that the line $$A=0$$ is vertical (otherwise just rotate the coordinate system). Let $$L=\ell(t_0)$$. Let $$\ell$$ be the line $$\{A=0\}$$. Let's say $$\ell$$ lies on the left of $$L$$. Then we will choose between $$A$$ and $$-A$$ so that $$A$$ is positive to the left of $$\ell$$. Note that then $$\max(A,0)$$ is in the cone generated by the Heaviside functions $$H_t(x,y)=\begin{cases}1, & x with $$t\le t_0$$. However for such a Heaviside function, we have $$\frac{1}{|\partial\Omega|}\int_{\partial\Omega}H_t= \frac{p(t)}{P}\ge \frac{a(t)}{A}=\frac{1}{|\Omega|}\int_{\Omega}H_t\,.$$

The End!

• Fun!!! Noah Kravitz and Mitchell Lee (arxiv.org/pdf/2307.05875.pdf) proved it in all dimensions for domains that are sufficiently close to the ball in a suitable sense so it seems like the truth is going to be complicated. Looking forward to the proof in 2D!! Jul 22 at 16:46
• @StefanSteinerberger I just posted the 2D proof. Enjoy and feel free to ask questions if anything is unclear :-) Jul 22 at 19:38
• Now that's a gorgeous proof, very pretty!! This solves the question completely, thanks!! Jul 23 at 18:41
• @StefanSteinerberger You are most cordially welcome, Stefan :-) Jul 23 at 19:11
• "I don't understand why Pasteczka didn't see it". Because he is not fedja. Jul 31 at 22:05

Not an answer, but a too long remark for a comment.

The property holds for any Euclidean ball. By translation one may assume that the center is $$0$$. Call R the radius. Then the volume is $$b_nR^n$$ and by using polar coordinates, $$2\int_{B(0,R)} f(x) ~ dx = \int_{B(0,R)} (f(x) + f(-x)) ~ dx = \int_{S(0,R)} \Big( \int_0^R \big(f(rs) + f(-rs)\big) nb_nr^{n-1} ~ dr\Big) d\upsilon(s),$$ where $$\upsilon$$ is the uniform measure on $$S(0,1)$$. By convexity, $$\forall r \in [0,R], \quad f(rs) + f(-rs) \le f(Rs) + f(-Rs).$$ Hence we get $$2\int_{B(0,R)} f(x) ~ dx \le \int_{S(0,R)} \big( f(Rs) + f(-Rs) \big) b_nR^n ~ d\upsilon(s) = 2b_nR^n \int_{S(0,R)} f(Rs) ~ d\upsilon(s),$$ which provides the result.

Given $$a>b>0$$, I wonder whether the inequality holds when $$\Omega$$ is the set of all $$(x,y) \in \mathbb{R}^2$$ such that $$(x/a)^2+(y/b)^2 \le 1$$, and $$f(x,y)=|x|$$. My impression (by a picture) is that the weight of the points $$(x,y)$$ with large $$|x|$$ is smaller when we compute the average over $$\partial\Omega$$ than in the average over $$\Omega$$.

• The unit ball is naturally special and stronger things can be said: there, the inequality is actually true for all subharmonic functions with constant 1 (this follows relatively quickly from the maximum principle and the mean value theorem for harmonic functions). As for the ellipse: I don't think this is likely to be a counterexample, the level sets {|x| = c} get shorter when c gets large while the boundary measure stays roughly constant. May 28 at 19:57
• I think that the problem can essentially be reduced to convex polytopes and piecewise linear functions. If there were a counterexample, one should be able to approximate both the function and the region, while keeping the centers of mass equality. Jun 4 at 2:15
• It is true for symmetric domains in 2D. Not sure about the coinciding centers of mass condition yet. Jul 17 at 11:59
• @StefanSteinerberger OK, I believe that we (I and Dmitry Ryabogin) can prove it in full generality in 2D as conjectured. For $n>2$ it fails even for some symmetric sets. Let me know if anybody still cares and, if yes, I'll try to post the argument :-) Jul 21 at 1:58
• I'd definitely be interested!! Jul 22 at 16:39

Not an answer (after all Fedja gave a satisfactory answer), but another approach of this problem, in terms of PDEs.

Suppose that a continuous map $$A:\bar\Omega\to{\bf Sym}_n^+$$ satisfy the following properties (I'll explain below a strategy to construct such tensors)

1. $$A(x)\in{\bf Sym}_n^{++}$$ for every $$x\in\Omega$$,
2. $$A(y)=0_n$$ for every $$x\in\partial\Omega$$,
3. $$({\rm Div}\,A)\cdot\nu(y)=-\frac1{|\partial\Omega|}$$ for every $$x\in\partial\Omega$$,
4. $${\rm div}({\rm Div}\,A)(x)=-\frac1{|\Omega|}$$ for every $$x\in\Omega$$.

Hereabove, $${\rm Div}\,A$$ is the row-wise divergence, and $$\nu$$ is the outer unit normal vector field along the boundary $$\partial\Omega$$.

Then an integration by part yields $$\frac1{|\Omega|}\int_\Omega u\,dx=-\int_\Omega {\rm Tr}(A{\rm D}^2u)\, dx+\frac1{|\partial\Omega|}\int_{\partial\Omega}u\,dx.$$ If $$u$$ is a convex function, then $${\rm Tr}(A{\rm D}^2u)\ge0$$ pointwise, and there remains the required inequality.

Whether such a tensor $$A$$ exists or not is still an open question. Of course a necessary condition is (take affine test functions $$u$$) that the centers of mass of the domain and of its boundary coincide. That said, theer are plenty of tensors satisfying the points $$1,2,4$$. To see this, take a continuous tensor $$S:\bar\Omega\to {\bf Sym}_n^{++}$$. Then the elliptic Dirichlet problem

• $$\phi=0$$ on the boundary,
• $$\sum_{i,j}\partial_i\partial_j(\phi s_{ij})\equiv-\frac1{|\Omega|}$$ in $$\Omega$$

is uniquely solvable. Then $$A=\phi S$$ works. Notice that $$\phi>0$$ in $$\Omega$$ (maximum principle), so that the "conormal derivative" $$\mu_A=-({\rm Div}\,A)\cdot\nu$$ is a positive measure. Considering the test function $$u\equiv1$$, we have $$\int_{\partial\Omega}\mu_A=\frac1{|\partial\Omega|},$$ which is compatible with $$3$$.

Therefore there remains to see for which domains there exists an $$S$$ such that $$\mu_A$$ is constant. Since we have much room in choosing $$S$$, the answer should be positive often enough. For instance, one could consider domains close to the unit ball, via a kind of IFT.