Theory of the N-Body Problem

June 9, 1996

20

So, there is really some other, unknown, term that is on the order as the square of the step

size

*h*

times the value of the rate of change of the acceleration at some time
in the time

period in which this move took place. Taylor's theorem says that

, but that

the exact value of
can not be known.

Using Taylor's theorem to derive a more accurate approximation of the function

can be done by using additional terms. As an example, we could use:

The error in this formula, i.e. the difference between the infinite Taylor series and the

Taylor series that has been truncated

1

after 5 terms will be no larger than

.

(16:580-

2)

While the Taylor series could be used to create a very accurate solution, the problem

with it is that even the third derivative of

*x(t)*

can be complicated and expensive to calcu-

late in the case of the N-body problem.

All the other methods used to solve the N-body differential equation end up having

a similar sort of error term. That is, the error will have some constant times, some power

of the step size times, some complicated function evaluated during the time interval

*(t ...*

*t+h)*

. The constant is often hard to calculate, the function is very hard to calculate, the time

value that the function is evaluated at is impossible to calculate, so the only easily known

quantity of this error term is the power of the step size.

(16:580-2)

The error term from above

would normally be denoted as

*O(h*

*5*

*)*

, that is, it is on the order of

*h*

*5*

. Thus, the formula is

accurate to

*O(h*

*4*

*)*

and as a result, this method would be known as a "fourth order" approx-

imation of the exact solution.

Before an evaluation of the different methods of integrating ODEs can be made,

objective criteria must be defined. For most N-body problems, we can use this definition.

Definition:

One method is

**better**

than another method if, in a fixed amount of

time, it is able to calculate the positions and velocities with greater

accuracy.

In the definition of a "better" method, the phrase "in a fixed amount of time" is

very important. It doesn't do any good to have a routine that can calculate the movements

of the stars more accurately if it also takes longer to do the calculations than another

method. The quicker method could be made more accurate by just decreasing the step size

a little. For the same reason, it is also meaningless to just compare "which is more accu-

rate at a given step size", some methods do much more work per step.

1. Discretization error is also known as truncation error for this reason.

*t*

...

*t*
*h*

+

(

)

*x*
*t*
*h*

+

(

)

*x*
*t*

(
)

*h**x*

'

*t*

(
)

12

*h*

2

*x*

''

*t*

(
)

1

2
3

*h*

3

*x*

'''

*t*

(
)

1

4!

*h*

4

*x*

4

(
)

*t*

(
)

+

+

+

+

=

1

5!

*h*

5

*x*

5

(
)

(
)

This document is best viewed as n-body.pdf because the translation to html was buggy.