I've been reading Tao's *An introduction to measure theory*, a draft can be found [here](https://terrytao.wordpress.com/2010/10/16/245a-notes-5-differentiation-theorems/). An exercise from it is


Exercise 30 (Rising sun inequality) Let ${f: {\bf R} \rightarrow {\bf R}}$ be an absolutely integrable function, and let ${f^\*: {\bf R} \rightarrow {\bf R}}$ be the one-sided signed Hardy-Littlewood maximal function


$$ f^\*(x) := \sup\_{h>0} \frac{1}{h} \int\_{[x,x+h]} f(t)\ dt.$$


Establish the rising sun inequality


$$ \lambda m( \{ f^\*(x) > \lambda \} ) \leq \int\_{x: f^\*(x) > \lambda} f(x)\ dx$$


for all real $\lambda$ (note here that we permit $\lambda$ to be zero or negative).


I've prove it. But there it's another exercise after it


Exercise 31 Show that the left and right-hand sides in Exercise 30 are in fact equal when $\lambda>0$.


I tried to solve it and failed.
And I found that if we take $f=1\_{[0,1]}$, and $\lambda=\frac{1}{2}$ then the left-hand side is $\frac{1}{2}$ but the right-hand side is $1$, which are not equal.


Am I make any mistake? Please tell me.


Thanks in advance.



Question on an exercise from Terry Tao's blog
If $f=1\_{[0,1]}$, then for real $x$ we have
$$f^\*(x)=\frac1{1-x}1(x<0)+1(0\le x<1).$$
So, for $\lambda=1/2$ the left-hand side is
$$\tfrac12\,m(\{x\colon f^\*(x)>\tfrac12\})=\tfrac12\,m((-1,1))=1,$$
which is the same as the right-hand side.


