ODE 求解方法

本篇博客将对ODE求解方法的一些基本概念,方法做一个学习,总结

we want to solve the differential equations 

                                                               M(t)y'=f(t,y),y(t_0) =y_0

Numerical methods for solving first-order IVPs often fall into one of two large categories: linear multistep methods, or Runge-Kutta methods. A further division can be realized by dividing methods into those that are explicit and those that are implicit. 

将上式进行泰勒展开,

                             

只保留其中一次项,是下面各种积分方法的基础,省去的高次项是积分误差的来源。

基础知识比较好的参考书为:《数值分析》 Timothy Sauer (作者) 吴兆金 , 王国英 , 范红军 (译者)

序号 方法 简介
1

Runge-Kutta

methods

(Euler method

梯形法,

三阶,4阶方法)

推导方法:(对泰勒展开进行逐项匹配,计算参数)

https://wenku.baidu.com/view/37cd2a8671fe910ef12df8af.html

其实有很多种方式,只是为了稳定,才有各阶下的标准形式

是单步方法,计算f_i_+_1 是利用 f_i步的信息

2

多步方法

(Adams-Bashforth,

Adams-Moulton,

Milne-simpson等方法

推导方法(在不同点处展开,与泰勒展开式逐项匹配,计算参数)

参考《数值分析》书317页

与单步方法不同,利用f_i_-_n, f_i_-_n_+_1,....f_i 的信息来计算f_i_+_1

根据计算参数匹对方式,有显示和隐式方法之分

在匹配时,需要考虑稳定性,所有特定方式参数选择产生了特定的方法

3 变步长

《数值分析》305页

每种方法都有截断误差,截断误差和h补偿以及阶数p相关

可以计算出最优的控制步长为

h_*=0.8*(\frac{T\left | w_i \right |}{e_i})^{^{1/(p+1))}}*h_i 

其中e_i 是允许截断误差

4 刚性问题解释

具有这种性质(吸引解被附近快速变化的解所包围)的微分方程成为刚性问题,这经常是多倍尺度信号。

https://ww2.mathworks.cn/company/newsletters/articles/stiff-differential-equations.html

如果步长选择过大,因吸引解附近斜率小,再远一点斜率大,导致预测解偏离吸引解,导致数值震荡,此时可以减小步长,但是会减慢积分速率,另外可以采用隐式预估斜率的方法解决。(更多解释参看《数值计算》313页)

1. Euler method

          https://en.wikipedia.org/wiki/Numerical_methods_for_ordinary_differential_equations

          y'(t)=\frac{y(t+h)-y(t)}{h} to

           y(t+h)=y(t)+hf(t,y(t))(forward Euler method)

           This the forward Euler Method, an explicit method proposed by Leonhard Euler in 1978

           y'(t)=\frac{y(t)-y(t-h)}{h} to

           y_n_+_1 = y_n+hf(t_n_+_1,y_n_+_1)

          The backward Euler method is an implicit method, meaning that we have to solve an equation to find yn+1. It costs more time to solve this equation than explicit methods; this cost must be taken into consideration when one selects the method to use. The advantage of implicit methods such as (6) is that they are usually more stable for solving a stiff equation, meaning that a larger step size h can be used.

2. Runge-Kutta 

      https://en.wikibooks.org/wiki/Introduction_to_Numerical_Methods/Ordinary_Differential_Equations

       2nd order method

                         {\displaystyle y_{i+1}=y_{i}+hf\left(x_{i}+{\frac {h}{2}},y_{i}+{\frac {h}{2}}f(x_{i},y_{i})\right)}

       4th order method

                         {\displaystyle {\begin{aligned}y_{i+1}&=y_{i}+{\tfrac {h}{6}}\left(k_{1}+2k_{2}+2k_{3}+k_{4}\right)\\x_{i+1}&=x_{i}+h\\\end{aligned}}}

                where

                        {\displaystyle {\begin{aligned}k_{1}&=f(x_{i},y_{i}),\\k_{2}&=f(x_{i}+{\tfrac {h}{2}},y_{i}+{\tfrac {1}{2}}k_{1}h),\\k_{3}&=f(x_{i}+{\tfrac {h}{2}},y_{i}+{\tfrac {1}{2}}k_{2}h),\\k_{4}&=f(x_{i}+h,y_{i}+k_{3}h).\end{aligned}}}

matlab 方法描述

           

matlab uses multistep method

http://vmm.math.uci.edu/odeandcm/PDF_Files/Appendices/AppendixI.pdf (introduction about multstep methods)

猜你喜欢

转载自blog.csdn.net/mucai1/article/details/81182864
今日推荐