How can I prove every Riemann sum of x^2 of [a,b] is the integral? I find that to prove $\int_a^b x\,dx = (b^2-a^2)/2$ (using the $\epsilon - \delta$ definition of Riemann integrable) is pretty straightforward, and after manipulating some sums, I end up with an expression like 
$\left| \sigma - \frac{b^2 - a^2}{2} \right| < \epsilon$ if $||P||<\delta = \frac{2\epsilon}{b-a}$.
Now for $\int_a^b x^2\,dx$ I start: consider a Reimann sum over $P$ with $n$ subintervals
$\sigma = \sum_{i=1}^n c_i^2 (x_i - x_{i-1})$ where $x_{i-1} \leq c_i \leq x_i$. Note that we can write
$c_i = \frac{x_i+x_{i-1}}{2} + d_i$ where $|d_i| < \frac{x_i - x_{i-1}}{2}$ (first term is midpoint, second term is max difference)
Then I expand this out, and since (intuitively) $d_i$ can get arbitrarily small by making $||P|| < \delta$, from the following expression I can 'remove' the $d_i$ terms from this sum:
$\sum_{i=1}^n \left[ \frac{x_i^3 - x_{i-1}^3}{4} + \frac{x_i^2x_{i-1} - x_i x_{i-1}^2}{4} + d_i^2(x_i - x_{i-1})  + d_i(x_i^2 - x_{i-1}^2) \right]$
Which results in me 'proving' that the sum gets arbitrarily close to
$\frac{b^3-a^3}{4} + \frac{b^2a - a^2b}{4}$ which does not seem right at all :)
Where am I going wrong here?

Let $\{I_i\}_{i=1}^n$ be a partition of $[a,b]$ with $n$ sub intervals. Let us choose the tag of the interval $I_i=[x_{i-1},x_i]$ to be the mid point $q_i=\dfrac{1}{2}(x_{i-1}+x_i)$. 
Then the contribution of this term to the Riemann sum corresponding to the tagged partition 
$Q=\{(I_i,q_i)\}_{i=1}^n$ is  
$h(q_i)(x_i-x_{i-1})=\dfrac{1}{2}(x_i^2-x_{i-1}^2)$ 
So, $S(h; Q)=\dfrac{1}{2}\sum_{i=1}^n(x_i^2-x_{i-1}^2)=\dfrac{b^2-a^2}{2}$ 
If $P=\{(I_i,y_i)\}_{i=1}^n$ is arbitrary tagged partition of $[a,b]$ with $\|P\|<\delta$ so that $x_i-x_{i-1}<\delta$ for $i=1,....,n$. 
Also let $Q$ have the same partition points, but where we choose the tag $q_i$ to be the midpoint of the interval $I_i$. Since both $t_i$ and $q_i$ belong to 
this interval, we have $|t_i - q_i|\lt \delta $. Using the Triangle Inequality, we deduce 
$|S(h,P)-S(h,Q)|\lt \delta \implies |S(h,P)-\dfrac{1}{2}|\lt \delta$ 
So we led to take $\delta_\epsilon \le \epsilon$. If we take $\delta_\epsilon = \epsilon$ then we can retrace the arguement to conclude that h is Riemann Integrable in $[a,b]$ so that $\int_a^b x^2 dx=\dfrac{1}{2}(b^2-a^2)\quad \square$
