# Math Insight

### Applet: Area of Riemann sum

Control panel (Show)
Details of one rectangle (Show)
Area calculation (Show)

The area underneath the graph of $f(x)$ over the interval {} is calculated via a Riemann sum. The Riemann sum of {} subintervals is illustrated by the rectangles superimposed with the graph of $f$. As you move the pink point, a rectangle is highlighted; you can view the calculation of its area in the Details of one rectangle section. The calculation for the area over the whole interval {} is shown in the Area calculation section, along with the actual area calculated with a definite integral. You can switch between left and right Riemann sum using the slider; the function $f(x)$, the interval, and the number of rectangles can be changed via the Control panel section. The calculation yields the area under $f$ only for the case when $f(x) \ge 0$.

Applet file: area_riemann_sum.ggb