Давайте рассмотрим, что у меня есть система из 4 ОДУ: dX / dt = F (X), где X - вектор (4-размерность), а F: R ^ 4 -> R ^ 4. F называется vectorDE_total_function, и я пытаюсь вычислить решение с помощью RK-4.
def solvingDES():
previous_vector = np.array ([theta_1, omega_1, theta_2, omega_2]);
for current_time in time:
temp_vector = previous_vector;
RK_vector = np.array([0.0,0.0,0.0,0.0]);
for c in [6,3,3,6]:
RK_vector = vectorDE_total_function(previous_vector + c * RK_vector/6) * time_step;
temp_vector += RK_vector / c;
previous_vector = temp_vector;
current_time += 1;
И похоже, что где-то я ошибаюсь, но не знаю где. Это кажется законным?