# Riemann-integrable function

The following multiple choice question was asked in my exam but I don't know how to proceed:

Define $f:[0,1]\to [0,1]$ by $\displaystyle f(x)=\frac{2^{k}-1}{2^{k}}$ for $\displaystyle x\in [\frac{2^{k-1}-1}{2^{k-1}},\frac{2^{k}-1}{2^{k}}],k\geq 1$. Then $f$ is a Riemann-integrable function such that

1.$\displaystyle \int_{0}^{1}f(x)dx=\frac{2}{3}$

2.$\displaystyle \frac{1}{2}<\int_{0}^{1}f(x)dx<\frac{2}{3}$

3.$\displaystyle \int_{0}^{1}f(x) dx=1$

4.$\displaystyle \frac{2}{3}<\int_{0}^{1}f(x)dx<1$. I know that function is said to be Riemann-integrable if its upper Riemann-integral and lower Riemann-integral exists and are same.

-

First of all notice that the map $$x\mapsto \frac{x-1}{x}$$ is increasing. Therefore your function has finite total variation which is equal to the supremum value of the image minus the minimum. Therefore it is $1/2$.
Then you cansay that it is Riemann Integrable, and to compute its integral simply you should compute the sum $$\sum_{k=1}^\infty \frac{2^k-2^{k-1}}{2^k2^{k-1}}\frac{2^k-1}{2^k}.$$ Since it is an infinite sum, and all of the summands are positive, you should be aware that all the partial sums converges.
The the final result will be $$\sum_{k=1}^\infty \frac{2^k-2^{k-1}}{2^k2^{k-1}}\frac{2^k-1}{2^k}=1-\frac{1}{3}=\frac 23.$$
$$\int_0 ^1f=\int_0^{\frac{1}{2}} \frac{1}{2}+\int_{\frac{1}{2}}^{\frac{3}{4}}\frac{3}{4}+\int_{\frac{3}{4}} ^{\frac{7}{8}}\frac{7}{8}+... =\sum_{k=1}^\infty \int_{\frac{2^{k-1}-1}{2^{k-1}}} ^{\frac{2^k-1}{2^k}} \frac{2^k-1}{2^k}=\sum_{k=1}^\infty (\frac{2^k-1}{2^k})(\frac{2^k-1}{2^k}-\frac{2^{k-1}-1}{2^{k-1}})=\sum_{k=1} ^\infty (\frac{2^k-1}{2^k})(\frac{1}{2^k})=\sum_{k=1} ^\infty \frac{2^k-1}{2^{2k}}=1-\frac{1}{3}=\frac{2}{3}$$
I found the first equality by testing small values of $k$. I evaluated the integral using FTC. The last summation is a difference of geometric series. "dx" was omitted for convenience. – The Substitute Nov 16 '12 at 8:13