Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Numerica integration with unequal intervals

  1. Nov 1, 2014 #1
    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?
     
  2. jcsd
  3. Nov 1, 2014 #2

    mathman

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  4. Nov 1, 2014 #3
    Thanks for your reply. The generalized Simpson rule gives great improvement over the trapezoidal.
    Though it appears I need something more ...
     
  5. Nov 2, 2014 #4

    mathman

    User Avatar
    Science Advisor
    Gold Member

    What are you looking for?
     
  6. Nov 2, 2014 #5
    How do you know this is not good enough? What are you measuring against?
     
  7. Nov 3, 2014 #6
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Numerica integration with unequal intervals
  1. Interval notation (Replies: 4)

Loading...