Movatterモバイル変換


[0]ホーム

URL:


Wikipedia

Bisection method

This article is about searching zeros of continuous functions. For searching a finite sorted array, seebinary search algorithm. For the method of determining what software change caused a change in behavior, seeBisection (software engineering).

Inmathematics, thebisection method is aroot-finding method that applies to anycontinuous function for which one knows two values with opposite signs. The method consists of repeatedlybisecting theinterval defined by these values and then selecting the subinterval in which the function changes sign, and therefore must contain aroot. It is a very simple and robust method, but it is also relatively slow. Because of this, it is often used to obtain a rough approximation to a solution which is then used as a starting point for more rapidly converging methods.[1] The method is also called theinterval halving method,[2] thebinary search method,[3] or thedichotomy method.[4]

A few steps of the bisection method applied over the starting range [a1;b1]. The bigger red dot is the root of the function.

Forpolynomials, more elaborate methods exist for testing the existence of a root in an interval (Descartes' rule of signs,Sturm's theorem,Budan's theorem). They allow extending the bisection method into efficient algorithms for finding all real roots of a polynomial; seeReal-root isolation.

The method

edit

The method is applicable for numerically solving the equationf(x) = 0 for thereal variablex, wheref is acontinuous function defined on an interval [ab] and wheref(a) andf(b) have opposite signs. In this casea andb are said to bracket a root since, by theintermediate value theorem, the continuous functionf must have at least one root in the interval (a,b).

At each step the method divides the interval in two parts/halves by computing the midpointc = (a+b) / 2 of the interval and the value of the functionf(c) at that point. Ifc itself is a root then the process has succeeded and stops. Otherwise, there are now only two possibilities: eitherf(a) andf(c) have opposite signs and bracket a root, orf(c) andf(b) have opposite signs and bracket a root.[5] The method selects the subinterval that is guaranteed to be a bracket as the new interval to be used in the next step. In this way an interval that contains a zero off is reduced in width by 50% at each step. The process is continued until the interval is sufficiently small.

Explicitly, iff(c)=0 thenc may be taken as the solution and the process stops. Otherwise, iff(a) andf(c) have opposite signs, then the method setsc as the new value forb, and iff(b) andf(c) have opposite signs then the method setsc as the newa. In both cases, the newf(a) andf(b) have opposite signs, so the method is applicable to this smaller interval.[6]

Iteration tasks

edit

The input for the method is a continuous functionf, an interval [a,b], and the function valuesf(a) andf(b). The function values are of opposite sign (there is at least one zero crossing within the interval). Each iteration performs these steps:

  1. Calculatec, the midpoint of the interval,c =a+b/2.
  2. Calculate the function value at the midpoint,f(c).
  3. If convergence is satisfactory (that is,ca is sufficiently small, or |f(c)| is sufficiently small), returnc and stop iterating.
  4. Examine the sign off(c) and replace either (a,f(a)) or (b,f(b)) with (c,f(c)) so that there is a zero crossing within the new interval.

When implementing the method on a computer, there can be problems with finite precision, so there are often additional convergence tests or limits to the number of iterations. Althoughf is continuous, finite precision may preclude a function value ever being zero. For example, considerf(x) = cosx; there is no floating-point value approximatingx =π/2 that gives exactly zero. Additionally, the difference betweena andb is limited by the floating point precision; i.e., as the difference betweena andb decreases, at some point the midpoint of[a,b] will be numerically identical to (within floating point precision of) eithera orb.

Algorithm

edit

The method may be written inpseudocode as follows:[7]

input: Functionf,        endpoint valuesa,b,        toleranceTOL,        maximum iterationsNMAXconditions:a <b,             eitherf(a) < 0 andf(b) > 0 orf(a) > 0 andf(b) < 0output: value which differs from a root off(x) = 0 by less thanTOLN ← 1whileNNMAXdo// limit iterations to prevent infinite loopc ← (a +b)/2// new midpointiff(c) = 0 or (ba)/2 <TOLthen// solution found        Output(c)Stopend ifNN + 1// increment step counterif sign(f(c)) = sign(f(a))thenacelsebc// new intervalend whileOutput("Method failed.")// max number of steps exceeded

Example: Finding the root of a polynomial

edit

Suppose that the bisection method is used to find a root of the polynomial

f(x)=x3x2.{\displaystyle f(x)=x^{3}-x-2\,.} 

First, two numbersa{\displaystyle a}  andb{\displaystyle b}  have to be found such thatf(a){\displaystyle f(a)}  andf(b){\displaystyle f(b)}  have opposite signs. For the above function,a=1{\displaystyle a=1}  andb=2{\displaystyle b=2}  satisfy this criterion, as

f(1)=(1)3(1)2=2{\displaystyle f(1)=(1)^{3}-(1)-2=-2} 

and

f(2)=(2)3(2)2=+4.{\displaystyle f(2)=(2)^{3}-(2)-2=+4\,.} 

Because the function is continuous, there must be a root within the interval [1, 2].

In the first iteration, the end points of the interval which brackets the root area1=1{\displaystyle a_{1}=1}  andb1=2{\displaystyle b_{1}=2} , so the midpoint is

c1=2+12=1.5{\displaystyle c_{1}={\frac {2+1}{2}}=1.5} 

The function value at the midpoint isf(c1)=(1.5)3(1.5)2=0.125{\displaystyle f(c_{1})=(1.5)^{3}-(1.5)-2=-0.125} . Becausef(c1){\displaystyle f(c_{1})}  is negative,a=1{\displaystyle a=1}  is replaced witha=1.5{\displaystyle a=1.5}  for the next iteration to ensure thatf(a){\displaystyle f(a)}  andf(b){\displaystyle f(b)}  have opposite signs. As this continues, the interval betweena{\displaystyle a}  andb{\displaystyle b}  will become increasingly smaller, converging on the root of the function. See this happen in the table below.

Iterationan{\displaystyle a_{n}} bn{\displaystyle b_{n}} cn{\displaystyle c_{n}} f(cn){\displaystyle f(c_{n})} 
1121.5−0.125
21.521.751.6093750
31.51.751.6250.6660156
41.51.6251.56250.2521973
51.51.56251.53125000.0591125
61.51.53125001.5156250−0.0340538
71.51562501.53125001.52343750.0122504
81.51562501.52343751.5195313−0.0109712
91.51953131.52343751.52148440.0006222
101.51953131.52148441.5205078−0.0051789
111.52050781.52148441.5209961−0.0022794
121.52099611.52148441.5212402−0.0008289
131.52124021.52148441.5213623−0.0001034
141.52136231.52148441.52142330.0002594
151.52136231.52142331.52139280.0000780

After 13 iterations, it becomes apparent that there is a convergence to about 1.521: a root for the polynomial.

Analysis

edit

The method is guaranteed to converge to a root off iff is acontinuous function on the interval [a,b] andf(a) andf(b) have opposite signs. Theabsolute error is halved at each step so the methodconverges linearly. Specifically, ifc1 =a+b/2 is the midpoint of the initial interval, andcn is the midpoint of the interval in thenth step, then the difference betweencn and a solutionc is bounded by[8]

|cnc||ba|2n.{\displaystyle |c_{n}-c|\leq {\frac {|b-a|}{2^{n}}}.} 

This formula can be used to determine, in advance, an upper bound on the number of iterations that the bisection method needs to converge to a root to within a certain tolerance.The numbern of iterations needed to achieve a required tolerance ε (that is, an error guaranteed to be at most ε), is bounded by

nn1/2log2(ϵ0ϵ),{\displaystyle n\leq n_{1/2}\equiv \left\lceil \log _{2}\left({\frac {\epsilon _{0}}{\epsilon }}\right)\right\rceil ,} 

where the initial bracket sizeϵ0=|ba|{\displaystyle \epsilon _{0}=|b-a|}  and the required bracket sizeϵϵ0.{\displaystyle \epsilon \leq \epsilon _{0}.}  The main motivation to use the bisection method is that over the set of continuous functions, no other method can guarantee to produce an estimate cn to the solution c that in theworst case has anϵ{\displaystyle \epsilon }  absolute error with less than n1/2 iterations.[9] This is also true under several common assumptions on function f and the behaviour of the function in the neighbourhood of the root.[9][10]

However, despite the bisection method being optimal with respect to worst case performance under absolute error criteria it is sub-optimal with respect toaverage performance under standard assumptions[11][12] as well asasymptotic performance.[13] Popular alternatives to the bisection method, such as thesecant method,Ridders' method orBrent's method (amongst others), typically perform better since they trade-off worst case performance to achieve higherorders of convergence to the root. And, a strict improvement to the bisection method can be achieved with a higher order of convergence without trading-off worst case performance with theITP Method.[13][14][non-primary source needed]

Generalization to higher dimensions

edit

The bisection method has been generalized to multi-dimensional functions. Such methods are calledgeneralized bisection methods.[15][16]

Methods based on degree computation

edit

Some of these methods are based on computing thetopological degree, which for a bounded regionΩRn{\displaystyle \Omega \subseteq \mathbb {R} ^{n}}  and a differentiable functionf:RnRn{\displaystyle f:\mathbb {R} ^{n}\rightarrow \mathbb {R} ^{n}}  is defined as a sum over its roots:

deg(f,Ω):=yf1(0)sgndet(Df(y)){\displaystyle \deg(f,\Omega ):=\sum _{y\in f^{-1}(\mathbf {0} )}\operatorname {sgn} \det(Df(y))} ,

whereDf(y){\displaystyle Df(y)}  is theJacobian matrix,0=(0,0,...,0)T{\displaystyle \mathbf {0} =(0,0,...,0)^{T}} , and

sgn(x)={1,x>00,x=01,x<0{\displaystyle \operatorname {sgn}(x)={\begin{cases}1,&x>0\\0,&x=0\\-1,&x<0\\\end{cases}}} 

is thesign function.[17] In order for a root to exist, it is sufficient thatdeg(f,Ω)0{\displaystyle \deg(f,\Omega )\neq 0} , and this can be verified using asurface integral over the boundary ofΩ{\displaystyle \Omega } .[18]

Characteristic bisection method

edit

Thecharacteristic bisection method uses only the signs of a function in different points. Leff be a function from Rd to Rd, for some integerd ≥ 2. Acharacteristic polyhedron[19] (also called anadmissible polygon)[20] off is apolytope in Rd, having 2d vertices, such that in each vertexv, the combination of signs off(v) is unique and thetopological degree off on its interior is not zero (a necessary criterion to ensure the existence of a root).[21] For example, ford=2, a characteristic polyhedron off is aquadrilateral with vertices (say) A,B,C,D, such that:

Aproper edge of a characteristic polygon is an edge between a pair of vertices, such that the sign vector differs by only a single sign. In the above example, the proper edges of the characteristic quadrilateral are AB, AC, BD and CD. Adiagonal is a pair of vertices, such that the sign vector differs by alld signs. In the above example, the diagonals are AD and BC.

At each iteration, the algorithm picks a proper edge of the polyhedron (say, A—B), and computes the signs off in its mid-point (say, M). Then it proceeds as follows:

Suppose the diameter (= length of longest proper edge) of the original characteristic polyhedron isD. Then, at leastlog2(D/ε){\displaystyle \log _{2}(D/\varepsilon )}  bisections of edges are required so that the diameter of the remaining polygon will be at mostε.[20]: 11, Lemma.4.7  If the topological degree of the initial polyhedron is not zero, then there is a procedure that can choose an edge such that the next polyhedron also has nonzero degree.[21][22]

See also

edit

References

edit
  1. ^Burden & Faires 1985, p. 31
  2. ^"Interval Halving (Bisection)". Archived fromthe original on 2013-05-19. Retrieved2013-11-07.
  3. ^Burden & Faires 1985, p. 28
  4. ^"Dichotomy method - Encyclopedia of Mathematics".www.encyclopediaofmath.org. Retrieved2015-12-21.
  5. ^If the function has the same sign at the endpoints of an interval, the endpoints may or may not bracket roots of the function.
  6. ^Burden & Faires 1985, p. 28 for section
  7. ^Burden & Faires 1985, p. 29. This version recomputes the function values at each iteration rather than carrying them to the next iterations.
  8. ^Burden & Faires 1985, p. 31, Theorem 2.1
  9. ^abSikorski, K. (1982-02-01)."Bisection is optimal".Numerische Mathematik.40 (1):111–117.doi:10.1007/BF01459080.ISSN 0945-3245.S2CID 119952605.
  10. ^Sikorski, K (1985-12-01). "Optimal solution of nonlinear equations".Journal of Complexity.1 (2):197–209.doi:10.1016/0885-064X(85)90011-1.ISSN 0885-064X.
  11. ^Graf, Siegfried; Novak, Erich; Papageorgiou, Anargyros (1989-07-01)."Bisection is not optimal on the average".Numerische Mathematik.55 (4):481–491.doi:10.1007/BF01396051.ISSN 0945-3245.S2CID 119546369.
  12. ^Novak, Erich (1989-12-01)."Average-case results for zero finding".Journal of Complexity.5 (4):489–501.doi:10.1016/0885-064X(89)90022-8.ISSN 0885-064X.
  13. ^abOliveira, I. F. D.; Takahashi, R. H. C. (2020-12-06)."An Enhancement of the Bisection Method Average Performance Preserving Minmax Optimality".ACM Transactions on Mathematical Software.47 (1): 5:1–5:24.doi:10.1145/3423597.ISSN 0098-3500.S2CID 230586635.
  14. ^Ivo, Oliveira (2020-12-14)."An Improved Bisection Method".doi:10.1145/3423597.S2CID 230586635.
  15. ^Mourrain, B.; Vrahatis, M. N.; Yakoubsohn, J. C. (2002-06-01)."On the Complexity of Isolating Real Roots and Computing with Certainty the Topological Degree".Journal of Complexity.18 (2):612–640.doi:10.1006/jcom.2001.0636.ISSN 0885-064X.
  16. ^Vrahatis, Michael N. (2020)."Generalizations of the Intermediate Value Theorem for Approximating Fixed Points and Zeros of Continuous Functions". In Sergeyev, Yaroslav D.; Kvasov, Dmitri E. (eds.).Numerical Computations: Theory and Algorithms. Lecture Notes in Computer Science. Vol. 11974. Cham: Springer International Publishing. pp. 223–238.doi:10.1007/978-3-030-40616-5_17.ISBN 978-3-030-40616-5.S2CID 211160947.
  17. ^Polymilis, C.; Servizi, G.; Turchetti, G.; Skokos, Ch.; Vrahatis, M. N. (May 2003). "Locating Periodic Orbits by Topological Degree Theory".Libration Point Orbits and Applications:665–676.arXiv:nlin/0211044.doi:10.1142/9789812704849_0031.ISBN 978-981-238-363-1.
  18. ^Kearfott, Baker (1979-06-01)."An efficient degree-computation method for a generalized method of bisection".Numerische Mathematik.32 (2):109–127.doi:10.1007/BF01404868.ISSN 0945-3245.S2CID 122058552.
  19. ^Vrahatis, Michael N. (1995-06-01)."An Efficient Method for Locating and Computing Periodic Orbits of Nonlinear Mappings".Journal of Computational Physics.119 (1):105–119.Bibcode:1995JCoPh.119..105V.doi:10.1006/jcph.1995.1119.ISSN 0021-9991.
  20. ^abVrahatis, M. N.; Iordanidis, K. I. (1986-03-01)."A rapid Generalized Method of Bisection for solving Systems of Non-linear Equations".Numerische Mathematik.49 (2):123–138.doi:10.1007/BF01389620.ISSN 0945-3245.S2CID 121771945.
  21. ^abVrahatis, M.N.; Perdiou, A.E.; Kalantonis, V.S.; Perdios, E.A.; Papadakis, K.; Prosmiti, R.; Farantos, S.C. (July 2001). "Application of the Characteristic Bisection Method for locating and computing periodic orbits in molecular systems".Computer Physics Communications.138 (1):53–68.Bibcode:2001CoPhC.138...53V.doi:10.1016/S0010-4655(01)00190-4.
  22. ^Vrahatis, Michael N. (December 1988). "Solving systems of nonlinear equations using the nonzero value of the topological degree".ACM Transactions on Mathematical Software.14 (4):312–329.doi:10.1145/50063.214384.

Further reading

edit

External links

edit
Wikiversity has learning resources aboutThe bisection method
The WikibookNumerical Methods has a page on the topic of:Equation Solving

[8]ページ先頭

©2009-2025 Movatter.jp