  Sometimes it is necessary to obtain a numerical integration using only
discretised data. In some cases, the data contains singularities which position
is known but does not coincide with a discretisation point, and the jumps in
the function and its derivatives are available at these positions. The
motivation of this paper is to use the previous information to obtain numerical
quadrature formulas that allow approximating the integral of the discrete data
over certain intervals accurately. This work is devoted to the construction and
analysis of a new nonlinear technique that allows to obtain accurate numerical
integrations of any order using data that contains singularities, and when the
integrand is only known at grid points. The novelty of the technique consists
in the inclusion of correction terms with a closed expression that depends on
the size of the jumps of the function and its derivatives at the singularities,
that are supposed to be known. The addition of these terms allows recovering
the accuracy of classical numerical integration formulas even close to the
singularities, as these correction terms account for the error that the
classical integration formulas commit up to their accuracy at smooth zones.
Thus, the correction terms can be added during the integration or as
post-processing, which is useful if the main calculation of the integral has
been already done using classical formulas. The numerical experiments performed
allow us to confirm the theoretical conclusions reached in this paper.
