For an integrable function, does there exist a sequence of partitions with this property. Assume you have the measurespace $([a,b],\mathcal{B}([a,b],l)$, where $l$ is the Lebesgue measure. Assume also you have an integrable function $f [a,b]\rightarrow \mathbb{R}$ on the measure space.
For a partition of $[a,b]$, $\Pi=\{t_0=a<t_2,\cdots,t_n=b\}$, define
$$I(\Pi)=\sum\limits_{i=0}^{n-1}f(t_i)\cdot1_{\{x: |f(x)|<\infty\}}(t_i)(t_{i+1}-t_i).$$
For an arbitrary sequence of partitions, $\Pi_n$, with $\max_{i \in \{0,\cdots n-1\}}(t_{i+1}-t_i)\rightarrow 0$, I am quite sure it is not the case that
$$\limsup\limits_{n \rightarrow \infty}I(\Pi_n)=\liminf\limits_{n \rightarrow \infty}I(\Pi_n)=\int_{[a,b]}f(x)dx.$$
But I am wondering what happens if we may choose a special sequence so that it holds, so what I am wondering is:
Case 1:
Does there exist a sequence of partitions where the above equality holds?
Case 2:
If for a partition $\Pi$ we define
$$f_{\Pi}(t)=\sum\limits_{i=0}^{n-1}f(t_i)\cdot1_{\{x: |f(x)|<\infty\}}(t_i)1_{x \in [t_i,t_{i+1})}(t),$$
and we still assume that $f$ is integrable, does there exist a sequence of partitions $\{\Pi_n\}$ so that
$$\int_{[a,b)}|f(t)-f_{\Pi_n}(t)|dt\rightarrow0?$$
Case 3
If we also assume that $f \in L^2([a,b])$, and let $f_\Pi$ be as above, does there exist a sequence of partitions $\{\Pi_n\}$ such that
$$\int_{[a,b)}|f(t)-f_{\Pi_n}(t)|^2dt\rightarrow0?$$
 A: Yes, it is possible to find such a partition, and the proof relies mostly on the Lebesgue differentiation theorem . What the Lebesgue theorem says is that for almost every $x \in [a,b]$, $\lim \limits_{r \to 0}  \displaystyle{\frac{1}{2r} \int_{x-r}^{x+r}} |f(t)-f(x)| dt = 0$.
I'll answer directly Case 2, and you can prove Case 3 in a similar way

Hypothesis 1: assume $f$ is bounded
For $k \ge 1$, $\varepsilon>0$, denote $I_{k, \varepsilon} = \Big\{x \in [a,b]: \quad \forall 0 < r \le \frac{1}{k}, \ \displaystyle{\frac{1}{r} \int_{x-r}^{x+r}} |f(t)-f(x)|dt < \varepsilon\Big\}$. For a given $\varepsilon$, these sets are increasing with $k$, and the Lebesgue differentiation theorem yields that almost every $x$ is in $\bigcup \limits_{k\ge 1} I_{k, \varepsilon}$.
Let us now set $\varepsilon_0$ a final limit for the approximation error (and find a partition that does the deed). We also introduce $\delta>0$, and will try to control the integral precisely everywhere except on a set of measure $\delta$. The value of $\delta$ will be set later.
Let us take $k$ large enough that we have (Hyp $1$): $\mu\Big(\big[a, b \big] \backslash I_{k, \frac{\varepsilon_0}{2(b-a)}}\Big) < \frac{\delta}{2}$. Denoting $\varepsilon_1 = \frac{\varepsilon_0}{2(b-a)}$, we'll choose $x_1 < x_2 < ... < x_n$ in $I_{k, \varepsilon_1}$ such that $\mu\Big( \bigcup \limits_{i=1}^n [x_i, x_i + r[\Big) \ge b-a -  \delta$, where $x_{i+1}> x_i+r$ for all $i$ and $x_n+r > b$.

Proof: We can find $x \in ]a, b] \cap I_{k,\varepsilon_1}$ such that $\mu\big([a,x_1[ \backslash I_{k,\varepsilon_1}\big) \le \frac{\delta}{4}$, by choosing it arbitrarily close to $\inf I_{k,\varepsilon_1}$. By applying the same reasoning with the infimum of $]x_i+r, b] \cap I_{k,\varepsilon_1}$, for $i \ge 1$ we can find $x_{i+1} \in I_{k,\varepsilon_1}$ such that $x_{i+1} > x_i + r$ and $\mu\big([x_i+r, x_{i+1}[ \backslash I_{k,\varepsilon_1}\big) \le \frac{\delta}{2^{i+2}}$, until we find $x_n$ such that $x_n + r > b$. Then since the $[x_i+r, x_{i+1}[$ are distinct, \begin{align*} \mu\Big([a,b] \backslash \bigcup \limits_{i=1}^n [x_i, x_i+r[\Big) & \le  \mu\big(I_{k,\varepsilon_1}\big) + \mu\Big(\big([a,x_1[ \cup \bigcup \limits_{i=1}^{n-1} [x_i+r, x_{i+1}[\big) \backslash I_{k,\varepsilon_1} \\ & = \mu\big(I_{k,\varepsilon_1}\big) + \mu\big([a, x_1[\backslash I_{k,\varepsilon_1}\big) + \sum \limits_{i=1}^{n-1} \mu\big([x_i+r, x_{i+1}[ \backslash I_{k,\varepsilon_1}\big) \\ & < \frac{\delta}{2} + \frac{\delta}{4} + \sum \limits_{i=1}^{n-1} \frac{\delta}{2^{2+i}} \le \delta \end{align*}

Now note that since $x_j \in I_{k,\varepsilon_1}$, by definition of that set, we have $$\forall j, \ \ \forall r \le \frac{1}{k}, \ \displaystyle{\frac{1}{r}\int_{x_j}^{x_j+r}} |f(t)-f(x_j)|dt \le \frac{\varepsilon_0}{2(b-a)} \tag{$\star$}$$
To simplify notations, we are going to keep talking about the last interval as $[x_n, x_n+r[$, which goes further than $b$. Think of it instead as $[x_n, b]$. We denote $$\Pi = \{a, x_1, x_1+r, x_2, x_2+r, ..., x_n, b\}$$ and $f_{\Pi}$ the associated approximation. Using $(\star)$, we get:
$$\displaystyle{\int_{\bigcup \limits_{i=1}^n [x_i, x_i+r[}} |f(t) - f_{\Pi}(t)| \le \mu\big(\bigcup \limits_{i=1}^n [x_i,x_i+r[\big) \cdot \frac{\varepsilon_0}{2(b-a)} \le \frac{\varepsilon_0}{2}$$
Denoting $B = [a,x_1[ \cup \bigcup \limits_{i=1}^{n-1} [x_i+r, x_{i+1}[$, by construction we have $\mu(B) \le \delta$, so $$\displaystyle{\int_B} |f(t) - f_{\Pi}(t)|dt \le 2 ||f||_{\infty} \delta.$$
Thus the total error is $\frac{\varepsilon_0}{2} + 2 ||f||_{\infty} \delta$, and it suffices to take $\delta = \frac{\varepsilon_0}{4 ||f||_{\infty}}$ to find a partition $\Pi$ with $||f - f_{\Pi}||_1 \le \varepsilon_0$.
