0

I want to solve a basic integral over a given interval [a,b], for an arbitrary n and m values in R(n,m) with Romberg integration.

I have derived Boole's rule from the Trapezoid Rule, so I know how to do this on paper. I've even drawn a flow chart showing all the dependencies. It is not helping me code this.

I have a feeling that this requires some sort of recursion.

I am programming this in Java.

EDIT: I AM NOT ASKING FOR ANYONE TO CODE THIS FOR ME. All information above, including that which was edited out by others, was to give context of my relative experience and understanding of technical vocabulary and my ability to apply it. This is helpful to those who actually desire to help, rather than to show off. Thank you to the gentleman who provided me with some good links and information below.

rocksNwaves
  • 5,331
  • 4
  • 38
  • 77
  • 1
    Sorry, this is not how StackOverflow works. Please visit the [help] and read [ask]. You are expected to code your solution and when you encounter a problem, ask for help, showing what you have done. We are not going to write the code for you. – Jim Garrison Oct 02 '16 at 05:15
  • @Jim Garrison I am not asking for code. I am asking for enlightenment on the algorithm. Most of the context of my question was edited out by some gracious do-gooders. For this reason I love forums more than human interraction. It allows those with power to read and interpret the words of others correctly, then apply new meaning to it in their response for reasons of personal elevation. – rocksNwaves Oct 02 '16 at 14:56

1 Answers1

1

The pseudo-code for Romberg integration with J an given integer could look like:

  1. h = b-1
  2. Iterate j = 1,2,...,J
  3. Calculate T(j,1) with composite trapezoidal rule
  4. Iterate k = 2,...,j
  5. Calculate T(j,k) with Richardson extrapolation
  6. End loop
  7. h = h/2
  8. End loop

Note that this is not the most efficient way but should make you familiar with the concept.

The Wikipedia article has an implementation in C if you want to have further reading.

An detailed explanation with examples and pseudo-code can be found here.

StefanM
  • 797
  • 1
  • 10
  • 17
  • Thank you! This was the nudge in the right direction that I needed! I do appreciate your time and willingness not to be self-righteous, which is my normal experience when asking for help from communities of anonymous folks! – rocksNwaves Oct 02 '16 at 15:02