Riemann sums lower and upper sums $x^2+x+1$ between $x=-1$ and $x=3$ two subintervals
$x_0=-1,x_1=2,x_2=3$ find lower and upper Riemann sums.
workings
lower bound
$(b-a)/n=2$, $2f(0)+2f(1)=2(1)+2(7)=16$ 
teacher solution $37/4$ 
not sure how this solution was derived
 A: Upper and lower riemann sums don't work with endpoints, but with the maximum and minimum value.
For the upper you value the function is the point of the subinterval when it is max, for the lower you value it in the point where is min.
It has nothing to do with left or right end points of each interval ;-) 
A: On the interval $[-1,2]$ the minimum of $f(x)=x^2+x+1$ occurs at its vertex, which has first coordinate $x=-1/2.$ This can be checked using the derivative $f'(x)=2x+1$ which set to zero gives $x=-1/2,$ but this in itself doesn't force it to be the minimum, one also has to compare the $f(x)$ values at the two endpoints $-1$ and $2.$ Then $f(-1)=1,\ f(-1/2)=3/4,\ f(2)=7.$ Now the length of the interval $[-1,2]$ is $3$ which is multiplied by the minimum just found, namely $3/4,$ to get the contribution to the Riemann sum from the left interval. So that is $9/4$ so far. The other interval is $[2,3]$ and since $f$ is increasing on that interval the min occurs when $x=2$ and is $f(2)=7.$ Since the interval $[2,3]$ has length $1$ this means the second interval just contributes $7$ to the Riemann sum, so that adding both gives $9/4+7=37/4.$
