Numerica integration with unequal intervals

AI Thread Summary
The discussion focuses on computing numerical integrals for functions defined at unequal intervals, where the trapezoidal method yields insufficient accuracy. Suggestions include generalizing Simpson's rule by fitting quadratics to sequences of three points to enhance precision. MATLAB's numerical integration solver, ode45, is recommended for its capability to handle complex functions accurately. The effectiveness of numerical integration methods largely depends on the function's characteristics, such as smoothness and data point distribution. Overall, achieving higher accuracy may require tailored approaches based on the specific function being integrated.
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?
 
Mathematics 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.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top