 Hi, in the last lecture we had an overview of what we are going to do in the current chapter on non-linear equations. In today's class we will introduce our first method for approximating an isolated root of a non-linear equation. The method is called the bisection method and this method is a bracketing method. Let us explain the bisection method. Suppose we have a function f of x and we are interested in finding an isolated root of the function f of x equal to 0. Suppose the graph of the function f is given like this, then we are interested in capturing the root or for the equation f of x equal to 0. We have to first locate this root in an interval say a naught to b naught. How we can do? Well, you have to see if f of a naught is less than 0 and f of b naught is greater than 0. Recall that we always assume the function f to be a c 1 function in particular it is also a continuous function. Therefore, if you have f of a less than 0 and f of b greater than 0, then by intermediate value theorem you can say that there exist a point say r such that f of r is equal to 0. That is the idea. In fact, you can also equivalently look for a naught and b naught such that f of a naught is greater than 0 and f of b naught is less than 0. Many of these two conditions is enough for us to say that there exist a point r in the interval a naught b naught such that f of r equal to 0. These two conditions in fact, can be checked equivalently by looking for an a naught and b naught such that f of a naught into f of b naught is less than 0. Therefore, we will impose two conditions on f and its domain a naught b naught that is f is a continuous function defined on the interval a naught b naught such that f of a naught into f of b naught is less than 0. So, this is the main disadvantage of the bisection method as we discussed in the last class that you have to give this interval a naught b naught as an input to the method. How will you find this a naught b naught? Well there is no general way or general algorithm to find this a naught and b naught. One has to do it by trial and error either manually or even if you want to do it on a computer it has to be done with some trial and error only. That is the main disadvantage of any bracketing method. By bracketing method we mean to say that you have to locate a root in an interval and that interval has to be given as an input to your method. Therefore, bisection method is a bracketing method. Now, once you give a naught b naught as an input and also the function f as an input then the iterative procedure has to be now set up how are we going to set up let us see. So, we have already located the root or in the interval a naught b naught. Now what we have to do is we have to find x 1 which is the first term of our iterative sequence. How will you find x 1? x 1 is taken as the midpoint of the interval a naught and b naught and that is given by x 1 is equal to a naught plus b naught by 2. And now once you have this then you take the value f of x 1 and then see in which part of these two intervals does the sign change happens either it is happening between a naught to x 1 or x 1 to b naught that is the next step. So, in that way you may have one of the following situations that is your f of x 1 itself may be 0 in which case x 1 itself is a root of your equation and your job is done therefore, you can stop your iteration. Suppose it did not happen that is f of x 1 is not equal to 0 then you look for whether f of a naught into f of x 1 is less than 0 or f of b naught into f of x 1 is less than 0. If this happens then you take a naught to x 1 as the your new interval if not then you take the other piece as the new interval. Let us see how it works you initially have a naught and b naught suppose this is the graph of your equation and the function f of x is given like this and we are interested in capturing the root R which is lying in the interval a naught and b naught right. In the first iteration you will take x 1 as the midpoint of a naught and b naught and you will check the sign change of the function in the interval a naught to x 1 that is this condition you will check if that is satisfied then you will take the first condition and declare a naught comma x 1 as the interval for your second iteration. Otherwise you will check for whether the sign change happens in the second part of the interval that is from x 1 to b naught that is you will check this condition if that happens then you will take the second interval as the interval for your next iteration. You can note that either this or this only will happen you will never get a situation where both happens or you will never get a situation where none of these two happens you can think why it is like that I leave it to you to do that once you have the interval say in this particular example your interval for the next iteration will be a 1 which is equal to x 1 and b 1 which is equal to b naught right. For the next iteration again you will go to find the midpoint of a 1 b 1 and call it as x 2 that is what in general we are writing like this for any n you already got a n and b n. Now for the next iteration you will find x n plus 1 as the midpoint of x 1 plus the interval a n and b n and once you do that you will see where the sign change happens that is now you have broken the interval into two parts right one is a n to x n plus 1 and another one is x n plus 1 to b n right. Now you will check where the sign change happens and once you find that interval in which sign change happens you will discard the other interval and take only that interval which has the sign change right and then you will go for the next iteration where you will find the midpoint of the interval that is obtained in the previous iteration and then again you will see the sign change in this example the sign change is again not happening in this interval right the sign change is happening in this second part of the interval. Therefore, a 2 is taken as x 2 and b 2 is taken as b 1. Now again you will go to find the midpoint of the interval a 2 to b 2 and suppose that happens to be this one that is called as x 3 and now you will again find the sign change this time sign change happens in the first part of the interval. Therefore, a 3 is taken as a 2 and b 3 is taken as x 3 and you discard this part of the interval and you have the only this interval in your next iteration and the iteration goes on like this. Now the next step is to check whether you have to stop the iteration at any nth iteration or not you can clearly see that at every iteration the length of the interval is reducing right. Therefore, there is a very natural criteria for us to stop the iteration what you do is you check the length of the interval. If the length of the interval is less than some pre assigned positive quantity which is called the tolerance parameter that is you take some epsilon say 10 to the power of minus 2 or minus 3 or whatever it is. And then check for the length of the interval once you finish the iteration at the nth stage then you have the interval a n b n you look for this number. If this number is less than epsilon then surely the difference between x n plus 1 which is the midpoint of the interval a n and b n minus the root r that will be surely less than epsilon. Therefore, you can always check for this condition that is a good and natural stopping criteria in the bisection method this is because in bisection method the length of the interval at every iteration is reducing that is why we can impose this condition as the stopping criteria. Therefore, if b n plus 1 minus a n plus 1 is sufficiently small then take the midpoint of the interval a n plus 1 and b n plus 1 and declare that as the required approximate root. So, that is the stopping criteria that we are imposing. If that is not happening again go to the step 1 and continue this process till either f of x n plus 1 becomes 0 remember on a computer this may not happen at all. Therefore, you may have to stop your iteration only with this stopping criteria. Now, assuming that at every iteration x n is not coinciding exactly with a root at least as a computation on a computer this may not happen because of the rounding errors. In that way generally we will land up generating a sequence of real numbers. Now, the question is will this sequence converge to a root of the non-linear equation f of x equal to 0 that is the question. So, to answer this question we have to go for the convergence analysis on the sequence generated by the bisection method. Let us state this result in the form of a theorem. Let f be a continuous function defined on an interval a naught and b naught where a naught and b naught are chosen in such a way that f of a naught and f of b naught have opposite signs. We now know why we are imposing this condition because by this we can ensure that there is at least one root in between the points a naught and b naught because f is a continuous function. The conclusion is that there exists a r in the interval a naught b naught such that f of r equal to 0 and this is direct consequence of the intermediate value theorem because f is continuous and f of a and f of b are of opposite sign. Therefore, this is directly proved from the intermediate value theorem and further the iterative sequence of the bisection method will always converge to r. This is what in the previous lecture we told that the bracketed methods once you obtain a interval a naught b naught then the sequence generated by this bracketing method will always converge. So, that is what we listed as an advantage of bracketing methods. Here you can see that the sequence x n will always converge that is what the conclusion says and in fact, you also have an error estimate here. You can see that mod x n plus 1 minus r is less than or equal to 1 by 2 to the power of n plus 1 times b naught minus a naught and this will happen for each n equal to 0, 1, 2 and so on. Now, how to prove this theorem? Well, you can clearly see that once you prove this estimate then the convergence comes very easily why because by taking n tends to infinity you can see that 1 by 2 to the power of n goes to 0 and this is a fixed number. Therefore, the right hand side goes to 0 as n tends to infinity and that shows that of course, by the sandwich theorem that the left hand side will also goes to 0 as n tends to infinity. Therefore, we have to only prove this inequality and that will in fact, prove the first part of the theorem. Let us see how to prove this inequality it is not very difficult you just take the length of the interval a n comma b n. You can see that at every iteration you have a n b n and you are bisecting this interval that is you are defining x n plus 1 as the midpoint of the interval a n comma b n and that is how you are obtaining the next interval that is you are either choosing this as your next interval or you are choosing this interval as the interval for your next iteration. Therefore, the length a n comma b n similarly would have come from your previous iteration a n minus 1 comma b n minus 1 by cutting that interval into half that is how you would have got your x n and depending on where the sign change happens you would have picked one piece of the interval a n minus 1 comma b n minus 1 and named it as a n comma b n. Therefore, b n minus a n should be half of b n minus 1 minus a n minus 1 that is this interval length will be half of the length of this interval. Similarly, the length of this interval will be half of the length of this interval and it goes like that that is why we are writing b n minus a n equal to half of b n minus 1 minus a n minus 1 and that will be actually half of this is nothing but half of b n minus 2 minus a n minus 2 that is nothing but 1 by 2 square b n minus 2 minus a n minus 2 and that again you can apply this idea to get 1 by 2 cube into b n minus 3 minus a n minus 3 and you can keep on going like this. This kind of idea is always used in our discussions where you once find a expression and then you can recursively apply that expression and once you do that where will you reach? You will reach at b naught minus a naught and that will have 1 by 2 to the power of n. So, that is the idea let us see how it goes. Now take the limit on both sides you can see that limit n tends to infinity b n minus a n is nothing but limit n tends to infinity 1 by 2 to the power of n into b naught minus a naught as I told this expression goes to 0 as n tends to infinity. So, therefore, limit n tends to infinity b n minus a n is equal to 0 that implies that limit n tends to infinity a n is equal to limit n tends to infinity b n. Remember we have always chosen x n plus 1 as the midpoint of the interval a n to b n right. This is how we have chosen x n plus 1 and now you see that the left hand side goes to some limit say r and then as n tends to infinity. Similarly, the right hand side limit also goes to r as n tends to infinity. Why they go to the same limit because of this fact right. Now you apply the sandwich theorem and we get that the limit n tends to infinity a n is equal to limit n tends to infinity b n. This we have already shown and now this part comes from the sandwich theorem which says that limit n tends to infinity x n will also exist and that will be equal to the limit to which these two sequences are converging that is r. Now what we have to prove that this r is the root of the equation that is what we have to prove. Recall that f is a continuous function this is one of the hypothesis that we have taken in our theorem and also at every iteration we are checking this condition right. Therefore, for every n f of a n into f of b n is less than 0 this is how we have built the algorithm. This is coming from our basic assumption and this is coming from the way we have built the algorithm. Therefore, as you take the limit you can see that f of a n will converge to f of r why because f is a continuous function similarly f of b n will also converge to f of r as n tends to infinity right. If the product f of a n into f of b n is less than 0 then the product f of r into f of r will also be less than or equal to 0 right that is what we are writing here. Now what is this? This is nothing but f of r the whole square is less than or equal to 0. Remember f is a real valued function therefore, f of r is a real number and its square should always be non negative right. So, that shows that f of r should be 0. So, what we proved is that the limit to which x n converges which we named as r is a root of the equation f of x equal to 0 that is what we have proved right. Now what all we have obtained? We obtained an interval a n b n at every iteration and we made sure that at least one root of our equation lies in the interval and once you get a n b n then you go to find the midpoint of that interval and that is taken as the iteration term of the sequence at the n plus 1th stage right. So, this is how the iteration went therefore, at every stage a n b n you see you have at least one root lying in this and then you went to find the midpoint of this interval x n plus 1 right. Therefore, the distance between x n and r that is x n plus 1 minus r is surely less than or equal to half of f of r. So, this is the length of this intervals length right because half of the intervals length is this and you always make sure that r lies in a n and b n therefore, r is somewhere in this interval either it may be this side or that side wherever it is once you bisect a n b n then the distance between that point that is the midpoint and the root r will be less than half times the length of the interval a n b n right. So, that is what I am writing here the distance between x n plus 1 minus r is less than or equal to 1 by 2 into b n minus a n. Now, once you have this now you go on applying this recursively just like what we did in the previous slide and you can obtain that x n plus 1 minus r is less than or equal to 1 by 2 to the power of n plus 1 into b naught minus a naught. This is precisely what we wanted to prove as the error estimate for our bisection method sequence right. So, here and this is proved now and that completes the proof of this theorem right. In fact, there is another result very interesting result which says that we can obtain n the number of iterations that are needed for us to compute in order to get our approximation close to the root up to the required accuracy. That n can be obtained from this error estimate itself. This is a very interesting result and we will discuss this result in the next class. Thank you for your attention.