Putnam 2012, Problem A-6

Let $f(x,y)$ be a continuous, real-valued function on $\mathbb{R}^2$. Suppose that, for every rectangular region $R$ of area $1$, the double integral of $f(x,y)$ over $R$ equals $0$. Must $f(x,y)$ be identically $0$?

Solution:
**First solution.** Yes, $f(x,y)$ must be identically $0$. We proceed using a series of lemmas.

**Lemma 1.** Let $R$ be a rectangular region of area $1$ with corners $A,B,C,D$ labeled in counterclockwise order. Then $f(A) + f(C) = f(B) + f(D)$.

**Proof.** We may choose coordinates so that for some $c > 0$,
$$A = (0,0), B = (c,0), C = (c,1/c), D = (0,1/c).$$

Define the functions
$$g(x,y) = \int_x^{x+c} f(t,y) dt$$
$$h(x,y) = \int_0^y g(x,u) du.$$

For any $x,y \in \mathbb{R}$,
$$h(x,y+1/c) - h(x,y) = \int_x^{x+c} \int_y^{y+1/c} f(t,u) dt du = 0$$
by hypothesis, so $h(x,y+1/c) = h(x,y)$. By the fundamental theorem of calculus, we may differentiate both sides of this identity with respect to $y$ to deduce that $g(x,y+1/c) = g(x,y)$. Differentiating this new identity with respect to $x$ yields the desired equality.

**Lemma 2.** Let $C$ be a circle whose diameter $d$ is at least $\sqrt{2}$, and let $AB$ and $A'B'$ be two diameters of $C$. Then $f(A) + f(B) = f(A') + f(B')$.

**Proof.** By continuity, it suffices to check the case where $\alpha = \arcsin \frac{2}{d}$ is an irrational multiple of $2\pi$. Let $\beta$ be the radian measure of the counterclockwise arc from $A$ to $A'$. By Lemma 1, the claim holds when $\beta = \alpha$. By induction, the claim also holds when $\beta \equiv n\alpha \pmod{2\pi}$ for any positive integer $n$. Since $\alpha$ is an irrational multiple of $2\pi$, the positive multiples of $\alpha$ fill out a dense subset of the real numbers modulo $2\pi$, so by continuity the claim holds for all $\beta$.

**Lemma 3.** Let $R$ be a rectangular region of arbitrary (positive) area with corners $A,B,C,D$ labeled in counterclockwise order. Then $f(A) + f(C) = f(B) + f(D)$.

**Proof.** Let $EF$ be a segment such that $AEFD$ and $BEFC$ are rectangles whose diagonals have length at least $\sqrt{2}$. By Lemma 2,
$$f(A) + f(F) = f(D) + f(E)$$
$$f(C) + f(E) = f(B) + f(F),$$
yielding the claim.

**Lemma 4.** The restriction of $f$ to any straight line is constant.

**Proof.** We may choose coordinates so that the line in question is the $x$-axis. Define the function $g(y)$ by
$$g(y) = f(0,y) - f(0,0).$$

By Lemma 3, for all $x \in \mathbb{R}$,
$$f(x,y) = f(x,0) + g(y).$$

For any $c > 0$, by the original hypothesis we have
$$0 = \int_x^{x+c} \int_y^{y+1/c} f(u,v) du dv$$
$$= \int_x^{x+c} \int_y^{y+1/c} (f(u,0) + g(v)) du dv$$
$$= \frac{1}{c} \int_x^{x+c} f(u,0) du + c \int_y^{y+1/c} g(v) dv.$$

In particular, the function $F(x) = \int_x^{x+c} f(u,0) du$ is constant. By the fundamental theorem of calculus, we may differentiate to conclude that $f(x+c,0) = f(x,0)$ for all $x \in \mathbb{R}$. Since $c$ was also arbitrary, we deduce the claim.

To complete the proof, note that since any two points in $\mathbb{R}^2$ are joined by a straight line, Lemma 4 implies that $f$ is constant. This constant equals the integral of $f$ over any rectangular region of area $1$, and hence must be $0$ as desired.

**Second solution** (by Eric Larson, communicated by Noam Elkies). In this solution, we fix coordinates and assume only that the double integral vanishes on each rectangular region of area $1$ with sides parallel to the coordinate axes, and still conclude that $f$ must be identically $0$.

**Lemma.** Let $R$ be a rectangular region of area $1$ with sides parallel to the coordinate axes. Then the averages of $f$ over any two adjacent sides of $R$ are equal.

**Proof.** Without loss of generality, we may take $R$ to have corners $(0,0), (c,0), (c,1/c), (0,1/c)$ and consider the two sides adjacent to $(c,1/c)$. Differentiate the equality
$$0 = \int_x^{x+c} \int_y^{y+1/c} f(u,v) du dv$$
with respect to $c$ to obtain
$$0 = \int_y^{y+1/c} f(x+c,v) dv - \frac{1}{c^2} \int_x^{x+c} f(u,y+1/c) du.$$

Rearranging yields
$$c \int_y^{y+1/c} f(x+c,v) dv = \frac{1}{c} \int_x^{x+c} f(u,y+1/c) du,$$
which asserts the desired result.

Returning to the original problem, given any $c > 0$, we can tile the plane with rectangles of area $1$ whose vertices lie in the lattice $\{(mc,n/c) : m,n \in \mathbb{Z}\}$. By repeated application of the lemma, we deduce that for any positive integer $n$,
$$\int_0^c f(u,0) du = \int_{nc}^{(n+1)c} f(u,0) du.$$

Replacing $c$ with $c/n$, we obtain
$$\int_0^{c/n} f(u,0) du = \int_c^{c+1/n} f(u,0) du.$$

Fixing $c$ and taking the limit as $n \to \infty$ yields $f(0,0) = f(c,0)$. By similar reasoning, $f$ is constant on any horizontal line and on any vertical line, and as in the first solution the constant value is forced to equal $0$.

**Third solution.** (by Sergei Artamoshin) We retain the weaker hypothesis of the second solution. Assume by way of contradiction that $f$ is not identically zero.

We first exhibit a vertical segment $PQ$ with $f(P) > 0$ and $f(Q) < 0$. It cannot be the case that $f(P) \leq 0$ for all $P$, as otherwise the vanishing of the zero over any rectangle would force $f$ to vanish identically. By continuity, there must exist an open disc $U$ such that $f(P) > 0$ for all $P \in U$. Choose a rectangle $R$ of area $1$ with sides parallel to the coordinate axes with one horizontal edge contained in $U$. Since the integral of $f$ over $R$ is zero, there must exist a point $Q \in R$ such that $f(Q) < 0$. Take $P$ to be the vertical projection of $Q$ onto the edge of $R$ contained in $U$.

By translating coordinates, we may assume that $P = (0,0)$ and $Q = (0,a)$ for some $a > 0$. For $s$ sufficiently small, $f$ is positive on the square of side length $2s$ centered at $P$, which we call $S$, and negative on the square of side length $2s$ centered at $Q$, which we call $S'$. Since the ratio $2s/(1-4s^2)$ tends to $0$ as $s$ does, we can choose $s$ so that $2s/(1-4s^2) = a/n$ for some positive integer $n$.

For $i \in \mathbb{Z}$, let $A_i$ be the rectangle
$$\left\{(x,y) : s \leq x \leq s + \frac{1-4s^2}{2s}, -s + i\frac{2s}{1-4s^2} \leq y \leq s + i\frac{2s}{1-4s^2}\right\}$$
and let $B_i$ be the rectangle
$$\left\{(x,y) : s \leq x \leq s + \frac{1-4s^2}{2s}, s + i\frac{2s}{1-4s^2} \leq y \leq -s + (i+1)\frac{2s}{1-4s^2}\right\}.$$

Then for all $i \in \mathbb{Z}$,
$$S \cup A_0, A_n \cup S', A_i \cup B_i, B_i \cup A_{i+1}$$
are all rectangles of area $1$ with sides parallel to the coordinate axes, so the integral over $f$ over each of these rectangles is zero. Since the integral over $S$ is positive, the integral over $A_0$ must be negative; by induction, for all $i \in \mathbb{Z}$ the integral over $A_i$ is negative and the integral over $B_i$ is positive. But this forces the integral over $S'$ to be positive whereas $f$ is negative everywhere on $S'$, a contradiction.