Numerical integration of a function specified numerically

Click For Summary
For numerical integration of a function specified on a one-dimensional grid with equal spacing, it is suggested to use Simpson's rule, which can effectively handle widely varying functions. While many numerical integration routines exist for analytical functions, options for purely numerical data are limited. The NAG library offers a routine (d01gaf), but it is not free. Users are encouraged to make assumptions about the function's behavior between grid points to apply Simpson's rule effectively. This approach provides a practical solution for the integration challenge presented.
praban
Messages
13
Reaction score
0
Dear All,

Can someone suggest me an appropriate routine (in Fortran) or command (in mathematica) to perform numerical integration of a function, which is specified numerically on a one dimensional grid with equal spacing (and we cannot generate additional data on other grid points)? There are many routines (e.g. in numerical recipe) to do numerical integration of analytical functions but I haven't found one for functions specified only numerically. I found one in NAG library (d01gaf) but NAG is not free. My numerical function is widely varying one and cannot be handled with simple numerical integration schemes (but at the same time additional data on other grid points cannot be generated).

Thanks,

Pradipta
 
Physics news on Phys.org
You need to make some assumption as to how your function behaves between grid points. Simpson's rule will suffice.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
5
Views
5K
  • · Replies 3 ·
Replies
3
Views
12K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
2
Views
4K
  • · Replies 11 ·
Replies
11
Views
12K