We have learned in Calculus how to compute the definite integral
In most practical situations, however, the antiderivative is
not available.
For example, the Gaussian integral
The purpose of this project is to compute numerically the definite integral ; in other words, we want an algorithm (that will translate in a piece of code) to compute an approximation of the integral, up to the desired accuracy.
In Calculus we learned that the integral
is a limit of Riemann sums. On a computer, we also approximate
the integral by a sum. We consider the set of node points
In what follows we focus on two simple algorithms: the trapezoidal and the
Simpson method. All the methods discussed here use an equidistant
set of node points. More precisely, if we define the step