0

I read the following formula which expands the integral from SICP

enter image description here

for small values of d x . We can express this directly as a procedure:

(define (integral f a b dx)
  (define (add-dx x) (+ x dx))
  (* (sum f (+ a (/ dx 2.0)) add-dx b) 
     dx))

(integral cube 0 1 0.01)
.24998750000000042

(integral cube 0 1 0.001)
.249999875000001

Nonetheless, I did not find the above expanded formula from Integral on wikipedia

Is the formula a universal solution to decompose integral or singularly for particular functions.

Appreciate it very much if reference it origin or detailed illustration since I simply cannot get its idea.

Wizard
  • 103

0 Answers0