Take any partition $P$ of $[0,1]$ where $P=\{0<\frac{1}{n}<\frac{2}{n}<\ldots<\frac{n-1}{n}<\frac{n}{n}=1\}$
Since $x^2>x^3$ in each subinterval and $\Bbb Q$ is dense in $\Bbb R$ so $M_i=\dfrac{1}{n^2};m_i=\dfrac{1}{n^3}$
Then $U(P,f)=\sum_{i=1}^n M_i\Delta_{i}=\dfrac{1}{n}\{ \dfrac{1}{n^2}+\dfrac{4}{n^2}+\ldots\dfrac{n^2}{n^2}\}=\dfrac{n(n+1)(2n+1)}{6n^3}$ where $M_i=\sup f(x)$ in each subinterval
Again $L(P,f)=\sum_{i=1}^n m_i\Delta_{i}=\dfrac{1}{n}\{0+ \dfrac{1}{n^3}+\dfrac{8}{n^3}+\ldots \dfrac{(n-1)^3}{n^3}\}=\dfrac{n^2(n-1)^2}{4n^4}$
$m_i=\inf f(x)$ in each subinterval
Then as $n\to \infty$ ;$U(P,f)-L(P,f)=\dfrac{1}{3}-\dfrac{1}{4}=\dfrac{1}{12}\text{which does not go to } 0$
Hence $f$ is not $\mathcal R-$ integrable.
Also $\inf\{U(P,f)\}=\frac{1}{6}\{(1-\frac{1}{n})(2+\frac{1}{n}\}=\frac{1}{3}$
Similarly $\sup\{L(P,f)\}=\dfrac{1}{4}$
Suppose $B_1, \ldots, B_n$ are non-overlapping blocks (closed rectangles) such that $A = \cup_{k=1}^n B_k$ and $f|_{B_k}$ is Riemann integrable for all $k$. For any $\epsilon > 0$ there are partitions $P_{B_1}, \ldots, P_{B_n}$ such that for $1 \leqslant k \leqslant n$,
$$U(f, P_{B_k}) - L(f, P_{B_k}) < \frac{\epsilon}{n}$$
The partitions of the individual blocks taken together form a partition $P_A$ of $A$ where
$$U(f,P_A) = \sum_{k=1}^n U(f, P_{B_k}), \quad L(f,P_A) = \sum_{k=1}^n L(f, P_{B_k}),$$
and, thus,
$$U(f,P_A) - L(f,P_A) = \sum_{k=1}^n ( U(f, P_{B_k})- L(f, P_{B_k})) < n \cdot \frac{\epsilon}{n} = \epsilon$$
Therefore, $f$ is Riemann integrable on $A$ (by the Riemann criterion).
Let $P_A$ be an arbitrary partition of $A$. Using vertices of the blocks $B_k$ we can construct a refinement $P'_A \supset P_A$ such that every sub-block of $P'_A$ is contained in some block $B_k$ and we have
$$L(f,P_A) \leqslant L(f,P'_A) = \sum_{k=1}^n L(f, P_{B_k})\leqslant \sum_{k=1}^n U(f, P_{B_k})= U(f,P'_A) \leqslant U(f,P_A)$$
This implies that, for any partition $P_A$,
$$L(f,P_A) \leqslant \sum_{k=1}^n\int_{B_k} f|_{B_k}\leqslant U(f,P_A)$$
Since $f$ has been shown to be Riemann integrable, for any $\epsilon > 0$ there is a partition $P_A$ such that $U(f,P_A) - L(f,P_A) < \epsilon$ and $L(f,P_A) \leqslant \int_Af \leqslant U(f,P_A)$.
Therefore, for every $\epsilon > 0$,
$$\left|\int_Af - \sum_{k=1}^n \int_{B_k}f|_{B_k} \right| < \epsilon \implies \int_Af = \sum_{k=1}^n \int_{B_k} f|_{B_k}$$
Best Answer
Since $\mathbb{Q}$ and $\mathbb{R} \backslash \mathbb{Q}$ are dense. In each Interval there $[a_j,a_{j+1}]$ $\sup\{f(x):x \in [a_j,a_{j+1}]\}= a_{j+1}$ and $\inf\{f(x):x \in [a_j,a_{j+1}]\}= -a_{j+1}$ Therefore
$\overline{\int_{0}^{t}}f dx=t^2/2$,
$\underline{\int_{0}^{t}}fdx=-t^2/2$
Lets assume we want to calculate $\overline{\int_{0}^{t}}f (x) dx$. We take the partition $Z_n=[0,t/n,(2t)/n,...,t]$ note that if $a_j$ denotes the jth term in the partition. $a_j-a_{j+1}=t/n$ and $ t/n\to 0$ for $n\to \infty$ since the supremum of $f$ on each interval is $a_{j+1}=t(j+1)/n$ the integral equals $\lim_{n \to \infty}\sum_{j=1}^n (t/n) \frac{t(j+1)}{n}=t^2/2$