# What is rectangular error?

Rectangular error refers to the error analysis determined by using the rectangular integration (also called the midpoint rule).

Let's begin by briefly discussing rectangular integration. Rectangular integration finds the approximate integration using rectangles under the area of a graph. This method was developed by the use of Reimann sum.

Now let's obtain the mathematical equation of the rectangular integration:

Firstly recall the area of a rectangle as the base multiplied to the height:

`Area = base xx height = b xx h`

Now we need to take this idea (area of the rectangle) and adapt it and approximates it to a function f(x) over an interval [a,b]

`area = (b-a) xx f[0.5(b-a)]`

now we need to approximate the integral of f(x) with 'n' triangles over the interval [a,b]

`int_a^bf(x)dx~~sum_(i=1)^oo (x_(i+1) - x_i) xx f(0.5(x_i +x_(i+1)))`

Now we understand the rectangular integration, we know it is a way that we approximate an integral and there is some error in the calculation, we call it the rectangular error.

Rectangular error can be determined by using Taylor's polynomial.

Taylor's polynomial can help measure the accuracy of an approximation. The Taylor's polynomial is given as follows:

`f(x) = f(a) + f'(a)(x-a) + (f''(c) (x-a)^2)/2`

where `a <= c <= x`

(assuming x>a)

The difference in Taylor's polynomial and rectangular integration will give you the rectangular error.