View Single Post

Recognitions:
Gold Member

## Kepler problem with Runge-Kutta

 Quote by nikolafmf If u=(x,y,vx,vy), then du/dt = (vx, vy, -GMx/(x^2+y^2)^(3/2), -GMx/(x^2+y^2)^(3/2)), right?
That is correct (well, the last component should be proportional with y and not x, but I assume that is just a typo).

 Then what function of u is it? I see that it is a function of the components of u, but not of u itself. And, t doesn't even appear here (at least not explicitely).
The vector u is just a convenient notation for the complete state - a notion used by the RK scheme you mentioned part of. If you are unsure about what a vector is you probably want to refer to a textbook for some background (see [1] for a brief overview). You are free to translate each vector equation, like k1 = f(u), to the corresponding set of 4 equations, like

k1[0] = f(un)[0] = (vxn, vyn, -GMx/(xn2+yn2)(3/2), -GMy/(xn2+yn2)(3/2))[0] = vxn,
k1[1] = f(un)[1] = ... = vyn,
k1[2] = f(un)[1] = ... = -GMx/(xn2+yn2)(3/2), and
k1[3] = f(un)[3] = ... = -GMy/(xn2+yn2)(3/2)

where I have used the code-like notation "vector[i]" to mean "the i-th component of vector" for i = 0, 1, 2, 3. So, for each of k1 to k4 you can write up such 4 scalar expressions.

You are correct that time t does not explicitly appear in the field, that is, f(u, t) = f(u). This is quite common in dynamical systems and a system with this characteristic is called an autonomous system (see for instance [2]).

[1] http://en.wikipedia.org/wiki/Euclidean_vector
[2] http://en.wikipedia.org/wiki/Autonom...m_(mathematics)