Error in the Trapezium Rule

  • Thread starter retupmoc
  • Start date
  • Tags
    Error
In summary: However, if you are in a hurry you can take a shortcut and use the trapezoidal rule. This is where you take the derivative of the function at a particular point and use that to find the error. To do this, you need to know the maximum and minimum values for the function at that point. Then you can use the derivative to find the error at that point.
  • #1
retupmoc
50
0
Hi, in my numerical methods i missed my lecture and i am currently unable to obtain the solution of a problem from my lecturer. How many points should be used to compute the integral exp(-x^2) over the interval [0,1] with an error at most 5x10^-5? At the end of the previous lecture we where given a formula for the the error over the interval [b,a] I-T=-1/12(b-a)h^2f''(w) + O(h^2). Where f''(w) is the maximum second order derivative at a point w in the range. Any help would be appreciated.

Also how would i do the same calculation for Simpsons Rule?

Thanks
 
Physics news on Phys.org
  • #2
retupmoc said:
Hi, in my numerical methods i missed my lecture and i am currently unable to obtain the solution of a problem from my lecturer. How many points should be used to compute the integral exp(-x^2) over the interval [0,1] with an error at most 5x10^-5? At the end of the previous lecture we where given a formula for the the error over the interval [b,a] I-T=-1/12(b-a)h^2f''(w) + O(h^2). Where f''(w) is the maximum second order derivative at a point w in the range. Any help would be appreciated.

Also how would i do the same calculation for Simpsons Rule?

Thanks

This looks like a decent set of notes for both cases.

http://math.fullerton.edu/mathews/n2003/TrapezoidalRuleMod.html [Broken]

http://math.fullerton.edu/mathews/n2003/SimpsonsRuleMod.html [Broken]

I doubt the O(h^2) is correct. I suspect it should be higher order, or maybe the + is supposed to be =
 
Last edited by a moderator:
  • #3
so id need to work out where 4x^2exp(-x^2) (i.e. the second derivitive) is maximum? Which would be x=0(?) and exp(-x^2)=1 and put this into the equation above to get the number of subintervals required?
 
  • #4
retupmoc said:
so id need to work out where 4x^2exp(-x^2) (i.e. the second derivitive) is maximum? Which would be x=0(?) and exp(-x^2)=1 and put this into the equation above to get the number of subintervals required?

My guess is you need to look at the whole interval and see if the error is too big. If it is, you need to break it into sub-intervals and find the errors for each sub-interval and combine them. You need to do that until the number of intervals is large enough to reduce the error within limts.

Rather than a sequential approach, you might try a binary-cut technique. For example, if 20 is more than enough try 10, if that is too few go half way between and try 15, then move half way toward the previous numbers depending on if 15 is too few at least enough.

I have not looked carefully for an analytical approach to finding the number, but I think the formula you have applies interval by interval.
 

What is the Trapezium Rule?

The Trapezium Rule is a method for estimating the area under a curve by approximating the curve with a series of trapezoids. It is commonly used in calculus and numerical analysis.

What is "error" in the Trapezium Rule?

"Error" in the Trapezium Rule refers to the difference between the actual area under a curve and the estimated area calculated using the Trapezium Rule. It is a measure of the accuracy of the approximation.

How is the error calculated in the Trapezium Rule?

The error in the Trapezium Rule is calculated by taking the difference between the actual area under the curve and the estimated area using the formula: (b-a)^3*f''(c)/12*n^2, where (b-a) is the interval of integration, f''(c) is the second derivative of the function at some point c within the interval, and n is the number of trapezoids used in the approximation.

How can the error be reduced in the Trapezium Rule?

The error in the Trapezium Rule can be reduced by increasing the number of trapezoids used in the approximation. As the number of trapezoids increases, the width of each trapezoid decreases, resulting in a more accurate approximation of the curve and a smaller error.

What are the limitations of the Trapezium Rule?

The Trapezium Rule has limitations in its application to functions with sharp curves or discontinuities. These types of functions may require a large number of trapezoids to achieve an accurate approximation, making the method computationally expensive. Additionally, the Trapezium Rule may not be suitable for highly oscillatory functions, as it may not provide an accurate estimate of the area under the curve.

Similar threads

  • Introductory Physics Homework Help
Replies
15
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
393
  • Introductory Physics Homework Help
Replies
6
Views
1K
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
987
  • General Math
Replies
31
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
5
Views
518
  • Introductory Physics Homework Help
Replies
12
Views
1K
Back
Top