Consider the following function definition of $f:[0,1]\to \mathbb{R}$
$$f(0) = 0$$ and
$$ f(x) = \frac{1}{2^n}$$
when $$\frac{1}{2^{n+1}}<x\le\frac{1}{2^n}$$
I need to use the criteria of integrability, to prove that this function is integrable. This criteria is the one about the superior and inferior integrals.
So, I must prove that the inferior and superior integrals are the same.
That's what I tried: (ps: I know that there might be better ways to solve this, but you'd really help me by following my reasoning and pointing where did I do wrong)
$$\underline{\int_{a}^b}f(x) dx = \sup S(f, P) = \sup \sum_{i=1, t_i \in P} m_i(t_{i}-t_{i-1})$$
where $m_i = \inf\{f(x), x\in [t_i, t_{i-1}]\}$.
Now, for every $x\neq 0 \in [a,b]$, I can find $n$ such that $\frac{1}{2^{n+1}}<x\le \frac{1}{2^n}$. If I partition my set in like, $100$ points, there will be some 'gaps' in the form $[t_{j}-t_{j-1}]$ in which the function will always be the same, because in that interval, there would be only one option for $\frac{1}{2^{n+1}}$ and $\frac{1}{2^n}$ to have $x$ in the middle. For example, in the interval $[\frac{1}{4},\frac{1}{2}]$ there would be a lot of points inside it such that $\frac{1}{2^{1+1}}<x\le \frac{1}{2^{1}}$ and thus the value of the function in this entire interval would be $\frac{1}{2}$. Of course the intervals of the partition wouldn't be always exactly powers of $2$, but they will contain at least parts of it... So, in these intervals where the function has always the same value, the $m_i$ of the interval would be the value of the function, because it's constand, and $m_i$ is the $\inf$.
So, in pratice, I think that the sum would resolve to something like this:
$$\sup \sum_{i=1, t_i \in P} m_i(t_{i}-t_{i-1})$$
where each $m_i$ would be a power of $2$, that is, in the form $\frac{1}{2^n}$. Lots of them would be included in the same partition, for example, in $[\frac{1}{4}, \frac{1}{2}]$. Suppose this occurs, so we have:
$$\frac{1}{2^k}(a_0-b_0)+\frac{1}{2^k}(a_1-b_1)+\cdots +\frac{2}{^k}(a_j-b_j)$$
then they could be grouped like this:
$$\frac{1}{2^k}(a_0-b_0+a_1-b_1+\cdots +a_j-b_j)$$
in which $(a_0-b_0+a_1-b_1+\cdots +a_j-b_j)$ would sum to the entire interval where $f(x)=\frac{1}{2^n}$, that is, the sum is $\frac{1}{2^n}-\frac{1}{2^{n+1}}$
So in the end, we would sum something like this:
$$\sum_{k=1}^{\infty} \frac{1}{2^k}\left(\frac{1}{2^k}-\frac{1}{2^{k+1}}\right)$$
I don't know if the reasoning above is correct, but I know that if I do the same for the inferior integral, which involves sums of $M_i$'s, which are the superiors of the function values in such intervals, will also be the value of the function in the interval. So in pratice, $m_i = M_i$ and thus the inferior and superior integrals must be the same.
Am I correct?