Romberg Integration Programming

In summary, if you're new to numerical methods, you'll want to start by learning MATLAB and working your way up to more complicated methods.
  • #1
pyroknife
613
3
Hi all. I would like to write a code to perform the romberg integration (RI) using the trapezoidal rule as the basis. I would like the function to integrate any proper function of my choosing for any desired level. Being succinct is a definite plus.

I am not sure how familiar the people on these boards are with numerical methods, particularly in the form of numerical integration using RI, but was hoping if someone could give me some pointers on where to start as I am a bit new to coding and this kind of math.

Oh and I would like to do this in MATLAB.




I realize that I have two duplicate topics and that is because I realized that this subforum is more appropriate for my question. Please delete the one in the Calculus forum if necesary.
 
Physics news on Phys.org
  • #2
pyroknife said:
Hi all. I would like to write a code to perform the romberg integration (RI) using the trapezoidal rule as the basis. I would like the function to integrate any proper function of my choosing for any desired level. Being succinct is a definite plus.

I am not sure how familiar the people on these boards are with numerical methods, particularly in the form of numerical integration using RI, but was hoping if someone could give me some pointers on where to start as I am a bit new to coding and this kind of math.

Oh and I would like to do this in MATLAB.




I realize that I have two duplicate topics and that is because I realized that this subforum is more appropriate for my question. Please delete the one in the Calculus forum if necesary.

Done.

A lot of people here are very familiar with numerical methods, including integration methods of many kinds.

The place to get started is to get familiar using matlab, particularly with control structures such as loops and branches (e.g., if statements). Here's a link to a site with tutorials and videos about programming in MATLAB - http://www.mathworks.com/help/matlab...etting-started .
 
Last edited by a moderator:
  • #3
pyroknife said:
Oh and I would like to do this in MATLAB.

Matlab is covered by our "Math and Science Software" subforum, so I've moved this thread there.
 

1. What is Romberg Integration Programming?

Romberg Integration Programming is a numerical method used for approximating the value of a definite integral. It is based on the composite trapezoidal rule and Richardson extrapolation.

2. How does Romberg Integration Programming work?

First, the interval of integration is divided into smaller subintervals. Then, the trapezoidal rule is applied to each subinterval to obtain an initial estimate of the integral. This process is repeated with successively smaller subintervals, and the results are used in Richardson extrapolation to improve the accuracy of the estimate.

3. What are the advantages of using Romberg Integration Programming?

Romberg Integration Programming can provide more accurate results compared to other numerical integration methods, especially for smooth functions. It also requires less computation time compared to other methods, making it a more efficient option.

4. What are the limitations of Romberg Integration Programming?

Some limitations of Romberg Integration Programming include the fact that it can only be used for definite integrals, and it may not work well for functions with discontinuities or sharp corners. It also requires a significant amount of memory for storing the results of each iteration.

5. How do I implement Romberg Integration Programming?

Romberg Integration Programming can be implemented using various programming languages, such as MATLAB or Python. The process involves dividing the interval of integration into subintervals, applying the trapezoidal rule and Richardson extrapolation, and repeating the process until the desired level of accuracy is achieved. There are also libraries and packages available for use in implementing Romberg Integration Programming.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
827
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
27
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Programming and Computer Science
Replies
6
Views
6K
Back
Top