Absolute error of ODE45 and Runge-Kutta methods compared with analytical solution

后端 未结 2 549
迷失自我
迷失自我 2020-12-01 13:32

I would appreciate if someone can help with the following issue. I have the following ODE:

dr/dt = 4*exp(0.8*t) - 0.5*r   ,r(0)=2, t[0,1]       (1)
         


        
2条回答
  •  清歌不尽
    2020-12-01 13:45

    ode45 is coupled rk4-rk5. Personally I think the ODE45 error is nicer. Notice that it stays bounded. The ode4 gets corrected when error magnitude gets too big, and the minimum error per cycle is about 1e-10. The rk4 is "running away" and nothing is stopping it.

提交回复
热议问题