Approximating this integral with midpoints

  • Context: Undergrad 
  • Thread starter Thread starter CookieSalesman
  • Start date Start date
  • Tags Tags
    Integral
Click For Summary
SUMMARY

The discussion focuses on approximating the integral of sin(x²) from 0 to 1 using the midpoint rule with n=5 rectangles. The user correctly identifies that Δx is 1/5 and seeks clarification on how to compute the midpoints. The correct approach involves evaluating the function at the midpoint of each subinterval, specifically using the formula f( (x_{i-1} + x_i) / 2) for each rectangle. This method ensures accurate approximation of the integral.

PREREQUISITES
  • Understanding of integral calculus, specifically the midpoint rule.
  • Familiarity with the function sin(x²) and its evaluation.
  • Basic knowledge of Riemann sums and subintervals.
  • Ability to perform arithmetic operations with fractions.
NEXT STEPS
  • Learn how to implement the midpoint rule in Python using libraries like NumPy.
  • Explore numerical integration techniques such as the trapezoidal rule and Simpson's rule.
  • Study the convergence of numerical methods for approximating integrals.
  • Investigate the impact of increasing n on the accuracy of integral approximations.
USEFUL FOR

Students and professionals in mathematics, engineering, and computer science who are interested in numerical methods for integral approximation.

CookieSalesman
Messages
103
Reaction score
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
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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
2
Views
7K