Prove $f(x) = x^{2}$ is Riemann integrable Let $f:[a,b] \to \mathbb R$  with $f(x) = x^2$, show $\int_{a}^{b}f(x)dx = \frac{1}{3}(b^{3}-a^{3})$
Here is my trial:
Let $X =(x_{0},\dots,x_{n})$ be a partition on $[a,b]$, let $t_{i} \in [x_{i-1},x_{i}], i=\{1,\dots,n\}$
Then $|\sum_{i=1}^{n}f(t_{i})\triangle_{i}x - \frac{1}{3}(b^{3}-a^{3})| = |\sum_{1}^{n}t_{i}^{2}\triangle_{i}x - \frac{1}{3}\sum_{1}^{n}x_{i}^{3}-x_{i-1}^{3}| \\
 = |\sum_{i=1}^{n}[t_{i}^{2} - \frac{1}{3}(x_{i}^{2} + x_{i}x_{i-1} + x_{i-1}^{2})] \triangle_{i}x|$
But now I got stuck... can someone help me out?
 A: I guess this answer has been given many times, but I am too lazy to find a reference, I prefer to write it again. It is useful to prove first that
$$ \sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}\tag{1} $$
holds. That can be done in many ways, for instance by induction or by the hockey-stick identity:
$$ \sum_{k=1}^{n}k^2 = \sum_{k=1}^{n}\left[2\binom{k}{2}+\binom{k}{1}\right] = 2\binom{n+1}{3}+\binom{n+1}{2}.\tag{2}$$
For the function $f(x)=x^2$ over the interval $(0,1)$, the upper and lower Riemann sums for uniform partitions are given in terms of
$$ \frac{1}{N}\sum_{k=1}^{N}\left(\frac{k}{N}\right)^2,\qquad \frac{1}{N}\sum_{k=0}^{N-1}\left(\frac{k}{N}\right)^2 \tag{3} $$
and the limit of both, as $N\to +\infty$, equals $\frac{1}{3}$ by $(1)$. At last,
$$ \int_{a}^{b}x^2\,dx = \int_{0}^{b}x^2\,dx - \int_{0}^{a}x^2\,dx = (b^3-a^3)\int_{0}^{1}x^2\,dx\tag{4} $$
proves the claim.

Addendum. With a geometric flavour (i.e. integrating along sections), $\int_{a}^{b}x^2\,dx$, if $0<a<b$, is just $\frac{1}{\pi}$ times the volume of a frustum of a cone with height $b-a$ and radii of the bases given by $a$ and $b$. The formula
$$ V = \frac{\pi h}{3}(R^2+Rr+r^2) $$
is known since the Babylonian period and can be easily proved through similarities, once we know that the volume of a cone (or pyramid) is $\frac{1}{3}h\cdot A_{\text{base}}$. Through Cavalieri's principle and the property of linear maps of proserving ratios of volumes, the whole question boils down to finding the volume of a pyramid given by the convex envelope of a face of a cube and the center of the same cube. That trivially is $\frac{1}{6}V_{\text{cube}}$ by symmetry.
A: Assume $0\leq a<b$.(or $a<b\leq 0)$ (For the case $a<0<b$, we may come up with the equation $\int_{[a,b]} f = \int_{[a,0]} f + \int_{[0,b]} f $.)
Following the notation above, we may observe ${x_{i-1}}^2 < x_ix_{i-1} < {x_i}^2$ for each $i=1,\cdots,n$ so that $${x_{i-1}}^2 < \frac{1}{3}({x_{i-1}}^2+x_{i-1}x_i+{x_i}^2)< {x_i}^2$$
with ${x_{i-1}}^2 \leq {t_i}^2 \leq {x_i}^2$ obviously.( for $a<b\leq0$, "$<$" would be "$>$")
Then, $$|{t_i}^2-\frac{1}{3}({x_{i-1}}^2+x_{i-1}x_i+{x_i}^2)|<|{x_i}^2-{x_{i-1}}^2|={x_i}^2-{x_{i-1}}^2$$($-{x_i}^2+x_{i-1}^2$ for $a<b\leq0$ )
Consequently, if we take $d=d([a,b])$ as $max\{\Delta_1 x,\cdots,\Delta_n x\}$,
the last term you wrote can be bounded as follows.
$$\left|\sum_{i=1}^n \left({t_i}^2-\frac{1}{3}({x_i}^2+{x_{i-1}x_i}+{x_{i-1}}^2)\right)\Delta_i x\right| \leq \sum_{i=1}^n \left|{t_i}^2-\frac{1}{3}({x_i}^2+{x_{i-1}x_i}+{x_{i-1}}^2)\right|\Delta_i x $$
$$\leq d \sum_{i=1}^n \left|{t_i}^2-\frac{1}{3}({x_i}^2+{x_{i-1}x_i}+{x_{i-1}}^2)\right| \leq d \sum_{i=1}^n \left| {x_i}^2 -{x_{i-1}}^2\right| = d|b^2-a^2|$$
As a result, $\sum_{i=1}^n f(t_i)\Delta_i x \rightarrow \frac{1}{3}(b^3-a^3)$ as
$d\rightarrow0$, regardless of the choice of $\{t_i\}$. (Rimann integrability ?)
A: $f(x) = x^2$ is continuous everywhere, and hence Riemann-integrable. QED.
