 Hi, this is our first tutorial session. In this session we will try to solve some important problems given in our notes especially from the mathematical preliminaries and also from the chapter on arithmetic errors. Let us see how to solve this problem. Here we are given that a sequence A n is going to satisfy some condition. What is that condition? Mod A n minus L is less than or equal to some constant mu times A n minus 1 minus L and this happens for sufficiently large n that is what the assumption says. Not first few terms, but after certain term say for some positive integer capital N all the terms A n's for n greater than equal to the capital N we have this condition. And further the question also says that the constant mu is something lies between 0 and 1 that is very important. Now we are asked to prove that the sequence A n converges to L as n tends to infinity that is what the question is. Well let us see how to prove this result. To prove this result first we have to obtain this inequality. Let us see how to obtain this inequality it is not very difficult. It goes with an idea which is quite often used in our course therefore it is important for us to understand and keep this in mind. The idea goes like this see we are given this inequality. Now the same inequality can also be applied to the right hand side. For that let us take n sufficiently large then you can apply the same inequality for A n minus 1 minus L that will be less than or equal to mu times A n minus 2 minus L. In this you have to also make sure that n minus 1 is also greater than or equal to n that is why we have taken n very large when compared to capital N. And now once you have this you can see that A n minus L is less than or equal to mu times mu into A n minus 2 minus L and that can be written as mu square into A n minus 2 minus L. Remember I am putting equal to sign here because this term that is the right hand side term is equal to this term. It does not mean the left hand side is equal to this often students get confused whether this is equal to this. No this is still less than or equal to this we are writing only because the right hand side is equal to the second step of the right hand side. And now what you can do is you can again apply the same inequality for now A n minus 2 minus L and that will give us less than or equal to mu cube mod A n minus 3 minus L like that now you can keep on going up to what term we can go well we are given permission to use this inequality only up to n is equal to capital N. Therefore we can go only up to A n minus L here. So, when you go up to A n minus L your mu will have n minus capital N on the power. Therefore this will be less than or equal to this that is how we landed up with this inequality. Once you establish this inequality the conclusion comes almost trivially because mu is less than 1. Now you take n tending to infinity and see what happens when you take n tending to infinity n tends to infinity you can see that n minus capital N will also tend to infinity and that implies mu to the power of n minus n tends to 0 why since 0 less than mu less than 1 because of that we have this property. Now you can see that this term is going to 0 and this term is a finite quantity and therefore the entire term will go to 0 on the left hand side you can see that we have taken modulus for this. Therefore this is surely greater than or equal to 0 now if you recall in the sandwich theorem if you have two sequences A n and C n and you know that A n is less than or equal to B n is less than or equal to C n and if this goes to say 0 and this also goes to 0 as n tends to infinity then this will also go to 0. In the sandwich theorem we have stated it with any limit here we are using it for that limit as 0 and you see by using sandwich theorem therefore you can see that this term also goes to 0 as n tends to infinity that is equivalent to saying that A n tends to L. Now let us go on to the next problem. The next problem is a discrete version of the second mean value theorem for integration. The problem says that you have a function F which is continuous on the interval AB and you are also given some n points taken from the interval A to B and also you are given some values G 1, G 2 up to G n they are given to be real numbers and more importantly they are of one sign. It means either everybody is positive or all these G's are negative there is no sign change among these G's that is what it means then we have to show that sigma i equal to 1 to n F of x i G i is equal to F of xi into sum over i equal to 1 to n G i where the xi is some number lying between A and B that is the problem. How to prove this? This is a very simple application of the intermediate value theorem. What you do is just take the minimum over all the values of F at the points x i call it as F x suffix star and similarly take the maximum of all these numbers call this as F x super star. Now what are we going to do with that? Well we have the left hand side i equal to 1 to n F of xi G i. Now if you replace all these terms by the minimum then you will have this is less than or equal to F of x star it will come out of the sum because now it is independent of i into sigma i equal to 1 to n G i. Similarly if you replace all these by the maximum then it will be less than or equal to F x super star and since this is independent of i this term will come out of each term and you will have sigma i equal to 1 to n G i that is very simple to understand. So, therefore, we have this remember for this we have used the fact that G is of one sign and we assume that G is greater than 0 otherwise if all G's are less than 0 you will have a reverse inequality that is all. Otherwise the idea of the proof goes exactly same as in the case of G i is to be greater than 0. So, here itself we have to assume that G i's are greater than 0 and then we get this inequality. Now what we will do is we will take these terms and define a function G of x is equal to instead of x subscript star and F superscript star we will take it as F of x into sum i equal to 1 to n G i. You can see that G is a continuous function why because F is given to be a continuous function and this is something which is a fixed number positive number as per our assumption right. Therefore, G of x is constant times a continuous function therefore G itself is a continuous function. Now if you recall you have a continuous function G and you have G of say a and G of v then given any number between these two numbers say n you can find a xi such that G of xi is equal to n that is what the intermediate value theorem says right. So, we will just use this now to get a xi such that now you see you take this as your n G of xi is equal to this i equal to 1 to n F of xi G i right. So, that is what precisely we wanted to show that this term can be written as F of xi into sigma i equal to 1 to n F of xi is equal to 1 to n G i right. So, that is what we wanted to show here and that comes directly once if you write this inequality it comes directly from the intermediate value theorem. Similarly, if G i is less than 0 then as I told the inequality will reverse that is all the same idea for conclusion will go through even in this case also. Let us go to the next problem again this property is often used in our course especially if you go through the proof of Taylor's theorem and also the theorem for polynomial interpolations we will use this idea. What this problem says you have a continuously differentiable function G and we know that the equation G of x equal to 0 ok. This is a equation it has at least n real roots then the equation G dash of x equal to 0 will have at least n minus 1 real roots. This idea is used as I told in the proof of Taylor's theorem as well as in the proof of the error analysis of the polynomial interpolations. What is the idea behind this well you know that the equation G of x say it has n roots say for instance these are the roots of the equation G of x equal to 0. Let us say this is the graph of the function y equal to G of x and you have x 1, x 2, x 3 and x 4 are the roots of this equation then you have to show that G dash has at least n minus 1 say for instance if this equation that is G of x equal to 0 has 4 roots then G dash of x equal to 0 should have 3 roots. How will you get well you use the Rolls theorem. Rolls theorem says that in between these two points you have a point xi such that let us call it as xi 1 such that G dash of xi 1 equal to 0. Similarly here also you can apply the Rolls theorem between x 2 and x 3 and you will get say xi 2 such that G dash of xi 2 equal to 0 and similarly here also you have xi 3 and G dash of xi 3 equal to 0. So, that is the idea it is just a direct application of the Rolls theorem. I hope you can write the solution for this problem now. Well now let us pass on to the discussion on the order of convergence if you recall we have introduced two notations one is big O and small O. When will you say that a sequence a n is big O of b n if you recall you should be able to find a constant c and a n such that you mod a n is less than or equal to c times mod b n for all sufficiently large n's right. So that is what we have to show in order to show that a n is big O of b n. Here a n is n plus 1 divided by n square and b n is 1 by n. One way is to directly take this term n plus 1 by n square divided by 1 by n and see that this is bounded as n tends to infinity this should be a bounded quantity. This is obviously equal to 1 plus 1 by n and that tends to 1 as n tends to infinity right. Therefore, this is correct that this sequence is a big O of 1 by n. You can also directly use the definition in that case you have to write n plus 1 divided by n that can be written as sorry this is n square and that is written as 1 by n plus 1 by n square which is equal to 1 by n into 1 plus 1 by n right and that can be written as less than or equal to 1 by n I will just replace this by 1. I just want a constant here right that is the idea and b n is nothing but 1 by n. Therefore, I am having already b n here right 1 by n here this I have to somehow freeze this n and make it a constant for that I am dominating 1 by n by just 1 you can dominate it by 2, 3 and so on anything any finite number but I am just dominating it by 1 and that gives me 2 times 1 by n. Therefore, in this case my c is just 2 and that shows also from the definition that this sequence is a big O of 1 by n. Let us take the other problem here we have a n is equal to 1 by log n and you want to show that this is small O of 1 by n. Therefore, b n is this if you recall we have to here show that for every given epsilon greater than 0 we have to find a n such that mod a n is less than or equal to epsilon times b n for sufficiently large n right that is what we have to show. Now, one way to see is to directly compute the limit and see this log n into 1 by n which is equal to n by log n right that goes to infinity as n tends to infinity. Therefore, this is actually a n is not a small O of 1 by n. Now, if you want to see it through this definition how will you see well we can see by contradiction assume that 1 by log n is less than or equal to epsilon into 1 by n for some sufficiently large n and for some epsilon or rather we should write for every epsilon because for every given epsilon this should happen right. So, for every given epsilon I will find a n such that this happen that is what I am assuming and I will show that it leads to a contradiction. How it leads to a contradiction this implies n is less than or equal to epsilon times log n right and that implies n by n by n log n is less than or equal to epsilon well I can directly write it from here for all n greater than or equal to capital N right. You can see that the right hand side is tending to infinity as n tends to infinity this should hold for all n sufficiently large right. So, that cannot happen because this side is going to infinity whereas, this is some very small number if I take then this cannot happen right. So, that is a contradiction. Let us now solve some problems in the chapter on arithmetic errors here let us take this problem. The problem says that we have a computing device that uses n digit rounding binary floating point arithmetic show that 2 to the power of minus n is the machine epsilon. Let us recall what is mean by machine epsilon machine epsilon means it is a very small number which we denote by delta such that you take that delta add it with 1 and then take the floating point approximation whatever the floating point approximation that you want to take well in this problem it is the n digit rounding is the floating point approximation ok. Then that delta will actually give some number which is greater than 1. However, if you take any number less than delta whatever may be the number it is if you take any number less than that delta then the floating point approximation in our problem again it is n digit rounding should actually give 1 it should not give anything greater than 1. Only for delta it will give that is the last number for which it will recognize it as a non-zero number anything less than that the computing device will recognize it as 0 only that is what is called the machine epsilon. Now, let us see how to solve this problem well if you see how to represent this number in the binary form we can write it as 0.000 0 up to n terms and n plus first term is going to have 1 and then 0 into 2 to the power of 1 ok. So, if you recall it is floating point approximation is 0.1 if you write and then into 2 to the power of E. So, whatever may be the E that comes here you have to write but I am just writing it in the direct form and then you can see that the 1 is sitting at the n plus first position right. Now, any delta that you take which is less than 2 to the power of minus n will have 0 in first n plus first position even in this position it will have 0 and then it will have 1 somewhere else right that is how delta which is less than 2 to the power of n will look like ok. Therefore, if I add 1 plus that delta what I will have well 1 can be written as 0.1 into 2 to the power of 1 right and that delta will have first many terms 0 at least n plus 1 terms are 0 and then you will have 1 somewhere after n plus 1 term. Now, if you see this will be equal to 0.1 then 0 0 many 0s at least at least n plus 1 terms right that is what we know because 2 to the power of minus n has 1 at the n plus first term. Therefore, any delta will have 0 at the n plus first term at least and have 1 somewhere else into 2 to the power of 1. Now, what I will do is I will take the floating point approximation of this thereby I will do the rounding up to here when I do rounding up to here that all these are 0s right and the non-zero term is actually truncated here and thereby the floating point approximation of 1 plus delta will remain as 1 because I have truncated up to n plus first term and up to that there was no non-zero term in the representation of delta and therefore, you have 1 that shows that 2 to the power of minus n is the machine epsilon for the computing device that uses n digit rounding binary floating point representation. You can also understand from here why the definition of machine epsilon demands that the floating point approximation of 1 plus delta should be equal to 1 right because if you do not have that if you just say that f l of delta should be equal to 0 if you say then the floating point representation of that will actually push that non-zero 1 to the first position and thereby when you do the n digit rounding you will not be losing that non-zero information in the floating point level that is why in order to lose that information you are actually adding 1 to it here and that is how this information is lost otherwise this would have written as 0.1 into 2 to the power of some e right and therefore, this 1 would have come to the first position and when you do the n digit rounding of that you will not be losing this information. So, you are adding 1 to it and checking that is the reason why we have given 1 in the definition of the machine epsilon here this machine epsilon is a very important concept in computation one has to understand this. Let us take the next problem here we have the number x a that is given as 3.14 and y a is given as 2.651 these are given to us as approximate numbers generated from some true numbers x t and y t we do not know what are these true numbers all we know is that we got this approximate numbers by using 4 digit rounding ok. We are not given these information y t and x t are not given to us we are only given that x a is obtained by rounding 4 digits from x t and similarly y a is obtained by doing 4 digit rounding of y t. Now, we want to find the smallest interval that contains this number and the second subdivision is we want to find the smallest interval that contains x t by y t remember we do not know x t and y t right. Therefore, we just have to find an estimate of x t and y t in terms of both the lower bound as well as the upper bound ok. So, how to get the lower bound and upper bound of x t plus y t let us see for that first we have to understand what is the range for x t and what is the range for y t that is what we have to understand. You can see that x t can be any number greater than or equal to 3.1395 you have to tightly find this number that should be the smallest number which when rounded should give you 3.14 you can see that that is the smallest positive possible number that gives you 3.14 when rounded to 4 digits right. 4 digits after writing the floating point approximation right. So, you have to do 4 digit rounding it means 1 2 3 4 this is 5 therefore, it will be rounded to add 1 here and that will make this as 3.14. Similarly, the largest number that can lead to 3.14 is actually 3.1405 because you can see that 3.1404 also gives us when you do 4 digit rounding it gives 3.140 then 4 1 4 2 4 3 4 4 and so on all this is the largest number that can be this numbers when you round to 4 digit rounding it gives you 3.14 therefore, x t should be anything less than this number that is the maximum possible that you can think and once you get this idea now it is very easy to solve this problem you can see y t will lie between 2.6505 and that is less than or equal to on the upper bound you have this is less than 2.6515 right because 2.6514 will also give 6.65141 and then 4 1 4 2 and so on any number will give this number right. Once you have this now it is just a matter of adding this 2 number x t plus y t and that is less than or equal to 5.792 and this is less than or equal to what 5.79 roughly right. So, that is what we get let us go to the next problem next problem is to estimate x t divided by y t again we have 3.1395 less than or equal to x t is less than 3.1405 and similarly y t lies between 2.6505 and this is less than 2.6515 and that implies right that implies 1 by 2.6515 is less than 1 by y t is less than or equal to 1 by y 2.6505 right and just doing the reverse of this inequality and therefore, x t divided by y t will be less than or equal to no this is less than therefore, it is less than 3.1405 divided by 2.6505 and this side it is less than 3.1395 divided by 2.6515 right that is the answer for this problem. Finally, let us solve this problem where again we are not given what is the true value x t we are given the approximate value of x t as 2.5 with an absolute error of utmost 0.01 that is what is given to us. Now, we want to evaluate the function f of x equal to x q actually we want to evaluate it at x t, but unfortunately we have only x a right therefore, we are evaluating it at f of x a right. Now, what is the absolute error involved in f of x a when compared to f of x t is the question. So, we have to estimate f of x t this is what we want to actually find, but we actually found x a because we are only given the approximate value. Now, we want to find an estimate for this what is mean by estimate of anything you either have to find the upper bound that is you have to find some fixed number say k such that this is less than equal to k or it may also be that you have to find a lower bound say small k such that small k is less than equal to this number, but here we will only find the upper bound. What is given to us given condition is x t minus x a is less than or equal to 0.01 right that implies that minus 0.01 is less than or equal to x t minus x a is less than equal to 0.01 right we know x a. So, just substitute that you will have 2.49 is less than equal to x t is less than or equal to 2.51. Therefore, we have an estimate for x t from here as lower bound as well as the upper bound. Now, let us use the mean value theorem that gives us mod f of x t minus f of x t minus f of x a which we want to find can be written as f dash of xi modulus into x t minus x a what is xi, xi lies between x t and x a. Now, what is this this is nothing, but 3 times xi square and this is 0.01. Well, if I have to substitute 0.01 for this I should have less than or equal to right. And again we know that xi lies between x t and x a and we already know that xi lies between these two numbers the maximum that it can take is 2.51. Therefore, we can roughly estimate xi to be less than or equal to 3 into 2.51 square into 0.01 right and that is approximately 0.189003. So, this is an approximate estimate for the error involved in evaluating the function f of x equal to x cube at the point x a when compared to f of x t. So, these are some of the important and interesting problems from our classes covered in week 1. With this we will finish our tutorial session 1. Thanks for your attention.