Chapter 3, Modularity, Objects, and State

Exercise 3.78


Note: I can not test the exercises in this section as MIT scheme is giving an error for forward references: ;Premature reference.

1
2
3
4
5
6
7
(define (solve-2nd a b dt y0 dy0)
  (define y (integral (delay dy0) y0 dt))
  (define dy (integral (delay ddy) dy0 dt))
  (define ddy (add-streams
			   (scale-stream dy a)
			   (scale-stream y b)))
  y)

I am not sure if in the dy integral we should use (* dt dt) instead of dt.