[racket] [Racket]27.3.5, 27.3.6 htdp

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Nov 22 05:11:24 EST 2010

On Fri, Nov 19, 2010 at 7:21 PM, Ken Hegeland <hegek87 at yahoo.com> wrote:

...

[Skipping the questions about the exercise, as I haven't done it and
have nothing to add.]

> While I was struggling with this I decided to take a moment and read a bit ahead and see what the next exercise is, and again, I'm having some trouble. My real point of trouble is that I don't exactly understand what function integration is. I tried googling it, and it seems to be calculus type math, which I have never experienced. Is it safe to say function integration is just finding the area under some function?

Yes (in this context)

> So, the goal of this is to split it into many small rectangles, and add up the numbers?

Yes. This method is known as Riemann sums or the Riemann integral.

> I feel like that can't be it, because with dividing it by midpoints, you can eventually make all rectangles L=(f x) W=1, which would make the areas equal to (f x), so it would seem to be easier to just add every number.
> (+ (f 0) (f 1) (f 2) (f 3) (f 4)....(f(- n 1)))

Think what would happen if f changes very quickly. Then the rectangles
computed at 0, 1, 2, ... don't become an accurate approximation.

HTH,
N.


Posted on the users mailing list.