As the function in the integral is continuous is we know the integral exists and thus we can choose the partition of the interval as we want. We choose

to subdivide in n subintervals of equal length , and we evaluate the function at right end of each subinterval:

...this looks similar to what you got but I can't be sure since it isn't clear the way you wrote it.

Tonio