0

I have some points and their respective coordinates and I would like to integrate them. However, I don't know the underlying function that produced them. I was wondering if there is a method other than the trapezoidal rule with which I would integrate those data. In case of Gauss quadrature, can these data used as the function's values and then calculate the corresponding weights?

dimpep
  • 21
  • You integrate a function between 2 points to get an area rather than integrating points. If you have a set of (x,y) values and you want to obtain an approximation of a function that passes through the points, you could do that using interpolation, then integrate the resulting function analytically without using Trapezoidal method. See for example: https://math.stackexchange.com/questions/3227585/what-formula-to-chose-a-nonlinear-formula/3227607#3227607 – NoChance May 21 '19 at 11:09
  • What is wrong with trapezoidal rule? Did you try using it? Without knowing something about the data points you can't do much better I think. – Somos May 21 '19 at 15:01
  • I've use it and I saw that when I increase the points in the dataset, the integral converges. However, I integrated a function both analytically and with trapezoidal rule and I saw that the relative error is pretty large. The function is a product of a bessel function with a sine. – dimpep May 22 '19 at 05:44

1 Answers1

0

It depends on how your data are located on a time line. If the data are collected at equidistant increments then you may use Simpson Rule. For the Gauss Method you have no control on weights or nodes so in case of arbitrary data, the trapezoid may be the best option.