Riemann Sums

A Riemann sum is an approximation of the form [math]\sum_{k=1}^n\left[f\left(x_k\right)\cdot\left(\Delta x\right)_k\right][/math]. It is most often used to approximate the area under some function [math]f\left(x\right)[/math] on the closed interval [math]\left[a,b\right][/math]. Below are six types of sums: left-hand, midpoint, right-hand, trapezoidal, lower, and upper.
In these sums, [math]\Delta{x}[/math] represents the width of each rectangle (AKA interval), defined by [math]\Delta{x}=\frac{b-a}{n}[/math]. The parameter that changes depending on the type of sum is [math]x_{k}[/math]. This determines where the function [math]f\left(x\right)[/math] is evaluated and thus calculates the height of each rectangle.[br][list][br][*]Left-hand: [math]x_{k}=a+\left(k-1\right)\Delta{x}[/math][br][*]Midpoint: [math]x_{k}=a+\left(k-\frac{1}{2}\right)\Delta{x}[/math][br][*]Right-hand: [math]x_{k}=a+k\cdot\Delta{x}[/math][br][/list][br]A trapezoidal sum differs from the previous 3 in that [math]f\left(x_{k}\right)[/math] is the average of the endpoints of each interval evaulated in [math]f\left(x\right)[/math][br][list][br][*]Trapezoidal: [math]f\left(x_{k}\right)=\frac{1}{2}\left[f\left(x_{k-1}\right)+f\left(x_{k}\right)\right][/math] where [math]x_{k}=a+k\cdot\Delta{x}[/math][br][/list][br]In lower and upper sums, [math]x_{k}\epsilon\left[a+\left(i-1\right)\Delta{x},a+i\cdot\Delta{x} \right][/math] where [math]i\epsilon{\mathbb{N}}[/math] and [math]{1}\leq{i}\leq{n}[/math] such that:[br][list][br][*]Lower: [math]f\left(x_{k}\right)[/math] is the infimum over each interval[br][*]Upper: [math]f\left(x_{k}\right)[/math] is the supremum over each interval[br][/list][br]As [math]n\to\infty[/math], these approximations tend to the actual area between the function and x-axis which is given by:[br][math]A=\lim_{n\to\infty}{\sum_{k=1}^{n}{\left[f\left(x_{k} \right )\cdot\Delta{x} \right ]}}=\int_{a}^{b}{f\left(x \right )\mathrm{d}x}[/math]

Information: Riemann Sums