# Find a measurable set A$\subset(-1,1)$ such that $f(x)=m(A\cap(-1,x))$ has $f'(0)=1/2$

Now, I have done some work on this and by using the definition of the derivative, I come to the conclusion that if such a set $A$ exists, then I should have \begin{align*} \lim\limits_{x\rightarrow0^{+}}\frac{m(A\cap(0,x))}{x} = \frac{1}{2} = \lim\limits_{x\rightarrow0^{-}}\frac{-m(A\cap(x,0))}{x} \end{align*} But now, I tried to create such an $A$ in the following way: $A = \bigcup \limits_{n=1}^{\infty} (\frac{1}{2^n}, \frac{3}{2^{n+1}})$. The idea was, that if I took an interval of measure $\frac{1}{2^{n+1}}$ in each interval $(\frac{1}{2^n}, \frac{1}{2^{n+1}})$, then eventually I could have 'half' of $(0,x)$ in each $A\cap(0,x)$ set, as the limit requires. Note that I'm working only for the part $x>0$, if I manage this I think that by symmetry it will work out in the $x<0$ part too. But I cannot prove that for this $A$ the limit is indeed $\frac{1}{2}$, so I'm not sure I'm on the right path.

• When I tried to nail this down it seemed to me that intervals near zero had to be cut into more and more parts, in order to get convergence. Commented Oct 6, 2013 at 20:13

Your idea can be made to work, though it gets a bit messy. If $0<x<1$, there is a unique $n(x)\in\Bbb N$ such that $$\frac1{2^{n(x)+1}}\le x<\frac1{2^{n(x)}}\;.$$

For $m\in\Bbb N$ let $I_m=\left[\frac1{2^{m+1}},\frac1{2^m}\right)$, and let $A_m=\{x\in I_m:\lfloor 4^{m+1}x\rfloor\text{ is even}\}$. Let $A^+=\bigcup_{m\ge 0}A_m$; since $2^{n(x)+1}\le 4^{n(x)+1}x<2^{n(x)+2}$ for $x\in(0,1)$, it’s not hard to see that $A_m$ is a finite union of intervals and that $m(A_m)=\frac12m(I_m)$ for each $m\in\Bbb N$ and hence that $m(A^+)=\frac12$.

For $x\in(0,1)$ let $$f(x)=\frac{m\big(A^+\cap(0,x)\big)}x\;.$$

Let $x\in I_m$, and let $k=\lfloor 4^{m+1}x\rfloor$; $2^{m+1}\le k<2^{m+2}$, and $x\in A^+$ iff $k$ is even. Thus, on the interval $$\left[\frac{k}{4^{m+1}},\frac{k+1}{4^{m+1}}\right)$$ the function $f$ is increasing if $k$ is even and decreasing if $k$ is odd.

It’s not hard to check that if $k$ is even, then

\begin{align*} \frac12&=f\left(\frac{k}{4^{m+1}}\right)\\\\ &<f\left(\frac{k+1}{4^{m+1}}\right)\\\\ &=\frac{\frac{k}{2\cdot4^{m+1}}+\frac1{4^{m+1}}}{\frac{k+1}{4^{m+1}}}\\\\ &=\frac{k+2}{2k+2}\\\\ &=\frac12+\frac1{2k+2}\\\\ &\le\frac12+\frac1{2^{m+2}+2}\;, \end{align*}

while if $k$ is odd, then

\begin{align*} \frac12&=f\left(\frac{k+1}{4^{m+1}}\right)\\\\ &<f\left(\frac{k}{4^{m+1}}\right)\\\\ &=\frac{\frac{k+1}{2\cdot4^{m+1}}}{\frac{k}{4^{m+1}}}\\\\ &=\frac{k+1}{2k}\\\\ &=\frac12+\frac1k\\\\ &<\frac12+\frac1{2^{m+1}}\;. \end{align*}

It follows that $\lim\limits_{x\to 0^+}f(x)=\frac12$ and hence that if $A^-=\{-x:x\in A^+\}$, then the set $A=A^-\cup A^+$ has the desired property.

• My only question is, why is $f$ increasing when $k$ is even? As far as I can see, for $x_1, x_2$ with $\frac{k}{4^{m+1}} \leq x_1 < x_2 < \frac{k+1}{4^{m+1}}$, the value of $f$ on $x_1$ is equal to $\frac{m(A^{+}\cap (0,x_1))}{x_1}$ which is strictly lower than the value $\frac{m(A^{+}\cap (0,x_1))}{x_2}$ which is also strictly lower than $\frac{m(A^{+}\cap (0,x_1))}{x_2} + \frac{m(A^{+} \cap (x_1,x_2)}{x_2} = f(x_2)$. This happens because at the interval $[\frac{k}{4^{m+1}}, \frac{k+1}{4^{m+1}})$, all numbers belong to $A^{+}$. Commented Oct 7, 2013 at 20:47
• @John: $f$ increases on intervals in $A^+$ because if $0<a<b$ and $c>0$, then $$\frac{a}b<\frac{a+c}{b+c}\;.$$ Think of $\frac{a}b$ as the value of $f(x)$, and $\frac{a+c}{b+c}$ as the value of $f(x+c)$. Commented Oct 7, 2013 at 20:57

Divide the interval $[2^{-k-1}, 2^{-k}]$ into $N(k)$ subintervals which are alternately included in $A$ or excluded from it. Then the difference quotient $(f(x) - f(0))/x$ for $x$ in the first subinterval will vary between $1/2$ and $\frac{1/2 + 1/N(k)}{1 + 1/N(k)}$. So as long as $N(k) \rightarrow \infty$ the limit will exist at $0$.