Riemann sum using the midpoint Let $f : [−1, 0] → \mathbb{R}, x → x − x^2, n ∈ \mathbb{N}$ and let $P_n : x_0, . . . , x_n$ be an equal partition of $[−1, 0]$.


*

*Compute the Riemann sum $S_{P_n} (f, z_1, . . . , z_n)$, when $z_k$ is the midpoint of $[x_{k−1}, x_k]$ for every $k ∈ {1, . . . , n}$.


Im not familiar with the usage of the midpoint and cannot get this to work. All help would be appreciated.
 A: $x_j=-1+j/n\implies z_j=(x_j-x_{j-1})/2+x_{j-1}=x_{j-1}+1/(2n)=-1+(j-1)/n+1/(2n)=-1+(2j-1)/(2n)$.  
So $f(z_j)=-1+(2j-1)/(2n)-(-1+(2j-1)/(2n))^2=-2+3(2j-1)/(2n)-(2j-1)^2/(4n^2)$.
So $R=\sum_{j=1}^n f(z_j)∆x=\sum_{j=1}^n(-2+3(2j-1)/(2n)-(2j-1)^2/(4n^2))(1/n)$
You should be able to get rid of the $j$'s using the familiar formulas for $\sum i$ and $\sum i^2$.
A: You should understand the definition of a Riemann sum. It is based on notion of partition.
A partition of a closed interval $[a, b] $ is a finite set $P$ of points from the interval $[a, b] $ such that both end points $a, b$ are in $P$. The elements of a partition are usually written in ascending order. Thus we say that $$P=\{x_0,x_1,x_2,\dots,x_n\}$$ is a partition of $[a, b] $ if $$a=x_0<x_1<x_2<\dots<x_n=b$$ The partition $P$ is said to be an equipartition or uniform partition if $$x_1-x_0=x_2-x_1=\dots=x_n-x_{n-1}$$ and clearly each of the above difference equals $h=(b-a) /n$ and $$x_k=x_0+kh=a+k\cdot\frac{b-a}{n}$$ Given any partition $$P=\{x_0,x_1,x_2,\dots, x_n\} $$ of $[a, b] $ it is usual in theory of Riemann integration to choose another set $$T=\{t_1,t_2,\dots,t_n\}$$of points called tags such that $$t_k\in[x_{k-1},x_k],k=1,2,\dots,n$$ Understand that a choice of tags is always based on a specific partition.
Given a function $f:[a, b] \to\mathbb {R} $, partition $P=\{x_0,\dots,x_n\}$ of $[a, b] $ and a corresponding set of tags $T=\{t_1,\dots,t_n\}$ we define a Riemann sum $$S(f, P, T) =\sum_{k=1}^{n}f(t_k)(x_k-x_{k-1})$$ The notation in your question for above sum is $S_{P} (f, t_1,t_2,\dots,t_n)$. 

For the current question $[a, b] =[-1,0],f(x)=x-x^2$ and $P_n$ is an equipartition with $$x_k=a+k\cdot\frac {b-a} {n} =\frac{k-n} {n} $$ The tags $z_k$ are mid points of interval $[x_{k-1},x_k]$ so that $$z_k=\frac{x_{k-1}+x_k}{2}=\frac{k-1-n+k-n}{2n}=\frac{2(k-n)-1}{2n}$$ and the desired Riemann sum is $$S_{P_n} (f, z_1,\dots,z_n)=\sum_{k=1}^{n}f(z_k)(x_k-x_{k-1})$$ which equals $$\frac{1}{n}\sum_{k=1}^{n}(z_k-z_k^2)$$ Now you can substitute the value of $z_k$ and do a little bit of algebra. 
