# Calculate the integral `int_0^4(5-x/2)dx` using Riemann Sum and a regular partition with n subintervals.

Consider the domain of the integral from x=0 to x=4 and divide it into n equal intervals.  Then each interval has width `Delta x = 4/n` and the `i^{th}` interval has beginning x-value `x_i=iDelta x = {4i}/n` .  This means the function `f(x)=5-x/2` can be evaluated to be `f(x_i)=5-{2i}/n` .

The area of the `i^{th}` rectangle the domain is then `A_i=f(x_i)Delta x = (5-{2i}/n)4/n=20/n-{8i}/n^2` .

The integral now becomes the sum of the rectangles.

`int_0^4(5-x/2)dx`

`=lim_{n->infty}sum_{i=0}^{n-1}(20/n-{8i}/n^2)`

`=lim_{n->infty}20-8/n^2{(n-1)(n)}/2`

`=lim_{n->infty}(20-{4n^2-4n}/n^2)`

`=20-4`

`=16`

The integral evaluates to 16.

Approved by eNotes Editorial Team