Riemann+Sum+Definition

Let //f//: //D// → **R** be a function defined on a subset //D// of the real line **R**. Let //I// = [//a//, //b//] be a closed interval contained in //D//, and let //P// = {[//x//0, //x//1), [//x//1, //x//2), ... [//x////n//-1, //x////n//]} be a of partition of //I//, where //a// = //x//0 < //x//1 < //x//2 ... < //x////n// = //b//. The **Riemann sum** of //f// over //I// with partition //P// is defined as [[image:http://upload.wikimedia.org/math/b/4/7/b477e400396c711c60c4302bbbd888ae.png caption="S = sum_{i=1}^{n} f(y_i)(x_{i}-x_{i-1})"]] where //x////i//-1 ≤ //y////i// ≤ //x////i//. The choice of //y////i// in this interval is arbitrary. If //y////i// = //x////i//-1 for all //i//, then //S// is called a **left Riemann sum**. If //y////i// = //x////i//, then //S// is called a **right Riemann sum**. If //y////i// = (//x////i//+//x////i-1//)/2, then //S// is called a **middle Riemann sum**. The average of the left and right Riemann sum is the **trapezoidal sum**.

The interval for a Reimann sum can be found using x= (b-a)/ n where n= the number of rectangles needed.