In mathematics, the Riemann sum is a method of approximating the integral of a function over an interval. One representation of the integral, is the area under a curve in a graph. The Riemann sum is calculated by splitting the region into equal parts. In each part, the function is replaced by a shape. Shapes that are commonly used are rectangles, trapezoids, parabolas and cubics.The area of the similar shape can then be calculated. This method is often used when finding the closed form integral is difficult or impossible. The shapes used also influence how accurate the approximation is. More complex shapes give a higher accuracy, but this also means that calculating the approximation becomes more difficult.