请输入您要查询的字词:

 

单词 IntervalHalving
释义

interval halving


Interval halving is an efficient method for solving equations. The requirements for using this method are that we have an equation f(x)=0 where f(x) is a continuous functionMathworldPlanetmath, and two values x1 and x2 such that f(x1)f(x2)<0.Since f(x1) and f(x2) have opposite signs, we know by the intermediate value theorem that there exists a solution x^ and that x1x^x2, and with only n+1 function evaluations we can find a shorter interval of length ϵ=|x1-x2|2-n that contains x^. If we take the solution xs=(x1+x2)/2 we get an error |xs-x^|<ϵ.

Algorithm IntervalHalving(x1,x2,f(x),ϵ)
Input: x1,x2,f(x) as above. ϵ is the length of the desired interval
Output: A solution to the equation f(x)=0 that lies in an interval of length <ϵ . Requires f(x1)f(x2)<0

startmin(x1,x2)
endmax(x1,x2)
middle(start+end)/2

while end-start<ϵ
         begin

if f(middle)f(start)<0 then

endmiddle

else

startmiddle

middle(start+end)/2

endxs(start+end)/2 // the solution

The algorithm works by taking an interval [x1,x2] and dividing it into two intervals of equal size. Look at a point in the middle, xm. If the function changes sign in the interval [x1,xm], that is f(x1)f(xm)<0, then by the intermediate value theorem we have a solution in this interval. If not, then the solution is in the interval [xm,x2]. Repeat this until you get a sufficiently smal interval.

Interval halving is very useful in that it only requires the function to be continuous. More efficient methods like Newton’s method require that the function is differentiableMathworldPlanetmathPlanetmath and that we have to have a good starting point.Interval halving has linear convergence while Newton’s method has quadratic convergence.

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/4 9:39:55