Types of N-body ODE Integration Methods
June 9, 1996
31
As we have seen before (FIGURE 14.), this is the simplest method, but the error
term is only
O(h
2
)
, making this method only
O(h)
. Thus, this method only good for very
quick and dirty approximations.
Sources: (14:569,15:197:19:413-6)
2.1.2 Taylor Series (not implemented)
We have seen this one before too, and while in theory, it can be very accurate, it is
not very practical because it can be very hard to calculate the higher derivatives of
f()
. It
should be noted that Euler's formula is simply the Taylor series truncated after the second
term.
Sources: (4:354-8,15:193,13:67-8,15:200-2,19:422-3)
2.1.3 Runge-Kutta's Method (-m rk4)
Runge and Kutta developed their method by trying to create formulas that can
match each of the terms of the Taylor's series, but without the use of higher derivatives of
f()
. So, they looked at equations in the form of:
Where
and the constants
and
need to be determined.
x t h
+
(
)
x t
( )
hf x t
( )
(
)
12
h
2
f
'
x t
( )
(
)
1
2 3
h
3
f
''
x t
( )
(
) ...
1
n
!
h
n
f
n
1
-
(
)
x t
( )
(
)
+
+
+
+
+
=
E
1
n
1
+
(
)
!
h
n
1
+
f
n
( )
x
( )
(
)
=
x t h
+
(
)
x t
( )
a
1
k
1
a
2
k
2
a
3
k
3
...
a
n
k
n
+
+
+
+
+
=
k
1
hf x t
( )
(
)
=
k
2
hf x t b
1
h
+
(
)
b
1
k
1
+
(
)
=
k
3
hf x t b
2
h
+
(
)
b
2
k
2
+
(
)
=
...
k
n
1
+
hf x t b
n
h
+
(
)
b
n
k
n
+
(
)
=
a
1
a
2
...
a
n
, ,
b
1
b
2
...
b
n
, ,