Numerical integration of a function specified numerically

Click For Summary
SUMMARY

This discussion focuses on performing numerical integration of a function specified numerically on a one-dimensional grid with equal spacing using Fortran or Mathematica. The user, Pradipta, seeks alternatives to the NAG library's d01gaf routine due to its cost. The consensus suggests using Simpson's rule as a viable method for integrating functions that exhibit significant variation between grid points without generating additional data.

PREREQUISITES
  • Understanding of numerical integration techniques, specifically Simpson's rule.
  • Familiarity with Fortran programming language.
  • Basic knowledge of Mathematica for numerical computations.
  • Concept of one-dimensional grids and equal spacing in data representation.
NEXT STEPS
  • Research the implementation of Simpson's rule in Fortran for numerical integration.
  • Explore Mathematica's numerical integration functions for grid-based data.
  • Investigate alternative numerical integration methods suitable for non-analytical functions.
  • Learn about the limitations and assumptions involved in numerical integration techniques.
USEFUL FOR

Researchers, engineers, and developers involved in numerical analysis, particularly those working with numerical data and requiring efficient integration methods in Fortran or Mathematica.

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 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 3 ·
Replies
3
Views
12K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
12K
  • · Replies 15 ·
Replies
15
Views
4K