Function that satisfies $\int_{2^{-n}}^{2^{-(n+1)}} f(x) dx = \int_{2^{-(n+1)}}^{2^{-(n+2)}} f(x) dx$ I was wondering if anyone would be able to help me find a function that satisfies this condition:
$$\int_{2^{-n}}^{2^{-(n+1)}} f(x) dx = \int_{2^{-(n+1)}}^{2^{-(n+2)}} f(x) dx$$
It needs to be able to do this on the interval [0, 1].
I've tried a few functions that look similar to what I'm looking for, like $f(x) = \frac{x}{x-1}$, or $f(x) = \frac{x^2}{x-1}$, however none of them have been the solution.
I'd appreciate help on this problem, I'm having some trouble figuring out where to start.
 A: Differentiate both sides with respect to $n.$  This leads to a recurrence relation $a_{n+2} - 4a_{n+1} + 4 a_n=0,$ where $a_n = f(2^{-n}).$    The general solution of the recurrence relation is $a_n = c_1 2^n + c_2 n 2^n.$   You can recover $f(x)=1/x$ as above in this fashion.     The other solution leads to $f(x) = \frac{\log x}{x},$  for which the integrals differ by a non-zero constant. 
A: Define
$$f(x) = k \cdot 2^{n+1} \,\,\,\, \forall x \in \left(\dfrac1{2^{n+1}},\dfrac1{2^{n}}\right]$$
where $k \in \mathbb{R}$. We then have
$$\int_{2^{-n}}^{2^{-(n+1)}} f(x) dx = k \cdot 2^{n+1} \cdot \left(\dfrac1{2^{n+1}} - \dfrac1{2^n}\right) = -k$$
You can obtain continuity or smoothness of any order by defining the function piecewise on the intervals $\left(\dfrac1{2^{n+1}},\dfrac1{2^{n}}\right]$, respecting the boundary condition for each interval.
A: Try the function $f(x)=\frac{1}{x}$.
This is not defined at $0$, but you can define it arbitrarily there. Notice that
$$\int_{2^{-(n+1)}}^{2^{-n}} \frac{1}{x} \;dx = \log 2$$ which doesn't depend on $n$.
