当前位置:文档之家› 数值方法 matlab求解微分方程

数值方法 matlab求解微分方程


.
.
.
.
.
.
Differential Equations (OP459/P246)
. Numerical Methods 何军辉 Section 6.1
I.V.P
Section 6.2
Euler’s Method Step Size versus Error euler.m
A differential equation is a mathematical equation for an unknown function of one or several variables that relates the values of the function itself and of its derivatives of various orders. 含有未知函数的导数 Differential equations play a prominent role in engineering, physics, economics and other disciplines. Integration may be used to find the explicit formula for the differential equations. 显式解 dy = 1 − e−t dt y(t) = t + e−t + C
.
Numerical Methods
. Chaper 6 – Solution of Differential Equations 何军辉
School of Computer Science and Engineering South China University of Technology
Autumn 2010
. Numerical Methods 何军辉 Section 6.1
I.V.P
Suppose that f(t, y) is defined on the region R. If there exists a constant L > 0 so that |fy (t, y)| ≤ L for all (t, y) ∈ R
Substitute y′ (t0 ) = f(t0 , y(t0 )) and h = t1 − t0 y(t1 ) = y(t0 ) + hf(t0 , y(t0 )) + y′′ (c1 )
8 .
. . .
h2 2
. . .
Euler’s Method (OP466/P252)
. Numerical Methods 何军辉 Section 6.1
Euler’s Method Step Size versus Error euler.m
Section 6.3
Heun’s Method Step Size versus Error heun.m
Assume that y(t), y′ (t) and y′′ (t) are continuous and use Taylor’s theorem to expand y(t) about t = t0 . 泰勒展开 y(t) = y(t0 ) + y′ (t0 )(t − t0 ) + y′′ (c1 )(t − t0 )2 2
I.V.P
欧拉近似: If the step size h is chosen small enough, then we may neglect the second-order term and obtain the Euler’s approximation y1 = y0 + hf(t0 , y0 ) The general step for Euler’s method is 求解一般步骤 tk+1 = tk +h, yk+1 = yk +hf(tk , yk ) for k = 0, 1, . . . , M−1
Section 6.2
Euler’s Method Step Size versus Error euler.m
Section 6.3
Heun’s Method Step Size versus Error heun.m
Example: Use Euler’s method to solve approximately the initial value problem y′ = Ry over [0, 1] with y(0) = y0 and R is a constant.
I.V.P
Subdivided the interval [a, b] into M equal subintervals and select the mesh points 划分等距子区间 tk = a + kh for k = 0, 1, . . . , M where h= b−a M
Section 6.2
Geometric Interpretation The slope of a solution curve y = f(t) can be found using the implicit formula m = f(t, y(t)). A slope filed 斜率场 or direction field 方向场 is a graph that indicated the slopes {mi,j } over the region R = {(t, y) : a ≤ t ≤ b, c ≤ y ≤ d}.
Section 6.2
Euler’s Method Step Size versus Error euler.m
Section 6.3
Heun’s Method Step Size versus Error heun.m
on an interval [t0 , b] is a differentiable function y = y(t) such that .
Section 6.3
Heun’s Method Step Size versus Error heun.m
2 .
.
.
.
.
.
.
Differential Equations (OP460/P247)
. Numerical Methods 何军辉 Section 6.1
I.V.P
初值问题: Initial Value Problem . Definition .. A solution to the initial value problem (I.V.P) y′ = f(t, y) with y(t0 ) = y0
Section 6.3
Heun’s Method Step Size versus Error heun.m
4 .
.
.

.
.
.
Differential Equations (OP461/P248)
. Numerical Methods 何军辉 Section 6.1
I.V.P
利普希茨条件: . Definition .. Given the rectangle R = {(t, y) : a ≤ t ≤ b, c ≤ y ≤ d}, assume that f(t, y) is continuous on R. The function f is said to satisfy a Lipschitz condition in the variable y on R provided that a constant L > 0 exists with the property that |f(t, y1 ) − f(t, y2 )| ≤ L|y1 − y2 | whenever (t, y1 ), (t, y2 ) ∈ R. . The constant L is called a Lipschitz constant for f.
Section 6.2
Euler’s Method Step Size versus Error euler.m
Section 6.3
Heun’s Method Step Size versus Error heun.m
5 .
.
.
.
.
.
.
Differential Equations (OP462/P248)
. . . . . .
Section 6.3
Heun’s Method Step Size versus Error heun.m
6 .
Euler’s Method (OP465/P251)
. Numerical Methods 何军辉 Section 6.1
I.V.P
欧拉方法: Not all initial value problem can be solved explicitly, and often it is impossible to find a formula for the solution y(t). For example: y′ = t3 + y2 with y(0) = 0. 无显式解 Euler’s method has limited use because of the larger error that is accumulated as the process proceeds. 累积误差大 But Euler’s method serves to illustrate the concepts involved in other advanced methods, so it is important. Problem description 点集作为近似解
3 .
y(t0 ) = y0
and
相关主题