You're approximating

with a Riemann sum, which comes in the form

where

are sample points chosen according to some decided-upon rule, and

is the distance between adjacent sample points in the interval.
The simplest way of approximating the definite integral is by partitioning the interval into equally-spaced subintervals, in which case

, and since
![[a,b]=[1,5]](https://tex.z-dn.net/?f=%5Ba%2Cb%5D%3D%5B1%2C5%5D)
, we have

Using the right-endpoint method, we approximate the area under

with rectangles whose heights are determined by their right endpoints. These endpoints are chosen by successively adding the subinterval length to the starting point of the interval of integration.
So if we had

subintervals, we'd split up the interval of integration as
![[1,5]=[1,2]\cup[2,3]\cup[3,4]\cup[4,5]](https://tex.z-dn.net/?f=%5B1%2C5%5D%3D%5B1%2C2%5D%5Ccup%5B2%2C3%5D%5Ccup%5B3%2C4%5D%5Ccup%5B4%2C5%5D)
Note that the right endpoints follow a precise pattern of




The height of each rectangle is then given by the values above getting squared (since

). So continuing with the example of

, the Riemann sum would be

For

,

and so on, so that the definite integral is given exactly by the infinite sum