The area is the sum of 'n' rectangle areas.
The width of the rectangle is size of interval, (domain size)/n
The height of each rectangle is f(interval) as interval moves along domain.
For this example, domain size = 3-1 = 2
size of interval = 2/n
height varies from f(1) to f(3), increasing by 2/n each time.
f(1+(2/n)i)
Putting this together, the area is the sum of:

Since you are given the function f(x). Sub input into f(x) to get area in terms of n and i.

Finally, the summation is: