If $\int_A f\,dm = 0$ for all $A$ having some fixed measure $C$, then $f = 0$ almost everywhere Let $ f \in L^1[0,1]$. Assume that there is a constant C, with $0 < C < 1$, such that for every measurable set $A \subset [0,1] $ with $m(A)=C$, we have 
$ \int_{A} f dm = 0 $.  Prove that     $f = 0$ almost everywhere.
I tried to do my contradiction but I could not get my head around it. Any hints or ideas are appreciated.
 A: If $f$ is not $0$ almost everywhere, then clearly $m(\{f>0\})>0$ and $m(\{f<0\})>0$ (since on sets of measure $C$ where $f$ is not $0$ almost everywhere, there must be positive parts and negative parts to cancel out).  Now suppose $C\leq 1/2$.  Either $m(\{f\geq 0\})\geq 1/2$ or $m(\{f\leq 0\})\geq 1/2$; suppose WLOG $m(\{f\geq 0\})\geq 1/2$.  Then we can find a subset $A\subseteq\{f\geq 0\}$ of measure $C$ such that $m(A\cap\{f>0\})>0$.  This implies $\int_A f>0$, which is a contradiction.
Now suppose $C>1/2$, and write $I=\int_{[0,1]}f$.  Note that if $m(B)=1-C$, we have $\int_B f=I$.  Let $g=f-I/(1-C)$; then $g$ has the property that for any $B$ of measure $1-C$, $\int_B g=0$.  By the previous paragraph, this implies $g$ is $0$ almost everywhere.  Thus $f$ is constant almost everywhere (with value $I/(1-C)$), and this clearly implies $f$ is $0$ almost everywhere.
A: Since one of the sets $\{x : f(x) \geqslant 0\}$, $\{x: f(x) \leqslant 0\}$ has at least half measure, any $C \leq 0.5$ will work. A more interesting exercise would be to show that any $C < 1$ will work.
A: 
Puzzle.  Let $f$ be integrable on $[0,1]$, let $0<c<1$, and suppose
  that  $\int_A f(t)\,dt =0 $ for all measurable sets $A\subset[0,1]$
  with $m(A)=c$.  Show that $f=0$ a.e.

I call this a "puzzle" rather than a problem.  A good puzzle should be puzzling of course (the comments suggest it was for while)
 and it should have an entertaining not too messy solution.  No hints allowed--that would be like including the punch line in the
 set-up to a joke.  It shouldn't have any deeper meaning--this one doesn't illustrate any particular method of integration theory
 although you can attack it with deep methods if that thrills you.
I remember adding it as Exercise 5:12.7     in our graduate real analysis text${}^1$ long ago.  I don't, however, remember where it came from,
 or what solution
 I had in mind at the time, or what the students came up with.  But here is a solution that occurs to me now and is meant, merely,
 to entertain--not instruct.  (Note that the only elements of integration theory that we use would have been known to calculus students.)

Solution..  Let $F(x)= \int_0^x f(t)\,dt .$  Fix $0<x<c$ and choose
  $\delta$ smaller than both $x$ and $1-c$.  Consider the sets $$A=
  [0,x] \cup [1+ x-c,1]$$ and $$B=[0,x-h] \cup [x,x+h] \cup [1+x-c,
  1].$$  where $h$ is any positive number smaller than $\delta$.
      Observe that  $m( A)=m(B)=c$ so that $\int_A f=\int_B f = 0$.  That means that $$\int_{[x-h,x]}  f(t)\,dt = \int_{[x,x+h]} 
  f(t)\,dt.$$    This translates into the statement that  $$
  F(x+h)+F(x-h)-2F(x) =0$$  for all such $x$ and all $0<h<\delta$.  Any
  continuous function $F$ that satisfies this familiar condition${}^2$
  at each point of the interval $(0,c)$ is linear. 
  But we know that   $F(0)=F(c)=0$ so everywhere on
  that interval $F$ is zero and consequently $f=0$ a.e. on $[0,c]$.
  The same argument can be constructed on the interval $[c,1]$ and so 
  we are done .


Footnote${}^1$: Real Analysis (2008) ISBN: 1434844129.
 Download page here. 
Footnote${}^2$:  The expression $ F(x+h)+F(x-h)-2F(x) =0$
 says that the function is "locally midpoint linear."    For a continuous function this implies that the function is linear, with an   elementary proof.   More dramatically, if the very much weaker condition
 $$\lim_{h\to 0} \frac{F(x+h)+F(x-h)-2F(x)}{h^2}=0$$
 holds at every $a<x<b$ for a continuous function $F$, then again $F$ must be linear on $[a,b]$.  This condition says that a continuous function with a zero Schwartz derivative (or second symmetric derivative) must be linear.
