You removed the brackets after let. Once you have defined the constant, let the code that uses the constant be inside the let scope. Therefore, your mistake is the lack of an expression body.
Here is the corrected code:
(define (Integral fab N) ; define h as a constant (let ((h (/ (- ba) N))) (define (Term n) (* (/ h 3) (+ (* 2 (f (+ a (* 2 (* nh))))) (* 4 (f (+ a (* 2 (* (- n 1) h)))))))) (+ (* (/ h 3) (+ (fa) (fb))) (sum Term a next (/ N 2.0)))))
By the way, you still need to define the sum function.
source share