Estimate the area underneath the curve by evaluating the Rieman sum using 6 rectangles

Split up the interval [0, 4] into 6 subintervals of equal length (4-0)/6 = 2/3:
[0, 2/3], [2/3, 4/3], [4/3, 2], [2, 8/3], [8/3, 10/3], [10/3, 4]
The right endpoints form an arithmetic sequence,
[tex]r_i=\dfrac23+\dfrac{2(i-1)}3=\dfrac{2i}3[/tex]
where [tex]i=1,2,3,\ldots,6[/tex].
We estimate the area under the curve over each subinterval by a rectangle with length 2/3 and height equal to the value of the function at the right endpoint. Then the value of the integral is approximately equal to the sum of these rectangles' areas:
[tex]\displaystyle\int_0^4f(x)\,\mathrm dx\approx\dfrac23\sum_{i=1}^6f(r_i)[/tex]
We have [tex]f(x)=20-x^2[/tex], so
[tex]f(r_i)=f\left(\dfrac{2i}3\right)=20-\dfrac{4i^2}9[/tex]
[tex]\implies\displaystyle\int_0^4f(x)\,\mathrm dx\approx\dfrac{40}3\sum_{i=1}^61+\left(\frac23\right)^3\sum_{i=1}^6i^2[/tex]
Recall that
[tex]\displaystyle\sum_{i=1}^n1=n[/tex]
[tex]\displaystyle\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}6[/tex]
[tex]\implies\displaystyle\int_0^4f(x)\,\mathrm dx\approx\dfrac{40}3+\left(\frac23\right)^3\frac{6\cdot7\cdot13}6=\frac{1088}{27}[/tex]