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
AI Thread Summary
To compute the integral of exp(-x^2) over the interval [0,1] with an error of at most 5x10^-5 using the Trapezium Rule, the maximum second derivative needs to be determined, likely at x=0. The error formula provided suggests a relationship between the number of subintervals and the second derivative, which is 4x^2exp(-x^2). A binary-cut technique is recommended for efficiently finding the optimal number of intervals, adjusting based on whether the error is too large or acceptable. Additionally, a similar approach can be applied for Simpson's Rule, with careful consideration of the error in each subinterval. Understanding and applying these methods will help achieve the desired accuracy in numerical integration.
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 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?
 
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.
 
Thread 'Collision of a bullet on a rod-string system: query'
In this question, I have a question. I am NOT trying to solve it, but it is just a conceptual question. Consider the point on the rod, which connects the string and the rod. My question: just before and after the collision, is ANGULAR momentum CONSERVED about this point? Lets call the point which connects the string and rod as P. Why am I asking this? : it is clear from the scenario that the point of concern, which connects the string and the rod, moves in a circular path due to the string...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top