We can use Maple to see and evaluate Riemann Sums.
> f := x -> exp(-x^2);
Notice that to use the function e^x, I have to type exp(x)!
> plot(f(x),x=0..1, filled=true, color=grey);
>
I'd like to approximate this area, by subdividing [0,1] into 4 subintervals. Before I get to work on figuring that out, I can graph it using Maple. But first I have to load the student package.
> with(student);
> leftbox(f(x),x=0..1,4);
Now that I can look at it, I can see that the base of each rectangle is 1/4.
I can also see that the height of the leftmost rectangle is f(0), the height of the second is f(1/4), the height of the third is f(1/2), and the height of the fourth is f(3/4). I can use that to write the sum.
> L_4 := 1/4*(f(0)+ f(1/4)+f(1/2)+f(3/4) );
This is the exact approximation, but since I'm just approximating anyway, I might as well ask Maple to approximate this for me.
> evalf(%);
>