Error of integration in numerical methods

In summary: The graph doesn't have to be symmetric around the midpoint, but it will be symmetric up to the first order (the tangent line at the midpoint). That's why it's O(h2).
  • #1
Silviu
624
11

Homework Statement


So this is a problem for my numerical methods class. We are doing integration and derivation. The part that I am stuck on is why does the midpoint method and trapezoidal method both have error of order ##h^2##, when the first one is one point integration method while the second one is a 2 points. I know how the error goes like, so I don't need to prove it mathematically, I just need to give a logical explanation.

Homework Equations


Trapezoidal method: ##\int_a^b f = (b-a)\frac{f(b)+f(a)}{2}##
Midpoint method: ##\int_a^b f = (b-a)f(\frac{a+b}{2})##

The Attempt at a Solution


In derivation, one point methods go like ##O(h)## while 2-point methods like ##O(h^2)##, as in the 2 point methods, you have more information. But the same would be here so I am not sure why the error is different. I was thinking that ##f(\frac{a+b}{2})## uses an actual value belonging to f, while ##\frac{f(b)+f(a)}{2}## is not a value of f, but I am not sure. Can someone help me? Thank you!
 
Physics news on Phys.org
  • #2
I think in general the amount of error will depend upon some assumptions made about the function. I believe the trapezoidal method (editing: Simpson's rule, not trapezoidal) actually gives an exact answer when integrating a quadratic function.
 
Last edited:
  • #3
Charles Link said:
I think in general the amount of error will depend upon some assumptions made about the function. I believe the trapezoidal method actually gives an exact answer when integrating a quadratic function.
But the error going like ##O(h^2)## is independent of the function, with h = b-a
 
  • #4
There is a coefficient in front of the ## h^2 ##. To some degree that coefficient will depend upon the function that is assumed.
 
  • #5
Charles Link said:
There is a coefficient in front of the ## h^2 ##. To some degree that coefficient will depend upon the function that is assumed.
But the coefficient has nothing to do with the way error behaves. ##O(h^2)## means a constant times ##h^2##, which indeed depends on the function. My question is not about the constant, but about why it is a constant times ##h^2## in both cases and not other power of h?
 
  • #6
Hi Silviu,

Intuitively the midpoint gives us a rectangle such that the part of the graph that is below (or above) on the left, is compensated by the part of the graph that is above (or below) on the right.
With a point on the left at a, we don't have such compensation. It's only with a point on the right at b, that we can get a similar compensation.
In other words, points at the edge only give us half of the information we need.
 
  • #7
I like Serena said:
Hi Silviu,

Intuitively the midpoint gives us a rectangle such that the part of the graph that is below (or above) on the left, is compensated by the part of the graph that is above (or below) on the right.
With a point on the left at a, we don't have such compensation. It's only with a point on the right at b, that we can get a similar compensation.
In other words, points at the edge only give us half of the information we need.
Hello! I am not sure I understand what do you mean by compensation. Doesn't this imply that the graph must be symmetric around that point? Why would it always be?
 
  • #8
Silviu said:
Hello! I am not sure I understand what do you mean by compensation. Doesn't this imply that the graph must be symmetric around that point? Why would it always be?
The graph doesn't have to be symmetric around the midpoint, but it will be symmetric up to the first order (the tangent line at the midpoint). That's why it's O(h2).
 

What is the error of integration in numerical methods?

The error of integration in numerical methods refers to the difference between the exact value of an integral and the approximate value obtained using numerical techniques. It is a measure of how accurate the numerical method is in approximating the true value of an integral.

What causes errors in numerical integration?

There are several factors that can contribute to errors in numerical integration, including the choice of integration method, the step size used, and the complexity of the function being integrated. Additionally, round-off errors due to the limited precision of computers can also contribute to errors in numerical integration.

How is the error of integration calculated?

The error of integration can be calculated using various methods, such as the difference between the exact and approximate values of the integral, the difference between successive approximations, or the difference between the exact and truncated Taylor series of the function being integrated.

How can errors in numerical integration be minimized?

To minimize errors in numerical integration, it is important to carefully select an appropriate integration method and step size, and to use higher precision arithmetic if possible. It may also be helpful to break up the integral into smaller sub-intervals and use more accurate methods for each sub-interval.

What is the significance of the error of integration in scientific calculations?

The error of integration is significant in scientific calculations because it affects the accuracy and reliability of the results obtained. Large errors in integration can lead to incorrect conclusions and can have a significant impact on the validity of scientific theories and models.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
805
  • Calculus and Beyond Homework Help
Replies
4
Views
693
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Calculus
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Quantum Physics
Replies
1
Views
579
Back
Top