2015-02-05 21 views
0

對不起,如果我有這個問題措辭不好,也許如果有人可以建議更好的措辭,我會相應地改變。python中Runge-Kutta 3(RK3)方法的最終值的係數

所以,就RK4而言,我們有時間步長x_old作爲初始x值,

x_new = x_old + (1.0/6) * dt * (k1 + 2*k2 + 2*k3 + k4) 

解決RK3的方程式是什麼樣的?即在這種情況下,k1,k2和k3的係數值是多少?

我找不到RK3的任何在線的例子,很抱歉我要問這個問題?

謝謝!

+2

其上維基... [http://en.wikipedia.org/wiki/List_of_Runge-Kutta_methods#Classic_fourth -order_method](http://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Classic_fourth-order_method)查看[Kutta的三階法](http://en.wikipedia.org/wiki/List_of_Runge %E2%80%93Kutta_methods#Kutta.27s_third-order_method) – user3684792 2015-02-05 16:23:48

回答

2

第三順序方法的完整步驟方程爲(在僞代碼)

y[i+1] = y[i] + 1.0/6.0 * (k1 + 4.0*k2 + k3) 

k1 = h * f(x[i], y[i]) 
k2 = h * f(x[i] + h/2, y[i] + k1/2) 
k3 = h * f(x[i] + h, y[i] - k1 + 2 * k2) 
+0

非常完美,非常感謝! – mrhappysmile 2015-02-05 16:35:55