Skip to Main Content Skip to Search
Product Documentation

rsums - Interactive evaluation of Riemann sums

Syntax

rsums(f)
rsums(f,a,b)
rsums(f,[a,b])

Description

rsums(f) interactively approximates the integral of f(x) by 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 Riemann sum by using the slider below the graph. The number of terms available ranges from 2 to 128. f can be a string or a symbolic expression. The height of each rectangle is determined by the value of the function in the middle of each interval.

rsums(f,a,b) and rsums(f,[a,b]) approximates the integral for x from a to b.

Examples

Both rsums('exp(-5*x^2)') and rsums exp(-5*x^2) create the following plot.

  


Free Symbolic Math Interactive Kit

See how symbolic computations can help you find analytical solutions to math and engineering problems.

Get free kit

Trials Available

Try the latest version of symbolic math products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS