Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Euler-method/Racket/euler-method-9.rkt
Normal file
18
Task/Euler-method/Racket/euler-method-9.rkt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
> (define (solve-newton-cooling-by m)
|
||||
(ODE-solve newton-cooling '(0 100)
|
||||
#:x-max 100 #:step 10 #:method m))
|
||||
> (plot
|
||||
(list
|
||||
(function (λ (t) (+ 20 (* 80 (exp (* -0.07 t))))) 0 100
|
||||
#:color 'black #:label "analytical")
|
||||
(lines (solve-newton-cooling-by euler)
|
||||
#:color 'red #:label "Euler")
|
||||
(lines (solve-newton-cooling-by RK2)
|
||||
#:color 'blue #:label "Runge-Kutta")
|
||||
(lines (solve-newton-cooling-by adams)
|
||||
#:color 'purple #:label "Adams")
|
||||
(points (solve-newton-cooling-by (adaptive euler 0.5))
|
||||
#:color 'red #:label "Adaptive Euler")
|
||||
(points (solve-newton-cooling-by (adaptive RK2 0.5))
|
||||
#:color 'blue #:label "Adaptive Runge-Kutta"))
|
||||
#:legend-anchor 'top-right)
|
||||
Loading…
Add table
Add a link
Reference in a new issue