hello
hello

Reputation: 9

Recursively and iteratively calculating integrals in Scheme

I'm trying to create both recursive and iterative functions for integration in Scheme. So far, I haven't succeeded. How can I calculate integrals in Scheme?

Upvotes: 0

Views: 591

Answers (1)

Óscar López
Óscar López

Reputation: 236114

What kind of integral are you trying to calculate, with what method? If it's helpful for you, in the book SICP, section 1.3.1 theres's an explanation on how to approximate integrals using a Scheme procedure. Also in the same book, in the exercise 1.29 it's explained how to calculate an integral using Simpson's Rule, which is a more accurate method of numerical integration - and there's a solution for that exercise in here.

Upvotes: 1

Related Questions