One of the most intuitive ways to introduce integration is by slicing the area under a curve into thin rectangles. Summing the areas of these rectangles yields a Riemann sum, which approximates the integral . As the number of rectangles increases, the approximation improves, eventually converging to the exact integral when the width shrinks to zero.
This calculator lets you choose where within each subinterval to sample the function value. The left Riemann sum evaluates at the left endpoints, the right sum uses the right endpoints, and the midpoint sum takes the value halfway in between. The midpoint rule often yields a more accurate estimate for smooth functions because it balances the error on each interval.
Suppose we divide into equal pieces. Each rectangle has width . The sum is then
for the left rule, or similar expressions for the right and midpoint choices. In this tool we parse your function with math.js
, evaluate it at the chosen sample points, and sum the resulting areas. The more subintervals you use, the closer the sum comes to the true integral.
Consider on . Using ten midpoints yields approximately , already close to the exact value .
Type any reasonable function into the form above—polynomials, trigonometric expressions, or exponentials—then specify the interval and how many rectangles to use. Choose your sampling method and press "Compute Sum". The calculator returns the Riemann sum rounded to six decimal places.
Determine the minimal polynomial of a 2x2 matrix using eigenvalues and algebraic tests.
Determine the number of positive integers less than n that are relatively prime to n.
Convert between Cartesian and spherical coordinates for points in three dimensions.