用二分法求方程x+1/x-3=0在区间(2,3)内的近似值
用二分法求方程x+1/x-3=0在区间(2,3)内的近似值
f(x)=x+1/x-3
f(2)=-0.5 f(3)=1/3
f(x)是减函数
x1=2 x2=3
x1\x09 f((x1+x2)/2)\x09 x2\x09 (x1+x2)/2
2.0000000000 \x09-0.1000000000 \x093.0000000000 \x092.5000000000
x1= (x1+x2)/2
2.5000000000 \x090.1136363636 \x093.0000000000 \x092.7500000000
x2=(x1+x2)/2
2.5000000000 \x090.0059523810 \x092.7500000000 \x092.6250000000
2.5000000000 \x09-0.0472560976 \x092.6250000000 \x092.5625000000
2.5625000000 \x09-0.0207078313 \x092.6250000000 \x092.5937500000
2.5937500000 \x09-0.0073914671 \x092.6250000000 \x092.6093750000
2.6093750000 \x09-0.0007229478 \x092.6250000000 \x092.6171875000
2.6171875000 \x090.0026138692 \x092.6250000000 \x092.6210937500
2.6171875000 \x090.0009452484 \x092.6210937500 \x092.6191406250
2.6171875000 \x090.0001110972 \x092.6191406250 \x092.6181640625
2.6171875000 \x09-0.0003059386 \x092.6181640625 \x092.6176757813
2.6171875000