- #1
nikolafmf
- 114
- 0
Homework Statement
Solve the Kepler problem by Runge-Kutta method, where initial conditions x(0)=x0, y(0)=y0, vx(0)=vx0, vy(0)=vy0
Homework Equations
dvx/dt = -GMx/(x2+y2)3/2 (1)
dvy/dt = -GMy/(x2+y2)3/2 (2)
dx/dt = vx (3)
dy/dt = vy (4)
The Attempt at a Solution
First of all, Runge-Kutta solves equations which have this form:
dv/dt = f(t,v).
But equations (1) and (2) are of the form dv/dt = f(x(t), y(t)). They don't have v on the right side and t is implicit. So, problem arises when I compute k2, k3 etc. For example:
k1 = f(t_n, v_n)
k2 = f(t_n + 1/2h, v_n+1/2hk_1)
k3 = f(t_n+ 1/2h, v_n+1/2hk_2)
Now, if I am right, k1 = k2= k3=k4 in my case, because I have not v on the right side of the equation. If that is true, then Runge-Kutta reduces to ordinary Euler method and brings nothing new. My question is, are really k1 = k2= k3=k4? And if they are not equal, where is my mistake?
Or, I can ask otherwise, how can I implement the Runge-Kutta method to Kepler problem?
Last edited: