同學們:
有一個數學問題請教:“Runge–Kutta methods”
可以參考wikipedia:
http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
其中有一句話“Now pick a step-size h>0 and define”
事實上,星係的曲線是可以繞圈的,所以上麵的h>0 有時必須h小於0.
我的程序是這樣處理有時大於零,有時小於零(下麵是程序)。我的處理正確嗎?
k1=tan(alp); dec=sin(alp);
if( cos(alp)>=0 ){goe1=fabs(goe1);}else{goe1=-fabs(goe1);}
xh=X+0.5*goe1; yh=Y+0.5*goe1*k1;
sl2=x1v(xh,yh,dec);
k2=tan(sl2); dec=sin(sl2);
if( cos(sl2)>=0 ){goe2=fabs(goe2);}else{goe2=-fabs(goe2);}
xh=X+0.5*goe2; yh=Y+0.5*goe2*k2;
sl2=x1v(xh,yh,dec);
k3=tan(sl2); dec=sin(sl2);
if( cos(sl2)>=0 ){goe3=fabs(goe3);}else{goe3=-fabs(goe3);}
xh=X+goe3; yh=Y+goe3*k3;
sl2=x1v(xh,yh,dec);
k4=tan(sl2); dec=sin(sl2);
if( cos(sl2)>=0 ){goe4=fabs(goe4);}else{goe4=-fabs(goe4);}
Xp=X+(1./6.)*(goe1+2*goe2+2*goe3+goe4);
Yp=Y+(1./6.)*(goe1*k1+2*goe2*k2+2*goe3*k3+goe4*k4);
alp=x1v(Xp,Yp,dec);
其中的goe1等等就是上述的h
請幫忙證明是否正確。謝謝!!
請閱讀更多我的博客文章>>>
小推廣的Runge-Kutta方法正確嗎?
所有跟帖:
•
回複:小推廣的Runge-Kutta方法正確嗎?
-孩子長了翅膀-
♀
(566 bytes)
()
12/12/2012 postreply
10:46:08
•
謝謝!我的問題非常簡單,沒有你想象的那麽複雜,
-9$-
♂
(68 bytes)
()
12/12/2012 postreply
10:54:50
•
嗬嗬,比我想象的複雜。
-孩子長了翅膀-
♀
(21 bytes)
()
12/12/2012 postreply
11:00:49
•
在平麵上處處(!)給定 dy/dx, 你就能積分得出平行曲線簇,
-9$-
♂
(31 bytes)
()
12/12/2012 postreply
11:10:04
•
在2D問題中,如果你隻有包含x變量,y,y dot,y double ldot 等叫做常微分方程,
-孩子長了翅膀-
♀
(68 bytes)
()
12/12/2012 postreply
11:19:45
•
我研究的是最簡單PDE: partial y/partial x = f(x,y)
-9$-
♂
(0 bytes)
()
12/12/2012 postreply
11:28:19
•
這叫常微分方程。
-孩子長了翅膀-
♀
(214 bytes)
()
12/12/2012 postreply
11:34:05
•
同學們,對不起。我的問題是常微分方程!!
-9$-
♂
(0 bytes)
()
12/12/2012 postreply
11:35:07
•
沒有時間變量的常微分方程
-孩子長了翅膀-
♀
(321 bytes)
()
12/12/2012 postreply
11:54:31
•
當恒有h<0時, Rutta-cotta 方法絕對是正確的,在交界點時,
-9$-
♂
(97 bytes)
()
12/12/2012 postreply
12:27:26
•
當恒有h小於0時, Rutta-cotta 方法絕對是正確的,在交界點時,
-9$-
♂
(0 bytes)
()
12/12/2012 postreply
12:28:13
•
駐波曲線可以有N個交界點,一個x (可正可負)可以對應N個y值,h是increment,不是函數變量本身。
-孩子長了翅膀-
♀
(0 bytes)
()
12/12/2012 postreply
12:36:36
•
你總是用教科書,而我的是實際問題!關鍵是alp, 不是tan(alp)
-9$-
♂
(269 bytes)
()
12/13/2012 postreply
07:27:37
•
回複:你總是用教科書,而我的是實際問題!關鍵是alp, 不是tan(alp)
-孩子長了翅膀-
♀
(422 bytes)
()
12/13/2012 postreply
07:49:23
•
參數,同學,參數,parameter,parameter,你懂嗎?
-參謀總長-
♂
(0 bytes)
()
12/12/2012 postreply
21:54:45
•
參謀長倒是需要多讀一點教科書。
-9$-
♂
(0 bytes)
()
12/13/2012 postreply
07:28:37
•
回複:參謀長倒是需要多讀一點教科書。
-孩子長了翅膀-
♀
(215 bytes)
()
12/13/2012 postreply
08:03:44
•
我的科研(如果正確)相當於開普勒的工作(數據規律),不是動力學,
-9$-
♂
(566 bytes)
()
12/13/2012 postreply
08:15:30
•
不管你的科研搞什麽,你對電腦程序是新手,
-孩子長了翅膀-
♀
(145 bytes)
()
12/13/2012 postreply
08:24:11
•
step size 就是數值積分所得近似折線的相連折點之間的某種間隔
-9$-
♂
(0 bytes)
()
12/13/2012 postreply
08:30:33
•
你自己再考慮一下 Runge-cotta 方法的應用範圍
-孩子長了翅膀-
♀
(199 bytes)
()
12/13/2012 postreply
09:06:36
•
假如ODE的解是橢圓,解上半圓h大於0,解下半圓h小於0,
-9$-
♂
(116 bytes)
()
12/13/2012 postreply
09:31:01
•
這個用 polar coordinate (r,theta)的牛頓方程
-孩子長了翅膀-
♀
(29 bytes)
()
12/13/2012 postreply
10:10:24
•
用polar coordinate解也是上半圓h大於0,解下半圓h小於0,一樣滴,嘿嘿
-參謀總長-
♂
(0 bytes)
()
12/13/2012 postreply
15:03:30
•
打轉轉不會想不通的,就是x有點想不通,走到頭了回不來 :)
-孩子長了翅膀-
♀
(0 bytes)
()
12/13/2012 postreply
15:09:22
•
我支持9美刀,堅決不打轉轉,就是政府好玩,就是要玩政府 :)
-參謀總長-
♂
(0 bytes)
()
12/13/2012 postreply
15:14:31
•
不是玩政府吧,是玩新 Kepler?
-孩子長了翅膀-
♀
(0 bytes)
()
12/13/2012 postreply
15:21:39
•
是玩正負吧,跟玩政府一樣,我看沒什麽不同,嘿嘿
-參謀總長-
♂
(0 bytes)
()
12/13/2012 postreply
15:58:55
•
同學,你不是在糾結政府嗎?9美刀倒是需要多讀一點民主教科書
-參謀總長-
♂
(0 bytes)
()
12/13/2012 postreply
14:55:57