# Approximating this integral with midpoints

1. Nov 20, 2014

I have an integral from 0 to 1, of sin(x2).
I need to, with n=5 rectangles midpoint approximate it.

I've figured that I need something like i=1 and ending at 5 (right?), and the equation is just sin(x2) Δx
Delta x is 1/5.

Are those the correct steps?
I think that all I need to do....
is... uhh.......... Well, actually I'm not sure how to change x2. Should it be xi2?

If that's true, then I think all I need to do, to midpoint approxy is keep on incrementing i, and I think it naturally gives me a midpoint, right?

2. Nov 20, 2014

### Staff: Mentor

Yes, you need to have an x value (xi) for each subinterval. If xi - 1 and xi are then endpoints of a given subinterval you need to evaluate your function f at $\frac{x_{i - 1} + x_i}{2}$, the midpoint of that subinterval.