Numerica integration with unequal intervals

  • Context: Graduate 
  • Thread starter Thread starter cris
  • Start date Start date
  • Tags Tags
    Integration intervals
Click For Summary
SUMMARY

The discussion focuses on computing numerical integrals of functions defined at unequal intervals, highlighting the limitations of the trapezoidal method due to high error rates. Participants suggest generalizing Simpson's rule, specifically by fitting quadratics to sequences of three points, which significantly improves accuracy. Additionally, MATLAB's numerical integration solver, ode45, is recommended for integrating complex functions with high precision. The conversation emphasizes the importance of understanding the function's properties to select the most effective numerical integration method.

PREREQUISITES
  • Understanding of numerical integration methods, specifically trapezoidal and Simpson's rules.
  • Familiarity with quadratic functions and their application in numerical methods.
  • Basic knowledge of MATLAB and its numerical integration capabilities.
  • Concept of function properties affecting integration accuracy.
NEXT STEPS
  • Research the generalized Simpson's rule and its implementation for unequal intervals.
  • Explore MATLAB's ode45 function and its applications in numerical integration.
  • Study the impact of function properties on the choice of numerical integration methods.
  • Investigate alternative numerical integration techniques for functions with discontinuities or chaotic behavior.
USEFUL FOR

Mathematicians, engineers, data scientists, and anyone involved in numerical analysis or computational mathematics seeking to improve integration accuracy for functions defined at unequal intervals.

cris
Messages
3
Reaction score
0
Hello,

I have to compute the numerical integral of a function which is expressed at unequal (but almost) intervals. I tried the trapezoidal method, but the error is too large for my application. Is it possible to generalize the Boole's rule to or something on the same order of precision?
 
Physics news on Phys.org
You could try to generalize Simpson's rule. You need to fit quadratics to sequences of three points, with the third point of a sequence being the first point of the next. For each set of three calculate the integral of the quadratic as an estimate of the contribution to the integral.
 
Thanks for your reply. The generalized Simpson rule gives great improvement over the trapezoidal.
Though it appears I need something more ...
 
cris said:
Thanks for your reply. The generalized Simpson rule gives great improvement over the trapezoidal.
Though it appears I need something more ...
What are you looking for?
 
How do you know this is not good enough? What are you measuring against?
 
If it's possible, use MATLAB's numerical integration solver ode45 (or its brothers). It allows you to integrate arbitrary functions (the programmatic sense) very accurately, including exotic ones such as discontinuous or chaotic functions.

I don't get what you mean by 'only expressed at certain unequal intervals'. Does this mean you only know a few data points? Or that the value of the expression only changes every interval? Is it smooth? The best method of numerical integration greatly depends on the properties of the function itself.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K