Problem:
Using Maple and the method of Riemann Sums, evaluate the integral


Visualization:

Right-hand endpoints:

> f := x-> x^2+3*x;

> deltax:=(3-(-1))/n;
> sum(f(-1+i*deltax)*deltax,i=1..n);

> simplify(");
> limit(", n=infinity);

Left-hand endpoints:

> sum(f(-1+(i-1)*deltax)*deltax,i=1..n);

> simplify(");
> limit(", n=infinity);

Midpoints:

> sum(f(-1+(i-1/2)*deltax)*deltax,i=1..n);

> simplify(");
> limit(", n=infinity);