3.6.3

Instructor: Sample 6-- what value of n should be used to guarantee that an estimate of the integral from 0 to 1 of e to the x squared dx is accurate to within 0.01, 100th, if we use the midpoint rule? If we use the midpoint rule-- so we have error bounds given in this theorem or statement above. And the one thing we really need to draw attention to is that M is going to be the maximum value of the second derivative over this interval. 

So the first thing we need to do to determine this is find a second derivative of our function, e to the x squared. Well, the derivative of e to the x squared is 2x times e to the x squared. And so the second derivative is equal to 2e to the x squared-- I've done this work already on the side-- plus 4x squared e to the x squared. 

Now, on the interval 0 to 1, what is the highest value that x could be? Well, since e to the x or e to the x squared is monotonic, we know that the highest value it could be is going to be at the endpoint 1-- at the endpoint 1. 

All right, so I may have said the wrong function there. But the highest value occurs at x equals 1, which would mean that we have a value of 6e. So that is going to be our value of M. That is the maximum value. That means we're going to use 6e for M. 

Now, going into this formula, we have M, b minus a cubed-- because we're talking in the midpoint rule, yes, we are-- over 24n squared. So this is our error. And we want this to be less than or equal to, since this is where the within 0.01. 

Let's replace the values that we know. M is 6e. b is 1. a is 0 cubed over 24n squared. We don't know what n is. That's what we're trying to find. 

All right, now, first thing I might do is, I notice that 1 minus 0 cubed is 1. So this is 6e over 24n squared. Now, taking the reciprocal of both sides, I can say this is 24n squared over 6e is greater than or equal to 0.01. And multiplying both sides by 6e over 24, I get, n squared is greater than or equal to. 

What is that? Oh, actually, take a step back. I can't just do that. I didn't take the reciprocal of the right side. The reciprocal the right side, since that was, as I said earlier, 100th, that would be 100. OK, that works a little better. So that would be 100 times 6 divided by 24-- 25. So that would be 25e. 

And taking the square root, that means that n must be greater than or equal to 5 squared of e, which is approximately 8.24. So therefore, n equals 9. n equals 9 would guarantee that the integral, the error of this-- so the absolute value integral from 0 to 1, e to the x squared, dx, minus our midpoint-- in this case, M9. But that would be less than 0.01. 

Now, you might notice that I had 8.24, but I said, OK, M being 9 is what would guarantee it. The reason I say that is because, if I used 8, my error would end up being not less than or equal to 0.01. It could end up being greater than. So we always want to go up to the next integer. All right, well, that is it for this question.