Day: March 22, 2010

Riemann Sums and Error

Sometimes I wonder about my sanity. Our school gets a 2 week spring break. I decided to teach my calculus classes on the last day before break. And I meet one of them during the last period. So yeah, sanity?

As you know, I’ve been working on Riemann Sums. After calculating them by hand [worksheet here], I had my kids enter this program in their graphing calculators.

We of course talked about why the program actually gives you the Riemann Sum. I’m going to expect them to be able to answer a question on the assessment about it. All that calculator stuffs was on Thursday.

They were coming to school on Friday with this program entered on their calculator.

I got home on Thursday at 9ish pm and when weighing the options of “show Stand and Deliver” or “create a lesson plan,” I just couldn’t let go of the fact that if I waited until after spring break to capitalize on this program, the momentum would be lost. So lesson plan it was. And I whipped the lesson plan [.doc here] below in about 90 or 100 minutes.

I told my kids that the fundamental question that we are tackling is: what is the relationship between the number of rectangles in our Riemann Sum and the error to the true value? And then we talked about what they already know … which is as the number of rectangles increase, the error decreases. So I modified our question: what is the MATHEMATICAL relationship between the number of rectangles in our Riemann Sum and the error to the true value?

We’re studying a a semi-circle of radius 2.

And so they use the program and come up with a bunch of data

And since they are interested in N and the error, they enter those values into lists in their calculator. Looking at a graph for low N values versus the error, they see this on their calculators:

So yes, they see that as N increases, the error goes down to zero. Mr. Shah’s eyes are wide open with awe.

That’s as far as we got in class on Friday. When we return from break we’re going to find a curve to fit this data. They’re going to try to fit this data to linear, exponential, logarithmic, and power functions using their calculators. It turns out that you can find a great power function to match this data. Seriously amazing. (The others don’t turn out well at all.)

That’s only for low N (from 0 to 20). Will our power function hit the N=500 point?

YEAAAAAH! This is where I started to get excited when I was creating my lesson. Because I thought that the error function would get really off so far out in the data. But heck, it’s pretty awesome that it hits at N=500.

I was curious HOW much our error function helps us with our estimation. So the last part of the activity is having students use only 75 Riemann Sums to estimate the area of the semi-circle. The error is shown below.

Not bad. But we have found a function models how much error using 75 rectangles will give us. So adding in that correction factor gives us a NEW estimation of the true area. And how much is this new estimation from the true value?

Um, using our error function as a correction factor gives us an answer that is 5 orders of magnitude better. Instead of an error of 10^{-2} we get an error of 10^{-7}.

I was really shocked and pleased by this! That’s where the lesson ends. Partly because I was too tired to make more, and partly because I want to move on in the course. I have a number of questions still lingering in my head, that I will be thinking about over break. Including why the error takes the form of a power function for this function (the semi-circle)?

Also, I still have a problem with the circularity of it all. I needed (a priori) the true area of the semi-circle to calculate the error for each N. Then we use these errors to find a curve to match the error associated with each N. This curve gives us a correction factor which gives us a better approximation to the true area. But if the point of all of this was to find the true area, we actually had to know it at the start to come up with the errors!

Some part of me wants to say that there is a good response to that. I suspect there is, and it deals with computing time. Like “say you want a good approximation. Start by assuming your true area is the Riemann Sum calculated for N=1000. Then use that to come up with the error curve. This error curve will then help you come up with a better approximation for the true area.” Or something like that. I don’t know, really. I’m just talking about nothing at the moment.