We're approximating the area under the graph of the function over the interval [-2, 2] by
- partitioning the integration interval into subintervals,
- building rectangles whose lengths are equal to the length of the corresponding subinterval and whose heights are equal to the value of , where denotes the right endpoint of the -th subinterval, and
- computing the areas of each rectangle and adding these areas together.
Splitting [-2, 2] into 4 intervals gives
[-2, -1], [-1, 0], [0, 1], [1, 2]
Each subinterval has length 1. The right endpoints of the -th subinterval, where , are given by the (arithmetic) sequence
The area of the rectangle over the -th subinterval is
and so the definite integral is approximately
There are well-known formulas for computing the sums of powers of consecutive (positive) integers. The ones we care about are
So we get