RosettaCodeData/Task/Runge-Kutta-method/Racket/runge-kutta-method-2.rkt

6 lines
227 B
Racket

(define ((step-subdivision n method) F h)
(λ (x . y) (last (ODE-solve F (cons x y)
#:x-max (+ x h)
#:step (/ h n)
#:method method))))