复旦大学:《Matlab》(ppt实验英文版)Chapter 9 The Initial Value Problem

Introduction to scientific Computing A Matrix Vector Approach Using Matlab Written by Charles FVan Loan 陈文斌 Wbchen(fudan. edu. cn 复日大学
Introduction to Scientific Computing -- A Matrix Vector Approach Using Matlab Written by Charles F.Van Loan 陈 文 斌 Wbchen@fudan.edu.cn 复旦大学

Chapter 9 The Initial value Problem Ba asic concepts The Runge-Kutta Methods The adams methods
Chapter 9 The Initial Value Problem • Basic concepts • The Runge-Kutta Methods • The Adams Methods

()=-5 Solutions to y()=-5 y(t) 0.6 0.2 0.150.2 0.35
-0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Solutions to y'(t) = -5 y(t) y'(t) = −5t

Euler method Five Steps of Euler Method (y'=-5y, y(o)=1) n+1 n+h,f(tn,yu) 16 0.8 9105 0.0 0.1 0.15 0.2 0.25 0.35
-0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Five Steps of Euler Method (y'=-5y, y(0)=1) ( , ) n 1 n n n n y = y + h f t y + Euler Method

Theorem 9 Assume that, for n=0: N, a function y, (t) exists that solves the ivp y(t=f(t, y(t), y(t,=y where(to,yo),…,(tN,y) are given and t<t1<…< Define the global error by gn=yo(tn)-y and the local truncatio n error by LTEM=Ym(tn)-y If for all tElto, tN]and none of the trajector ies {(t,yn():≤t≤N} =0 intersect. then for n=1: N gn≤∑|LTEk k=1
= − = = = = − = − = = = 1 0 0 N 1 0 0 0 N 0 1 | | | | intersect, then for 1: {( , ( )) : } 0 : for all [ , t ] and none of the trajectories 0 ( , ) If ( ) . and the local truncatio n error by Define the global error by ( ) where ( , y ),...,( , y ) are given and . ( )), ( ) solves the IVP Theorem 9 Assume that, for 0 : , a function (t) exists that k n k n y n n n n n n n N N n n n g LTE n N t y t t t N n n t t y f t y f LTE y t y g y t y t t t t t y'(t) f(t,y t y t y n N y

Euler Solution(h=0. 1)of y'=-5y, y(o)=1 y"=-5.0y,y(0)=1 0= computed solution 04 -0.05 0.0 0.15 0.3 0.3 Showtrunc m
-0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 y' = -5.0y, y(0) = 1 * = exact solution o = computed solution Euler Solution (h=0.1) of y'=-5y, y(0) = 1 Showtrunc.m

h=(t max t0)/ h LTEM cm)-y∑E=M2N=m oM.h max M,≤tol 2N n=ceil(((tmax-tO)2*M2)/(2*tol)+1
h = (tmax −t 0 )/ N 2 | | 2 2 h LTEn M M h h t t y t y LTE M N N n N n 2 1 max 0 2 max 2 2 2 | ( ) | | | = − − = = M tol N t t − 2 2 max 0 2 ( ) n = ceil(((tmax-t0)^2*M2)/(2*tol))+1;

Fixed h Euler frror for v'=-V. v(0)=1 tol=01 vals,ovals FixedEuler(fl, 1, 0, 5, 1, tol) Showfixedeuler m 15 ol=0010.n=1251 be taken in regions where the solution is smoo er step Sizes can It is better to determine h adaptively so that long
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 2 4 6 8 x 10-4 Fixed h Euler Error for y'=-y, y(0) = 1 tol = 0.010, n = 1251 Showfixedeuler.m tol=.01; [tvals,yvals] = FixedEuler('f1',1,0,5,1,tol); It is better to determine h adaptively so that longer step sizes can be taken in regions where the solution is smooth

Euler in 3-Digit Arithmetic 0.045 . o4 Note that the error gets worse as h get smaller because the step size are in the neighborhood of 0.035 unit roundoff. 0.03 0.025 0.02 h=1/180 0.015 h=1/160 0.01 0.005 h=1/140 0.2 0.3 04 0.6 0.7 0.8 0.9
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 Euler in 3-Digit Arithmetic h = 1/140 h = 1/160 h = 1/180 Note that the error gets worse as h get smaller because the step size are in the neighborhood of unit roundoff

Stability y(t)=-10y(t) yn+1=(1-10h)yn 1-10h1→h<1/5
Stability y'(t) = −10y(t) n n y (1 10h)y +1 = − |1−10h |1 h 1/5
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《Matlab》(ppt实验英文版)Chapter 2 Polynomial Interpolation.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter 8 Nonlinear Equations and Optimization.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter 7 The QR and Cholesky Factorizations.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter 6 Linear systems.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapte 4 Numerical Integration.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter3 Piecewise Polynomial Interpolation.ppt
- 《计算机网络基础》第7章 网络管理与网络安全.ppt
- 《计算机网络基础》第6章 网页制作技术.ppt
- 《计算机网络基础》第5章 Internet的使用.ppt
- 《小技巧让PDF文件与Word文档之间自由地转换》讲义.pdf
- 同济大学:《计算机文化》(第三版)第六章 网络基础.ppt
- 同济大学:《计算机文化》(第三版)第五章 应用软件和办公软件.ppt
- 同济大学:《计算机文化》(第三版)第四章 系统软件及其常用操作系统.ppt
- 同济大学:《计算机文化》(第三版)第一章 计算机与信息社会.ppt
- 《ASP网页数据库短训教程》第9章 Application对象与 Session对象.ppt
- 《ASP网页数据库短训教程》第8章 Request对象及其使用.ppt
- 《ASP网页数据库短训教程》第7章 ASP程序与ASP的内置对象.ppt
- 《ASP网页数据库短训教程》第6章 VBScript的对象编程.ppt
- 《ASP网页数据库短训教程》第5章 VBScript编程语言(二).ppt
- 《ASP网页数据库短训教程》第4章 VBScript编程语言(一).ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter 5 Matrix computations.ppt
- 复旦大学:《Matlab》(ppt实验英文版)Chapter I power tools of the trade.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第1章 绪论.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第2章 线性表.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第3章 栈和队列.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第4章 串.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第5章 多维数组和广义表.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第6章 树.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第7章 图.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第8章 查找.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第9章 排序.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第七章 图.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第九章 排序.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第八章 查找.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)第十章 文件.ppt
- 同济大学:《数据结构》课程PPT教学课件(C++描述)目录.ppt
- 华南热带农业大学:《计算机导论》第1章 计算机基础知识计.ppt
- 华南热带农业大学:《计算机导论》第2章 微型计算机系统的组成.ppt
- 华南热带农业大学:《计算机导论》第3章 计算机操作系统.ppt
- 华南热带农业大学:《计算机导论》第4章 办公自动化软件应用.ppt