Approximating this integral with midpoints

  • Thread starter CookieSalesman
  • Start date
  • Tags
    Integral
In summary, to approximate an integral using the midpoint rule with n=5 rectangles, you need to have an x value for each subinterval, and then evaluate the function at the midpoint of each subinterval to calculate the area of each rectangle.
  • #1
CookieSalesman
103
5
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?
 
Physics news on Phys.org
  • #2
CookieSalesman said:
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?
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.
 

FAQ: Approximating this integral with midpoints

1. What is approximating an integral with midpoints?

Approximating an integral with midpoints is a numerical method used to estimate the value of a definite integral by dividing the interval into smaller subintervals and evaluating the function at the midpoint of each subinterval.

2. How do you calculate the midpoint of a subinterval?

The midpoint of a subinterval is calculated by taking the average of the two endpoints. For example, if the subinterval is from a to b, the midpoint is (a+b)/2.

3. Why is approximating integrals with midpoints useful?

This method is useful because it allows us to estimate the value of an integral when we cannot find an exact solution. It also provides a way to check the accuracy of other methods used to evaluate integrals.

4. What is the formula for approximating an integral with midpoints?

The formula for approximating an integral with midpoints is:
(b-a) * f((a+b)/2)
where a and b are the endpoints of the interval and f is the function being integrated.

5. What are the sources of error in approximating integrals with midpoints?

The main source of error in this method is the choice of the number of subintervals. Using too few subintervals can result in a less accurate estimate, while using too many can be computationally expensive. Another source of error is the assumption that the function is continuous and smooth, which may not always be the case.

Similar threads

Replies
8
Views
1K
Replies
8
Views
1K
Replies
20
Views
3K
Replies
12
Views
3K
Replies
6
Views
2K
Back
Top