Interactive evaluation of Riemann sums
rsums( interactively approximates the
integral of f(x) by middle Riemann sums for
x from 0 to 1.
rsums(f) displays a graph of
f(x) using 10 terms (rectangles). You can adjust the
number of terms taken in the middle Riemann sum by using the slider below the graph. The
number of terms available ranges from 2 to 128.
f can be a character
vector or a symbolic expression. The height of each rectangle is determined by the value of
the function in the middle of each interval.
Approximate the integral by middle Riemann sum.
rsums displays a graph of using 10 terms of the midpoint Riemann sum for the integration range from 0 to 1. The total sum is 0.3325.
syms x rsums(x^2)
Change the integration range of from -2 to 5. The total Riemann sum is 44.0475.
Integrand, specified as a symbolic expression, function, or number.
a— Lower bound
Lower bound, specified as a number or symbolic number.
b— Upper bound
Upper bound, specified as a number or symbolic number.