1.1 Introduction and description of the Bisection method.. 92.3 Algorithm corresponding to the Bisection method.. Introduction to the Bisection Method: This section provides an overview
Introduction and description of the Bisection method
In many cases, we need to find solutions of an equation For example, when finding critical points of a function , we encounter the problem of solving the equationf f ′ (x) 0 The examples and exercises so far were set up carefully so that solutions to that equation could be found in a simple closed form But in practice this will not always be the case, in fact it isalmost neverthe case For example, finding the critical points off(x) = sinx−x 2
2 entails solving the equationf ′ (x) = cosx−x= 0, for which there is no solution in a closed-form expression [ ] Therefore we need to establish methods2 to approximate solutions of this equation.
There are many methods of finding an approximation to the root of an equation such as the Bisection method, Fixed-Point Iteration, Newton’s method, In this report, we will investigated the Bisection method, which is also known as interval halving method,root-finding method, binary search method or dichotomy method This method sep- arates the interval and subdivides the interval in which the root of the equation lies.The principle behind this method is the Intermediate Value Theorem for continuous functions.
The objectives of the report
The objectives of this report are:
1 Provide a clear and concise introduction to the Bisection method.
2 Present the mathematical foundation of the Bisection method including concepts, theorems, and proofs.
3 Show the solution method for the Bisection method.
4 Describe the algorithm to finding roots of polynomial equations by using the Bisection method.
5 Provide illustrative examples of the algorithm in solving polynomial equations.
6 Present a Python program executing the algorithm.
7 Evaluate the report’s achievement and non-achievement.
8 Present further discussion related to this report.
The importance of the report’s contents
Each of the report’s content is essential as:
1 Introduction to the Bisection Method: This section provides an overview of what the Bisection method is and clarifies the purpose and objectives of the report, making it easier for readers to understand the Bisection method in solving nu- merical problems.
2 Mathematical foundation: By discussing concepts, theorems, and proofs, this part equips readers with the necessary mathematical framework to for understand the logic behind the Bisection method.
3 Solution method for the Bisection method: This section shows in detail how the method narrows down the interval containing a root until it converges to an acceptable level of accuracy.
4 Algorithm for the Bisection Method: This part introduces the algorithm using the Bisection method, making it clearer how the method can be systematically applied to find roots of polynomial equations Understanding the algorithm is cru- cial for developing computational tools and software that automate the process, enhancing efficiency and accuracy.
5 Illustrative Examples of the Algorithm: Through examples, we will demonstrate the practical application of the Bisection method algorithm and show how the method can be operated manually.
6 A Python program executing the algorithm: This section provides readers with a step-by-step coding example to apply the theoretical understanding to practical application.
7 The report’s achievement and non-achievement: This section presents a reflective overview of our progress and challenges while completing the report It aims to provide readers with insights into what has been achieved and what has not been through our process.
8 Further discussion related to this report: We will discuss problems and remarks related to the Bisection method to help everyone gain a deeper understanding of this method.
Preliminaries
Intermediate Value Theorem
Lemma 2.1.1 (Supremum axiom).Any nonempty subsetA⊆Rwhich is bounded above has a supremumL∈R.
Theorem 2.1.2 (Intermediate Value Theorem).Iff∈C[a, b]andkis any number betweenf(a)andf( )b, then there exists a numbercin(a, b)for whichf(c) =k.
Clearly, the setPis non-empty and bounded above, therefore by the Lemma (2.1.1), we conclude that there existsc= supP.
Consequently, there exists a sequence{ }an
∞ n=1inP such thatan→c Sincef is continuous, we havef(an)→f(c)withinP Hence, f(c)≤m (2.1)
Moreover, forn ∈ N ∗ , letbn= c+b−a n ∈ [a, b] Thus, the sequence{ }bn
∞ n=1 converges tocand thereforef(bn)→f c( ) On the other hand, sincebn∈/P, we have f(bn)> m Consequently, f(c)≥m (2.2)
From (2.1) and (2.2), we conclude thatf(c) =mand clearlyc∈ [a, b], which completes the proof.
Rates of Convergence
Since iterative techniques involving sequences are often used, this section concludes with a brief discussion of some terminology used to describe the rate at which convergence occurs In general, we would like the technique to converge as rapidly as possible The following definition is used to compare the convergence rates of sequences.
Definition 2.1.3.Suppose{βn} ∞ n=1 is a sequence known to converge to zero, and { }an
∞ n=1converges to a number If a positive constantα Kexists with
|an−α| ≤K β| n|. for large , then we say thatn { }an
∞ n=1converges toαwith rate, or order, of convergence O(βn) It is indicated by writingan=α+O(βn).
∞ n=1to be compared with an arbitrary sequence{βn} ∞ n=1, in nearly every situation we use βn= 1 n p , for some numberp > 0 We are generally interested in the largest value ofpwith an=α+O(1/n p ).
Tolerance
Definition 2.1.4.In engineering and science, error is a deviation from an expected or computed value Tolerance is the level of error that is acceptable for an engineer- ing application We say that a computer program has converged to a solution when it has found a solution with an error smaller than the tolerance When computing roots numerically, or conducting any other kind of numerical analysis, it is important to establish both a metric for error and a tolerance that is suitable for a given engineer- ing/science application.[ ]3
The solution method for the Bisection method
The Bisection technique is based on the Intermediate Value Theorem.
Supposefis a continuous function defined on the interval[a, b], withf(a)andf( )b of opposite sign The Intermediate Value Theorem implies that a numberpexists in (a, b)withf(p) = 0 Although the procedure will work when there is more than one root in the interval(a, b), we assume for simplicity that the root in this interval is unique.
To begin, seta1ndb1=b, and letp1be the midpoint of[a, b]; that is, p1=a1+b1−a1
• Iff(p1) = 0, thenp=p1, and we are done.
• Iff(p1)= 0, thenf(p1)has the same sign as eitherf(a1)orf(b1).
–Iff(p1)andf(a1)have the same sign,p∈(p1, b1) Seta2=p1andb2=b1.
–Iff(p1)andf(a1)have opposite signs,p∈(a1, p1) Seta2=a1andb2=p1.
Then reapply the process to the interval[a2, b2],[a3, b3], and so on to[aN, bN], in whichNis the maximum iteration we are desired to make to obtain the approximate rootp (Figure (4.1))
Figure 2.1:The illustration of the Bisection method
The Bisection method has the important property that it always converges to a solution, and for that reason it is often used as a starter for the more efficient methods.
Theorem 2.2.1.Suppose thatf∈C[a, b]andf(a)f(b)ã 0then seta=p; (Computeai, bi.)
Step 7 OUTPUT‘Method failed afterN0iterations,N0=,N0;’
Remark 2.3.1.When using a computer to generate approximations, it is good practice to set an upper bound on the number of iterations This eliminates the possibility of entering an infinite loop, a situation that can arise when the sequence diverges (and also when the program is incorrectly coded) This was done in Step 2 of Algorithm where the boundN0was set and the procedure terminated ifi > N0.
Remark 2.3.2.Note that to start the Bisection Algorithm, an interval[a, b]must be found withf(a)ãf b)( 1000 This verifies the statement that
Thus, both the statements given in the problem are true For the first part, asn increases, the functionf(pn)reduces and eventually goes to zero which is certainly less than10 −3 For the second part, the difference betweenpandpnwill be less than10 −3 only whennis more than 1000 as we found out from the calculation.
Remark 2.3.6.Without additional knowledge aboutf orp, inequality (2.6)is the best stopping criterion to apply because it comes closest to testing relative error.
Algorithm 2The Bisection method using stopping criterion (2.6)
INPUT endpointsa, b; tolerance ; maximum number of iterationsN0.
OUTPUT approximate solutionpor message of failure.
OUTPUTp; (Procedure completed successfully.) else:
OUTPUTp; (Procedure completed successfully) STOP. else pass.
Step 6 IfF A F P >ã 0then seta=p; (Computeai, bi.)
Step 7 OUTPUT‘Method failed afterN0iterations,N0=,N0;’
Flowcharts of the Bisection algorithm
To provide a clear understanding of the process involved in the bisection method, we have created two following flowcharts that outline the steps involved in Algorithms ( )1 and ( ) This illustration simplifies the operational flow, making it easier to grasp the2 step-by-step procedure of these algorithms.
Illustrative examples of the algorithms
First, we will consider an example illustrate the Algorithm ( ), which use1 b−a
Example 2.5.1.Show thatf(x) =x 3 + 4x 2 −10 = 0has a root in[1 2], , and use the Bisection method to determine an approximation to the root that is accurate to at least within10 −4
Becausef(1) =−5andf(2) = 14the Intermediate Value Theorem 1.1 ensures that this continuous function has a root in[1 2],
• For the first iteration, the midpoint of[1,2]is p1= 1.5.
2 = 0.5≥10 −4 and f(1).f(1.5) =−11 87500