How Many Points for Trapezium Rule to Compute exp(-x^2) with Specific Error?

  • Thread starter Thread starter retupmoc
  • Start date Start date
  • Tags Tags
    Error
Click For Summary

Homework Help Overview

The discussion revolves around determining the number of points required to compute the integral of exp(-x^2) over the interval [0,1] using the Trapezium Rule, while ensuring the error does not exceed 5x10^-5. Participants reference a specific error formula related to numerical integration and express uncertainty regarding its application.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the need to identify the maximum of the second derivative, 4x^2exp(-x^2), and question whether this occurs at x=0. There is also mention of breaking the interval into sub-intervals to manage error and suggestions for a binary-cut technique to optimize the number of intervals.

Discussion Status

The conversation is ongoing, with participants exploring different methods to approach the problem. Some have provided links to external resources, while others express doubts about the accuracy of the error term in the formula. There is no explicit consensus on the best approach yet.

Contextual Notes

Participants note the challenge of applying the error formula correctly and the potential need for an analytical approach to determine the number of intervals required. There is also a mention of homework constraints that may influence their methods.

retupmoc
Messages
47
Reaction score
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
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

http://math.fullerton.edu/mathews/n2003/SimpsonsRuleMod.html

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:
so id need to work out where 4x^2exp(-x^2) (i.e. the second derivative) 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?
 
retupmoc said:
so id need to work out where 4x^2exp(-x^2) (i.e. the second derivative) 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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 65 ·
3
Replies
65
Views
10K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
15
Views
3K
  • · Replies 37 ·
2
Replies
37
Views
7K