例1用二分法求x+4x2-10=0 在(1,2)内的根,要求绝对误差不超过x102 解: f(1)=-5<0有根区间 中点xn f(2)=14>0-(1,2)+ x,=1.5 f(1.5)>01,1.5) 125 f(1.25)<0(1.25,1.5) x2=1.375 f(1.375)>0(1.25,375) x4≈1,313 f(1.313)<0(1.313,1375)x5=1.344 f(1.344)<0(1344,1.375)x6≈1360 f(1360)<0(1360,1.375)x,≈1368 f(1.368)>0(1.360,1.368)x=1364
例1 用二分法求 在(1,2)内的根,要求绝对误差不超过 解: f(1)=-5<0 有根区间 中点 f(2)=14>0 -(1,2)+ f(1.25)<0 (1.25,1.5) f(1.375)>0 (1.25,1.375) f(1.313)<0 (1.313,1.375) f(1.344)<0 (1.344,1.375) f(1.360)<0 (1.360,1.375) f(1.368)>0 (1.360,1.368) 4 10 0 3 2 x + x − = 2 10 2 1 − f(1.5)>0 (1,1.5) xn x1 = 1.5 1.364 1.368 1.360 1.344 1.313 1.375 1.25 8 7 6 5 4 3 2 = = = = x x x x x x x
例2,求方程x)=x3=e×=0的一个实根。 因为f0)<0,f(1)>0。故f(x)在(0,1)内有根 用二分法解之,(ab)=(0,1)计算结果如表: a f(x)符号 0 0.5000 k012345678 0.5000 0.7500 0.7500 0.8750 0.8750 0.8125 0.8125 0.7812 0.7812 0.7656 +++一十 0.7656 0.7734 0.7734 0.7695 0.7695 0.7714 90.7714 0.7724 100.7724 0.7729 取x=07729,误差为x*xK=1/21
12 例2,求方程f(x)= x 3 –e -x =0的一个实根。 因为 f(0)<0,f(1)>0。 故f(x)在(0,1)内有根 用二分法解之,(a,b)=(0,1)’计算结果如表: k a bk xk f(xk )符号 0 0 1 0.5000 - 1 0.5000 - 0.7500 - 2 0.7500 - 0.8750 + 3 - 0.8750 0.8125 + 4 - 0.8125 0.7812 + 5 - 0.7812 0.7656 - 6 0.7656 - 0.7734 + 7 - 0.7734 0.7695 - 8 0.7695 - 0.7714 - 9 0.7714 - 0.7724 - 10 0.7724 - 0.7729 + 取x10 =0.7729,误差为| x* -x10|<=1/2 11
Remark1:求奇数个根 Find solutions to the equation 0=x-6x+10 x-4 on the intervals [0, 4], Use the bisection method to compute a solution with an accuracy of 107. Determine the number of iterations to use
Remark1:求奇数个根 Find solutions to the equation on the intervals [0, 4],Use the bisection method to compute a solution with an accuracy of 10-7 . Determine the number of iterations to use
fLy +iux二4 卫ot[f[x1r{xr0r4}1F 0,1],[15,25]and3,4] 利用前面的公式可计算 迭代次数为k=23
[0,1], [1.5, 2.5] and [3,4], 利用前面的公式可计算 迭代次数为k=23
Remark2:要区别根与奇异点 Consider f(x)= tan(x)on the interval (0, 3). Use the 20 iterations of the bisection method and see what happens Explain the results that you obtained (如下图)
Remark2:要区别根与奇异点 Consider f(x) = tan(x) on the interval (0,3).Use the 20 iterations of the bisection method and see what happens. Explain the results that you obtained. (如下图)