🧮 Brain Teaser

The Integral That Knows Its Own Derivative

Let f:[0,1]Rf: [0,1] \to \mathbb{R} be continuous. Suppose that

01f(x)dx=01xf(x)dx=0.\int_0^1 f(x)\, dx = \int_0^1 x\, f(x)\, dx = 0.

Must ff have at least two zeros in (0,1)(0,1)?

Prove it or find a counterexample.

orthogonalitysign-change argumentcontinuous functionsmean valueRudin-style

Answer: Two Integral Conditions Force Two Zeros

Key Idea / Intuition

The two integral conditions force ff to "oscillate" enough that it cannot have just one sign-change. Think of it this way: if ff had only one zero, you could factor out a sign pattern f=c(one-sign piece)f = c \cdot (\text{one-sign piece}), but then a clever linear combination of the two integrals would give a contradiction. The key move is to use the vanishing of both integrals to build a polynomial that "witnesses" a second zero must exist — essentially an intermediate-value + mean-value argument.


Formal Proof / Solution

Claim: Yes, ff must have at least two zeros in (0,1)(0,1).


Step 1: ff must change sign (at least one zero in (0,1)(0,1)).

Since 01f(x)dx=0\int_0^1 f(x)\,dx = 0 and ff is continuous, if ff were never zero on (0,1)(0,1), then ff has constant sign and the integral cannot vanish. So ff has at least one zero.


Step 2: Suppose for contradiction that ff has exactly one zero in (0,1)(0,1), say at c(0,1)c \in (0,1).

Then ff changes sign exactly once: say f>0f > 0 on (0,c)(0,c) and f<0f < 0 on (c,1)(c,1) (or vice versa).


Step 3: Derive a contradiction using a linear combination.

Consider the linear combination

01(xα)f(x)dx=01xf(x)dxα01f(x)dx=0α0=0\int_0^1 (x - \alpha)\, f(x)\, dx = \int_0^1 x\,f(x)\,dx - \alpha \int_0^1 f(x)\,dx = 0 - \alpha \cdot 0 = 0

for any αR\alpha \in \mathbb{R}. Now choose α=c\alpha = c, the unique zero. Then:

01(xc)f(x)dx=0.\int_0^1 (x - c)\, f(x)\, dx = 0.

But now observe the sign of (xc)f(x)(x - c)f(x):

  • On (0,c)(0, c): xc<0x - c < 0 and f(x)>0f(x) > 0, so (xc)f(x)<0(x-c)f(x) < 0.
  • On (c,1)(c, 1): xc>0x - c > 0 and f(x)<0f(x) < 0, so (xc)f(x)<0(x-c)f(x) < 0.

Therefore (xc)f(x)0(x-c)f(x) \leq 0 on all of (0,1)(0,1), with strict inequality on sets of positive measure. This gives

01(xc)f(x)dx<0,\int_0^1 (x-c)\,f(x)\,dx < 0,

which contradicts the fact that the integral equals zero.


Step 4: Conclusion.

The assumption that ff has exactly one zero in (0,1)(0,1) leads to a contradiction. Combined with Step 1, ff must have at least two zeros in (0,1)(0,1). \blacksquare


Remark (the elegant structure): The two conditions f=0\int f = 0 and xf=0\int xf = 0 together say that ff is orthogonal (in L2[0,1]L^2[0,1]) to the two-dimensional space spanned by {1,x}\{1, x\}. In particular, ff is orthogonal to every linear polynomial α+βx\alpha + \beta x. Choosing the linear polynomial xcx - c that vanishes at the only candidate zero is precisely what kills the sign argument. This is a shadow of the general principle: orthogonality to nn functions forces at least nn sign changes.

Type: analysisEdit on GitHub ↗