數值方法 2008, Applied Mathematics NDHU 1 Ordinary differential equations II Runge-Kutta method
數值方法 2008, Applied Mathematics NDHU 2 Runge Kutta method- motivation
數值方法 2008, Applied Mathematics NDHU 3 RK2: Secant method First step Euler rule Second step Euler rule
數值方法 2008, Applied Mathematics NDHU 4 Rule of RK2
數值方法 2008, Applied Mathematics NDHU 5 Rule of RK2
數值方法 2008, Applied Mathematics NDHU 6 RK2 method Function x=RK2(fa,a,b,fx) n=100; h=(b-a)/n; x(1)=fa; for i=2:n t=a+(i-1)*h; c=x(i-1); F1=fx(c,t); F2=fx(c+F1,t); x(i)=x(i-1)+(F1+F2)/2; end
數值方法 2008, Applied Mathematics NDHU 7 Demo_RK2 demo_RK2.exe demo_RK2.ctf demo_RK2.m
數值方法 2008, Applied Mathematics NDHU 8 RK2 and RK4
數值方法 2008, Applied Mathematics NDHU 9 Example >> demo_RK2 keyin derivative function of x and t:x+exp(t) a:0 x(a) :1 b:2 h:0.01 hold on; t=0:0.01:2; x=t.*exp(t)+exp(t); plot(t,x,'r')
數值方法 2008, Applied Mathematics NDHU 10 Exercise Implement the Runge-Kutta 2 method for solving an initial value problem Give an example to test your matlab codes
數值方法 2008, Applied Mathematics NDHU 11 Example >> demo_RK2 keyin derivative function of x and t:1+x.^2+t.^3 a:1 x(a) :-4 b:2 h:0.01 ans =
數值方法 2008, Applied Mathematics NDHU 12 Exercise Implement the RK4 method for solving an IVP problem
數值方法 2008, Applied Mathematics NDHU 13 Demo_RK4 demo_RK4.m >> demo_rk4 keyin derivative function of x and t:1+x.^2+t.^3 a:1 x(a) :-4 b:2 h:0.01 ans =
數值方法 2008, Applied Mathematics NDHU 14 Exercise Apply the Euler method, the Taylor-4 method, the RK2 method and the RK4 method to solve the following IVP problem x'=1+x2 +t3, x(1)=-4, x(2)=?
數值方法 2008, Applied Mathematics NDHU 15 Matlab codes for time series data Eric's Home Page
數值方法 2008, Applied Mathematics NDHU 16 Chaos time series
數值方法 2008, Applied Mathematics NDHU 17 Exercise Apply the RK4 method to solve the following IVP problem
數值方法 2008, Applied Mathematics NDHU 18 mg1.m
數值方法 2008, Applied Mathematics NDHU 19 MG mg.m
數值方法 2008, Applied Mathematics NDHU 20 >> mg >> n=length(x); >> plot(1:1:n,x) a=0.2,c=10,b=0.1, mg.m
數值方法 2008, Applied Mathematics NDHU 21 >> load MG17.dat >> n=length(MG17); >> plot(1:1:n,MG17)
數值方法 2008, Applied Mathematics NDHU 22 MG30
數值方法 2008, Applied Mathematics NDHU 23
數值方法 2008, Applied Mathematics NDHU 24 Mackey-Glass demo_mg.m >> demo_mg Mackey Glass generator tau:30 Series length:360000
數值方法 2008, Applied Mathematics NDHU 25 Tau=3 A stable fixed point attractor
數值方法 2008, Applied Mathematics NDHU 26 Tau=10 A stable limit cycle attractor
數值方法 2008, Applied Mathematics NDHU 27 Tau=15 Period of limit cycle doubles
數值方法 2008, Applied Mathematics NDHU 28 Tau=17
數值方法 2008, Applied Mathematics NDHU 29 tau=30 Chaotic attractor characterized by tau