Blame


1 12687dd9 2023-08-04 jrmu ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 12687dd9 2023-08-04 jrmu ;; about the language level of this file in a form that our tools can easily process.
3 12687dd9 2023-08-04 jrmu #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 12687dd9 2023-08-04 jrmu integrate-kepler : (number -> number) number number
5 12687dd9 2023-08-04 jrmu Integrate f from left to right according to kepler's rule (split the curve into two trapezoids and evaluate the area of the trapezoids).
6 12687dd9 2023-08-04 jrmu
7 12687dd9 2023-08-04 jrmu (define (integrate-kepler f left right))
8 12687dd9 2023-08-04 jrmu
9 12687dd9 2023-08-04 jrmu area-of-trapezoid : number number number -> number
10 12687dd9 2023-08-04 jrmu Given the width, height1, and height2, compute the area of the trapezoid according to the formula A = width * (1/2) * (height1 + height2).
11 12687dd9 2023-08-04 jrmu (define (area-of-trapezoid width height1 height2)
12 12687dd9 2023-08-04 jrmu (* width 1/2 (+ height1 height2)))