Question about approximate numerical integration methods

In summary, the conversation discusses the methods of numerical integration and how they can be used to find the area under a curve without an analytical method. It is mentioned that interpolation can improve the accuracy of the area approximation, but it is not necessary as quadrature methods can calculate the exact area under the interpolated curve. The conversation also touches on the error term in numerical integration and how it can be calculated using other numerical methods. The assignment at hand is to compare and contrast the three methods of numerical integration and show how they approach the true answer as n increases. Additionally, the conversation mentions the use of textbooks and computational resources in this topic.
  • #1
1,459
2
Homework Statement
Calculate the area under a curve & provide the error term using 3 numerical methods
Relevant Equations
Midpoint, Trapezoidal & Simpson's rules
This isn't a homework question per se but I can post more details like the data points & my work after.

Suppose we are given a set of arbitrary points for which we cannot find an equation and we need to find the area under the curve without an analytical method - we can use either of the three numerical methods.

If we want to improve our area approximation, are we restricted to the number of points or is interpolation the only way to improve the result?

And finally, how do we calculate the error term? Would we use another numerical method to determine the second derivative in the case of midpoint & trapezoidal and the fourth derivative in the case of Simpson's rule?
 
Physics news on Phys.org
  • #2
This is not a question about integration, it is a question about interpolation. Whatever interpolation method you use it is possible to calculate exactly the area under the interpolated curve so there is no point in adding additional inaccuracy by using quadrature for the curve.

Alternatively you can view higher order quadrature methods as being exact calculations of areas under an interpolation.

What materials are you studying from? What is your mathematical background? What is your aim in learning about numerical integration (which we usually call quadrature, to distinguish it from solving differential equations).
 
  • #3
The question of this assignment is to compare and contrast the three methods. I have a set of points that describe the flow rate of a blood pumped by a heart.
I have studied numerical methods in a 2nd year course but it's been a while so much refresher is required. I have been using Numericals by Burden & Faires but no textbok has been specified to us for this

I was able to easily calculate the areas using all three areas. I want to show how as n-> infinity, the three methods approach the 'true' answer. This is where I have the hangup.
Id also like to show how the 3 methods might use more computational resources so in the 'real world', a level of error might be tolerable.

Hope this helps clarify.
 
  • #4
stunner5000pt said:
. I want to show how as n-> infinity, the three methods approach the 'true' answer.

Do you want a full blown proof of this? Like, the statement is:
##f:[a, b]\to \mathbb{R}## is a continuous function, and ##x^n_k= a+(b-a)\frac{k}{n}##, then
$$\int_a^b f(x)dx=\lim_{n\to \infty} \sum_{k=0}^{n-1} \frac{b-a}{n}\frac{ f(x^n_k)+f(x^n_{k+1})}{2}$$

(This is the trapezoid rule) the standard simple proof is that a function was defined as integrable iff the riemann sum of any sequence of partitions whose largest interval goes to zero converges to the same number (defined at the integral), and the trapezoid rule is just the average of two such sums. The midpoint rule is even easier since it's just a riemann sum directly.

If this is an unsatisfying proof, then that probably means youwant to understand the definition of integrable better.
 
  • Like
Likes pbuk
  • #5
stunner5000pt said:
Hope this helps clarify.
Yes it does, thanks: I PaulP

stunner5000pt said:
The question of this assignment is to compare and contrast the three methods. I have a set of points that describe the flow rate of a blood pumped by a heart.
Errors in numerical integration depend on what happens to the subject function between the known points. When the subject function is not analytic, as here, you can't use higher order approximations to work out what is going on between the points (the flow rate could drop to zero, or even with a failing valve become negative, between points), all you can do is get more points.

stunner5000pt said:
I have been using Numericals by Burden & Faires but no textbok has been specified to us for this

I was able to easily calculate the areas using all three areas. I want to show how as n-> infinity, the three methods approach the 'true' answer. This is where I have the hangup.

This is partially covered in section 4.3 of Burden & Faries, but this is quite a practical book that covers a lot of ground and does not include (or even hint at) many proofs. It does give the error terms for some methods though, and as @Office_Shredder hints the usual method of proof of convergence is to show that the error term goes to zero. For a more rigorous treatment you need a more rigorous book like Stoer and Burlisch.

stunner5000pt said:
Id also like to show how the 3 methods might use more computational resources so in the 'real world', a level of error might be tolerable.
Quadrature by any method is really cheap (it can easily be seen to be ## \mathcal O(n) ##) so for this application the "real world" limit is on how fast you can capture the data.
 

Suggested for: Question about approximate numerical integration methods

Replies
30
Views
281
Replies
8
Views
505
Replies
10
Views
221
Replies
2
Views
1K
Replies
5
Views
697
Replies
9
Views
730
Replies
4
Views
646
Back
Top