I know how to calculate upper and lower Riemann sums over some $[0,a]$, e.g. $f(x)=x^3$
$$ M_k(f)= (\frac{ka}{n})^3, m_k(f)=(\frac{(k-1)a}{n})^3$$ $$ U(P_n,f)=\sum^n_{k=1}(\frac{ka}{n})^3\times\frac{a}{n}=\frac{a^4}{n^4}\sum^n_{k=1}k=\frac{a^4}{n^4}\times\frac{n(n+1)}{2}$$
Then just taking the limit as $n\rightarrow\infty$ and repeating similar for the lower Riemann sum.
But how would I calculate this same function over an interval such as $[2,a]$ or $[a,b]$?
I've tried taking $[1,a]$ by setting $M_k(f)=(\frac{k(a-1)}{n})^3$ and then $U(f,P)=\sum^n_{k=1}\frac{k(a-1)}{n}\times\frac{a-1}{n}$ but upon taking the limit I'm left with $\frac{(b-1)^2}{2}$ and not $\frac{b^2-1}{2}$
Can anyone show me where I'm going wrong?