Before understanding Numerical Integration, we will first take a brief look on definite integration which forms as essential base for understanding numerical integration.

A definite integral is the area under a curve or a function $$f(x)$$, called the integrand, between two points $$[a,b]$$ in the real line. Mathematically, it is defined as

$$I=\int^{b}_{a}f(x)dx$$

The symbol $$dx$$, is called the differential of the variable $$x$$, indicates that the variable of integration is $$x$$. It means a very small change in $$x$$ as in differentiation. Integration is the process of computing the value of a definite integral. The first fundamental theorem of calculus says that the derivative of an integral is the integrand. So, we sometimes call the integral the anti-derivative of the function. Mathematically,

$$\displaystyle f(x)=\frac{d}{dx}\int_{0}^{x}f(t)dt$$

Reimann gave the first practical definition of an integral. The basic idea of the Reimann integral is to partition the area into many rectangles to approximate the area and then to sum them up, just loke integrating them and hence the word integration was used. By taking better and better approximations, which are infinitesimally small, then in the limit, we get exactly the same area under the curve.

Consider a partition of an interval $$[a,b]$$ is a finite sequence of points, then mathematically

$$a=x_0 <x_1<\hdots x_n=b$$

Now, here there is a distinguished point $$t_i\epsilon[x_i,x_{i+1}]$$. The Reimann  sum of $$f$$ with respect to the  partition is defined as the sum of all teh rectangles.

$$S_n=\sum^{n-1}_{i=0}f(t_i)(x_{i+1}-x_1)$$

When we take the limit that $$n$$ goes to infinity, the Reimann sum becomes the integral value,

$$I=\lim_{n\rightarrow\infty}S_n$$

Numerical Integration is a technique that approximates a definite integral using a similar concept like in a definite integral, which is using a weighted average approximation of the limited sample values of the integrand to replace the value of the function. Numerical integration is an important tool because as it is often not possible to find the antiderivatives in their closed form analytically. Even if the antiderivatives exist, they may not necessarily be easy to compute as they cannot be composed of elementary functions. And moreover it is comparatively easier to compute a numerical approximation than a antiderivative in terms of special functions or the infinite series. Moreover, the integrand may be known only at certain points, such as when obtained by sampling. Hence some of the embedded systems and some other computer applications may need numerical integration for the same.

The numerical integration formulas are called as numerical quadrature formulas. There are many methods to do numerical integration. They are differed by how many partitions they divide the function into, whether the partitions are equally spaced, or how we choose the distinguished points, whether it is open or closed or how we do extrapolation.