浙江大学:《数值分析》课程PPT教学课件(双语版)第二章 非线性方程求根 Solutions of Nonlinear Equations

第二章非线性方程求根 Solutions of Nonlinear Equations * 求(=0的根 §1多项式基础/ Polynomialsη(自习) §2二分法/ Bisection Method 原理:若∫∈CIa,b,且f(a)·∫(b)<0,则f在(a,b)上必 有一根
第二章 非线性方程求根 /* Solutions of Nonlinear Equations */ §1 多项式基础 /* Polynomials */ (自习) §2 二分法 /* Bisection Method */ 求 f (x) = 0 的根 原理:若 f C[a, b],且 f (a) · f (b) < 0,则 f 在 (a, b) 上必 有一根

§2 Bisection method When to stop? b k1-xA<61或(x)<62 不能保证x的精 度
§2 Bisection Method a b x1 x2 a b When to stop? 1 1 x x ε k+ − k 2 或 f (x) ε 不能保证 x 的精 度 x* 2 x* x

§2 Bisection method 误差)分析: 第k步产生的x有误差kx小 第步产生的x=2有误差k-x2n 对于给定的精度E,可估计二分法所需的步数k 2<→k、[n(6-a)-lal -a In 2 ①简单: ②对(x)要求不高(只要连续即可) ①无法求复根及偶重很 HW:p.16#1 ②收敛慢 注:用二分法求根,最好先给出∫(x)草图以确定根的大概 位置。或用搜索程序,将a,b分为若干小区间,对每一个 满足f(a)f(b)<0的区间调用二分法程序,可找出区间 a,b内的多个根,且不必要求f(a)f(b)<0
§2 Bisection Method 误差 分析: 第1步产生的 2 1 a b x + = 有误差 2 1 b a |x x*| − − 第 k 步产生的 xk 有误差 k k b a |x x*| 2 − − 对于给定的精度 ,可估计二分法所需的步数 k : ( ) ln 2 ln ln 2 b a ε ε k b a k − − − ①简单; ② 对f (x) 要求不高(只要连续即可) . ①无法求复根及偶重根 ② 收敛慢 注:用二分法求根,最好先给出 f (x) 草图以确定根的大概 位置。或用搜索程序,将[a, b]分为若干小区间,对每一个 满足 f (ak )·f (bk ) < 0 的区间调用二分法程序,可找出区间 [a, b]内的多个根,且不必要求 f (a)·f (b) < 0 。 HW: p.16 #1

§2 Bisection method Lab 02. bisection method Use the Bisection method to find on m given intervals the m real roots of a given polynomial of degree5≥n≥m,p(x)=cnx+cn-1x+…+c1x+Co Input There are severalsets ofinputs. For each set The 1st line contains an integer n which is the degree of a polynomial. n=-l signals the end of file. The 2nd line contains n+l real numbers cn. C Co which are the coefficients of the polynomial. The numbers are separated by spaces. The 3rd line contains an integer Max and two real numbers epsl and eps2, where Max is the maximum number of iterations, eps l is the accuracy bound for x and eps 2 is the accuracy bound forp(x). The 4th line contains an integer m(n2 m20), followed by m pairs of real numbers a bi...am bm which are the end points of the intervals Ia1,b1l…Iam,bml
§2 Bisection Method Lab 02. Bisection Method Use the Bisection method to find on m given intervals the m real roots of a given polynomial of degree 5 n m, . Input There are severalsets of inputs. For each set: The 1 st line contains an integer n which is the degree of a polynomial. n = −1 signalsthe end of file. The 2 nd line contains n+1 real numbers which are the coefficients of the polynomial. The numbers are separated by spaces. The 3 rd line contains an integer Max and two real numbers eps1 and eps2, where Max is the maximum number of iterations, eps1 is the accuracy bound for x and eps2 is the accuracy bound for p(x). The 4 th line contains an integer m (n m 0), followed by m pairs of real numbers a1 b1 …am bm which are the end points of the intervals [ a1 , b1 ] …[ am , bm ]. 1 0 1 1 p(x) c x c x ... c x c n n n = n + + + + − − 1 0 c ... c c n

$2 Bisection Method Output Each root is to be printed as in the c fprintf fprintf(outfile, 912.7f", root ) / here represents a space * If there is no root found in an interval, simply print“no■root■” The output of the next set must be printed in a new line. Sample Input(a represents a space) 1■0■-1 1000■0.00000001■0.00000001 2■-2■-0.5■0.5■2 1■0■0■-1 1000■0.00000001■0.00000001 2■-1■0■0■2 Sample output (a represents a space) ■■-1.0000000■■■■1.0000000■ no■root■■■■1.0000000■
Output Each root is to be printed as in the C fprintf: fprintf(outfile, "%12.7f", root); /* here represents a space */ If there is no root found in an interval,simply print “noroot”. The output of the next set must be printed in a new line. Sample Input ( represents a space) 2 10−1 10000.000000010.00000001 2−2−0.50.52 3 100−1 10000.000000010.00000001 2−1002 −1 Sample Output ( represents a space) −1.00000001.0000000 noroot1.0000000 §2 Bisection Method

§2 Bisection method 试位法/ Regula Falsi Method Is it really better than Bisection method? (b,∫(b) (a+b)/2 f∫(a) (a,(a) X=a f∫(b)-∫(a) 注:试位法每次迭代比二分法多算一次乘法,而且不保证 收敛
➢ 试位法 /* Regula Falsi Method */ a b (a+b)/2 x* (a, f (a)) (b, f (b)) (b a) f b f a f a x a − − = − ( ) ( ) ( ) Is it really better than Bisection Method? 注:试位法每次迭代比二分法多算一次乘法,而且不保证 收敛。 §2 Bisection Method

§3迭代法/ Fixed-Point iteration 等价变换 ∫(x)=0 x=g(x) f(x)的根 g(x)的不动点 从一个初值x出发,计算x1=g(x),x2=g(x1),…, 思xk+1=g(x),… 若{x}收敛,即存在x使得 路加mx=x*,且g连续,则由 lim x=呵知x) gx*),即x是g的不动点,也就是f的根 Oh yeah? who tells you that the method is convergent? id blem?
§3 迭代法 /* Fixed-Point Iteration */ f (x) = 0 x = g (x) 等价变换 f (x) 的根 g (x) 的不动点 思 路 从一个初值 x0 出发,计算 x1 = g(x0 ), x2 = g(x1 ), …, xk+1 = g(xk ), … 若 收敛,即存在 x* 使得 ,且 g 连续,则由 可知 x* = g(x* ),即x* 是 g 的不动点,也就是f 的根。 k k=0 x lim x x * k k = → ( ) k k k k x g x → + → lim 1 = lim So basically we are done! I can’t believe it’s so simple! What’s the problem? Oh yeah? Who tells you that the method is convergent?

&3 Fixed-Point Iteration y=x y=x y=g(r) glx P1 J y=gun y=g(r) P P
§3 Fixed-Point Iteration x y y = x x y y = x x y y = x x y y = x x* x* x* x* y=g(x) y=g(x) y=g(x) y=g(x) x0 p0 x1 p1 ✓ x0 p0 x1 p1 ✓ x0 p0 x1 p1 x0 p0 x1 p1

&3 Fixed-Point Iteration 定理|考虑方程x=8,80若 (I)当x∈[a,b时,g(x)∈|a,b; (I)彐0≤L<1使得|g(x)|≤L<1对x∈[a,b成立 则任取x∈[,b,由xk+1=g(x)得到的序列{xk}收 敛于g(x)在a,b上的唯不动点。并且有误差估计式: ①|x*-x x L k+1 k (k=1,2,…) ②|x*-xk L 0 , 且存在极限im k+1 g
§3 Fixed-Point Iteration 定理 考虑方程 x = g(x), g(x)C[a, b], 若 ( I ) 当 x[a, b] 时, g(x)[a, b]; ( II ) 0 L < 1 使得 | g’(x) | L < 1 对 x[a, b] 成立。 则任取 x0[a, b],由 xk+1 = g(xk ) 得到的序列 收 敛于g(x) 在[a, b]上的唯一不动点。并且有误差估计式: k k=0 x | | 1 1 | * | k k 1 k x x L x x − − − + | | 1 | * | x1 x0 L L x xk − − − ( k = 1, 2, … ) 且存在极限 ( *) * * lim 1 g x x x x x k k k = − − + → k

&3 Fixed-Point Iteration 证明:①g(x)在|a,b上存在不动点? 令f(x)=g(x)-xa≤g(x)≤b ∴∫(a)=g(a)-a≥0,∫(b)=g(b-b≤0 →f(x)有根√ ②不动点唯一? 反证:若不然,设还有x=g(x),则 x*一x=8(x*)-8(X)=g()(x*-x),5在x和x之间 →(x-x)(1-g(5)=0而|g(5)0
§3 Fixed-Point Iteration 证明:① g(x) 在[a, b]上存在不动点? 令 f (x) = g(x) − x a g(x) b f (a) = g(a) − a 0 , f (b) = g(b) − b 0 f (x) 有根 ② 不动点唯一? 反证:若不然,设还有 x ~ = g(x ~ ) ,则 ), ~ ) ( )( * ~ x* − x ~ = g(x*) − g(x = g ξ x −x 在 x* 和 x ~ 之间。 )(1 ( )) 0 ~ (x* − x − g ξ = 而 g ξ x x ~ | ( )| 1 * = ③ 当k → 时, xk 收敛到 x* ? | x*−xk | = | ( *) ( )| | ( )| | * | −1 −1 − −1 − = k k k g x g x g ξ x x L| x *−x −1 | ...... L | x *−x0 | → 0 k k ✓ ✓ ✓
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.8)多元函数的极值及其求法.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.9)二元函数的泰勒公式.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.7)方向导数与梯度.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.6)微分法在几何上的应用.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.5)隐函数的求导公式.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.4)多元复合函数的求导法则.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.3)全微分及其应用.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.2)偏导数.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第八章 多元函数微分法及其应用(8.1)多元函数的基本概念.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.9)二次曲面.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.8)空间直线及其方程.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.7)平面及其方程.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.6)空间曲线及其方程.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.5)曲面及其方程.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.4)数量积向量积混合积.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.3)向量的坐标.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.2)向量及其加减法向量与数的乘法.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第七章 空间解析几何(7.1)空间直角坐标系.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第六章 定积分的应用(6.6)平均值.ppt
- 黑龙江八一农垦大学:《工科高等数学》课程教学资源(PPT课件)第六章 定积分的应用(6.5)功水压力和引力.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第一章 误差 Error.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)简介(陈越).ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第三章 解线性方程组的直接法 §1 Gaussian Elimination – Amount of Computation.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第三章 解线性方程组的直接法 §2 三角分解法 Matrix Factorization.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第四章 解线性方程组的迭代法 Iterative Techniques for Solving Linear Systems §1 向量和矩阵范数.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第四章 解线性方程组的迭代法 Iterative Techniques for Solving Linear Systems §2 线性方程组的误差分析 §3 Jacobi & Gauss-Seidel Iterative Methods.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第四章 解线性方程组的迭代法 Iterative Techniques for Solving Linear Systems §4 迭代法的收敛性 Convergence of Iterative methods §5 Relaxation Methods.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第五章 特征值与特征向量(幂法 Power Method)(1/2).ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第五章 特征值与特征向量(幂法 Power Method)(2/2).ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第六章 插值 Interpolation §1 拉格朗日多项式 Lagrange Polynomial.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第六章 插值 Interpolation §2 牛顿插值 Newton’s Interpolation §3 厄米插值 Hermite Interpolation §4 Piecewise Polynomial Approximation.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第六章 插值 Interpolation(6-5)三次样条.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第七章 曲线拟合与函数逼近 Approximation Theory §1 最小二乘拟合多项式 L-S approximating polynomials.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第七章 曲线拟合与函数逼近 Approximation Theory §2 正交多项式与最小二乘拟合 Orthogonal Polynomials & Least-Squares Approximatio.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第七章 曲线拟合与函数逼近 Approximation Theory §3 函数的最佳逼近 Optimal Approximation.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第八章 数值积分 Numerical Integration §1Newton-Cotes 公式 Newton-Cotes Formulae.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第八章 数值积分 Numerical Integration §2 复合求积 Composite Quadrature §3 龙贝格积分 Romberg Integration §4 高斯型积分 Gaussian Quadrature.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第九章 常微分方程数值解 Numerical Methods for Ordinary Differential Equations §1 欧拉方法 Euler’s Method §2 龙格 - 库塔法 Runge-Kutta Method §3 收敛性与稳定性 Convergency and Stability.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第九章 常微分方程数值解 Numerical Methods for Ordinary Differential Equations §4 线性多步法 Multistep Method.ppt
- 浙江大学:《数值分析》课程PPT教学课件(双语版)第九章 常微分方程数值解 Numerical Methods for Ordinary Differential Equations §5 微分方程组与高阶方程 Systems of Differential Equations and Higher-Order Equations §6 边值问题的数值解 Boundary-Value Problems.ppt