How To Calculate The Riemann Sums
Still on the topic of the Definite Integral, today i will be giving examples on how to calculate the Riemann sums. the Riemann sums are simple to calculate but it is unfortunate that some beginners of calculus tend to find it confusing distinguishing  between the Riemann sums and the Riemann integrals. I will treat the Riemann integrals in my later topics.
Definition Of The Riemann Sums

Let a<b and let Δx be a positive real number, then the Riemann sum is baf(x)Δx is defined as the sum baf(x)Δx=f(x0)Δx+f(x1)Δx+...+f(xn1)Δx+f(xn)(bxn)
.
Where n is the largest integer such that a+nΔxb and x0=a,x1=a+Δx,...,xn=a+nΔx,b

are the partition points .
If xn=b, The last term f(xn)(bxn) is zero. The Riemann sums baf(x)Δx is a real function of 3 variables a,b, and Δx.
baf(x)Δx=s(a,b,Δx)

This symbol x in this expression is known as a dummy or bound variable because baf(x)Δx does not depend on x.
The importance of this dummy variable is that it allows us to use more compact notation,writing f(x)Δx just once.
Instead of writing f(x0)Δx,f(x1)Δx,f(x2)Δx and so on.Now we can see that it will be valid if we make Δx smaller we can get the Riemann sum as close to the area as we wish.
Example 1
Let f(x)=12x, the region under the curve from x=0 to x=2 is a triangle with base 2 and height 1.
Solution
Since the base is 2 and height is 1, and we know that the area of a triangle is A=12bh=12×2×1=1.
Now we know that f(x)=12x and area=1.
Now we compute the Riemann sums and see if our value will slowly approach the value of the area which is 1.
The interval [0,2] can be partitioned into four subintervals
[0,12],[12,1],[1,32],[32,2]
or [0,12,1,32,2]
now simply let Δx=12 and take the function of the subinterval. i,e let
xn=0,12,1,32 and f(xn)=12xf(0)=0f(12)=14f(1)=12f(32)=34

Now we proceed to finding the Riemann sums
21f(x)Δx since the interval is between 0 and 2.
21f(x)Δx=0.(12)+(14)(12)+12(12)+34(12)=68

Now we want to see if the values of the Riemann sums will get closer and closer to 1, since 1 is the area of the triangle.
Take Δx=14 and we further sub-divide the interval into 8 subinterval
xn=0,14,24,34,44,54,64,74f(xn)=0,18,28,38,48,58,68,78

Δx=14
The Riemann sum for this is
21f(x)Δx=78

Hence we can see that the value is getting closer and closer to 1. and this is what we want, for any value of Δx that we take, we expect the Riemann sum to gradually approach the value 1.
Example 2
Let f(x)=1x2 be defined on the closed interval I=[1,1].The region under the curve is a semi-circle of radius 1.compute the Riemann sums.
Solution
We know from our plane geometry that the area of a semi-circle is Area=πr22 but r=1 so Area=π122=π2 in which π=3.142 then the area is 3.1422=1.57
Now lets go straight to the question i.e lets compute the Riemann sums for f(x) to see how close they are to the value of the area=1.57. but first we need to get subintervals of the interval I=[1.1] which is I1=[1,12,0,12]
so let Δx=12 so that f(I1)=1x2
f(1)=0f(12=32f(0)=1f(12)=34

Now the Riemann sums will be
11f(x)Δx=0.(12)+(32).(12)+(1)(12)+(32)(12)=34+12+34=3+2+34=1+32=1.37

Next we take Δx=15 then the interval [1,1] is divided into ten subintervals i.e
I1=[1,45,35,25,15,0,15,25,35,45]f(1)=0f(45)=35f(35)=45f(25=215f(15)=245f(0)=1f(15)=245f(25)=215f(35)=45f(45)=35

And now the Riemann sums will be
11f(x)Δx=15[0+35+45+215+245+1+245+215+45+35]1.52

Thus we are getting closer to the actual area=π21.57.
Now we can observe that by taking Δx to be smaller, we can get the Riemann sum to be as close to the area as we want.