Use left and right endpoints and the given number of rectangles to find two approximations of the area of the region between the graph of the function and the x-axis over the given interval. (Round your answers to four decimal places.)

We are given the following function:
[tex]y=9sinx[/tex]We are asked to approximate the area between the function and the x-axis using left endpoints approximation and 6 rectangles.
First, we graph the function:
Now, we divide the domain of the function into 6 equal intervals. The distance between each interval is given by:
[tex]s=\frac{b-a}{N}[/tex]Where:
[tex]\begin{gathered} s=\text{ distance between intervals} \\ b=\text{ maximum point of the domain} \\ a=\text{ minimum point of the domain} \\ N=\text{ number of intervals} \end{gathered}[/tex]In the given domain we have the following maximum and minimum points:
[tex]\begin{gathered} a=0 \\ b=\pi \end{gathered}[/tex]Since we will use 6 rectangles we have:
[tex]N=6[/tex]Substituting we get:
[tex]\begin{gathered} s=\frac{\pi-0}{6}=\frac{\pi}{6} \\ \end{gathered}[/tex]Now, we construct the rectangles with the height of the rectangles being the value of the function at the left endpoint of the rectangle. Like this:
Now, we determine the heights of each of the triangles. We need to evaluate the left endpoint of each triangle in the function.
For R1 we have that the left endpoint is:
[tex]LEP_1=0[/tex]Substituting in the function we get:
[tex]h_1=9sin0=0[/tex]For R2 we have that the left endpoint is:
[tex]LEP_2=s=\frac{\pi}{6}[/tex]Substituting in the function we get:
[tex]h_2=9sin(\frac{\pi}{6})=4.5[/tex]For R3 we have:
[tex]LEP_3=2s=\frac{2\pi}{6}[/tex]Substituting the value in the function we get:
[tex]h_3=9sin(\frac{2\pi}{6})=7.79[/tex]For R4 we have:
[tex]LEP_4=\frac{3\pi}{6}[/tex]Substituting the value in the function we get:
[tex]h_4=sin(\frac{3\pi}{6})=9[/tex]Continuing like this until we get to R6 we get the following heights:
[tex]\begin{gathered} h_1=0 \\ h_2=4.5 \\ h_3=7.79 \\ h_4=9 \\ h_5=7.79 \\ h_6=4.5 \end{gathered}[/tex]Now, the area is the sum of the areas of each of the rectangles. Since the area is the product of the length of the base by the height we get:
[tex]A=sh_1+sh_2+sh_3+sh_4+sh_5+sh_6[/tex]Taking "s" as a common factor we get:
[tex]A=s(h_1+h_2+h_3+h_4+h_5+h_6)[/tex]Substituting the values:
[tex]A=\frac{\pi}{6}(0+4.5+7.79+9+7.79+4.5)[/tex]Adding the values we get:
[tex]A=\frac{\pi}{6}(33.58)=17.58[/tex]Therefore, the area is approximately 17.58 using left endpoints.
A similar procedure is used for the right endpoints approximation having into account that the height of each rectangle is the value of the function at the right endpoint of the rectangle.