(define s-rule
(lambda (f a b n)
(let [(h (/ (- b a) (* n 1.0)))
(k 0)]
(* (/ h 3)
(sum (lambda (x)
(let ([k (cond[(= x 0) 1][(= x n) 1][(odd? x) 4][else
2])])
(* k (f (+ a (* x h))))))
0 (lambda (x)
(+ x 1))
n)))))
Posted on
2013-03-08 15:43ASOCS
阅读(100)
评论(0)
收藏举报