Dear Mahboobeh, since Graphmatica draws sometimes not correctly, I have made for you the upper/lower rectangles for sin(x) separately on [0,π] and [-π,0], with a partition in 6 intervals.
It is not perfect, however can satisfy your needs.
Dear Mahboobeh, the intervals are of the form (x1, x2) where x1 and x2 is the lower and upper bound of the integral and can be broken down into (-pi, -2*pi/3); (-2*pi/3, -pi/3); (-pi/3, 0); (0, pi/3); (pi/3, 2*pi/3); and (2*pi/3, pi).
@ Seyed Hamed, Maaboohbeh has specified the interval as (-pi,pi) equivalent to period 2*pi. Any integral interval can be broken down implicitly using Cauchy-Riemann provided the interval is bounded and the integrand is piece-wise continuous such that there is overlap in the piece wise or broken down interval.
Dear Mahboobeh, Indeed, it seems more interesting to use the interval [0, pi]. Please see the attachment. It is only a skecth, but from this you can complete the picture on paint, for example.
Dear Mahboobeh, I hope you will find the attached useful. The dimension of the rectangle is 2pi by 2. The sine curve (sin(x)) is as inscribed in the rectangle while the interval as suggested earlier are as marked along x-axis.
Dear Mahboobeh, since Graphmatica draws sometimes not correctly, I have made for you the upper/lower rectangles for sin(x) separately on [0,π] and [-π,0], with a partition in 6 intervals.
It is not perfect, however can satisfy your needs.