Blob


1 ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 ;; about the language level of this file in a form that our tools can easily process.
3 #reader(lib "htdp-intermediate-reader.ss" "lang")((modname |23.4|) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp")))))
4 integrate-kepler : (number -> number) number number
5 Integrate f from left to right according to kepler's rule (split the curve into two trapezoids and evaluate the area of the trapezoids).
7 (define (integrate-kepler f left right))
9 area-of-trapezoid : number number number -> number
10 Given the width, height1, and height2, compute the area of the trapezoid according to the formula A = width * (1/2) * (height1 + height2).
11 (define (area-of-trapezoid width height1 height2)
12 (* width 1/2 (+ height1 height2)))