Upper and lower Riemann sums problem Let $c > 0$ and $f(x) = x, x\in [0,c].$ Let $P = \{x_0, x_1, x_2,...,x_n\}$ be a partition of $[0,c]$ with $x_i = \frac{i}{n}c, i = 0,1,2,...,n.$


*

*Find $U(P,f).$

*Find $\lim_{n \to \infty} U(P,f).$

*Find $L(P,f).$

*Find $\lim_{n \to \infty} L(P,f).$


Attempt: 


*

*$U(P,f) = \sum_{i=0}^{n} f(x_i)\cdot \Delta x = \sum_{i=0}^{n} c\frac{i}{n}\cdot \frac{c}{n} = \frac{c^2}{n^2}\sum_{i=0}^{n} i = \frac{c^2}{n^2}\frac{n(n-1)}{2}$

*$\lim_{n \to \infty} U(P,f) = \frac{c^2}{2}$

*$L(P,f) =\sum_{i=0}^{n} (f(x_i) -\Delta x)\cdot \Delta x = \sum_{i=0}^{n} (c\frac{i}{n} - \frac{c}{n})\cdot \frac{c}{n} = ... = \frac{c^2}{n^2}\cdot \{\frac{n^2 - 3n + 2}{2}\}$

*$\lim_{n \to \infty} L(P,f) = \frac{c^2}{2}$ 
Since, I don't know what $c$ and $n$ are, I can't simplify any further. So, can anyone please tell me whether or not I did this right? If not, please find me the mistakes. Thanks. 
 A: It's all right, but you need to be clear about your partition and your indexes, and the summation in the end:
$$U(P,f) = \sum_{i=1}^{n} f(x_i)\cdot \Delta x = \sum_{i=1}^{n} c\frac{i}{n}\cdot \frac{c}{n} = \frac{c^2}{n^2}\sum_{i=1}^{n} i = \frac{c^2}{n^2}\frac{n(n+1)}{2}$$
$$L(P,f) =\sum_{i=1}^{n} (f(x_{i-1}))\cdot \Delta x = \sum_{i=1}^{n} \bigg(c\frac{i-1}{n} \bigg)\cdot \frac{c}{n}  = \frac{c^2}{n^2}\cdot\sum_{i=1}^{n} (i-1) = \frac{c^2}{n^2} \frac{n(n-1)}{2} $$
A: In both (1) and (3) you should have only $n$ terms in your sum, but you have $i$ from $0$ to $n$, which makes $n+1$ terms (the dreaded "off by one" error). The maximum value of $f(x)$ for $x\in [x_{n-1},x_n]$ is $x_n$, so $x_0$ is never used as a function value. Therefore in (1) the extra term is the $0$'th. Make the sums there from $1$ to $n$.
Your final formula for (1) is off: the sum of $1$ through $n$ is $\frac{n(n+1)}2$, not $\frac{n(n-1)}2$.
Despite those errors in (1), (2) is correct.
Your sums in (3) also have one too many terms. The minimum value of $f(x)$ for $x\in [x_n,x_{n+1}]$ is $x_n$, so use the sum from $0$ to $n-1$:
$$\sum_{i=0}^{n-1}c\frac in\cdot\frac cn=\frac{c^2}{n^2}\frac{n(n-1)}2$$
That last value is due to the fact that you are summing up to $n-1$, not $n$ as in (1).
Number (4) is correct.
