CHAPTER 04.06: GAUSSIAN ELIMINATION: Naive Gauss Elimination: Round-off Error Issues: Example: Part 1 of 3
In this segment, we're going to talk . . . we're going to take an example to show you the problems of round off errors in Naive Gaussian method. So we're going to take an example and see that, hey, we talked about that one of the pitfalls of Naive Gaussian method is you may get large round off errors. So let's go ahead and see through an example why that is . . . why that is so. So let's suppose somebody gives you a set of equations like this one, and this . . . in this particular example, you need to watch very carefully what I'm trying to do, because we cannot just use our calculator directly to be able to populate through the . . . through the procedure. And what I mean by saying that is that you have to do each individual calculation, and then reduce it to a certain number of significant digits, and I will point that out in a little bit, -3, 2.249, 7 here, 5, 1, 3 here, 1.751 here, and 9 here. So in this particular case, what I . . . what I want to do is I want to use five significant digits, so keep in mind what I'm trying to use is that in all the operations, so the computer in which you are supposed to simulate this particular problem is you are going to use five significant digits, so all the operations of multiplication, addition, division, and subtraction which you are doing are supposed to be done thinking that you have five significant digits, and you are using the concept of chopping in that, that means that the last significant digit is not rounded off, but simply chopped off. So you have five significant digits, the sixth significant digits does make any difference to what the number is, because you are using with chopping. And what we want to be able to do is to be able to show you that, hey, are we getting . . . do we get the possibility of round off error. Now what I'm going to do is I'm going to already tell you right in the beginning that the exact value for this particular problem here is 1, 1, and 1, that's the exact value. And in order to illustrate that we are going to have certain round off problems error here, I'm going to say that, hey, let's go ahead and do this problem with five significant digits with chopping and see whether we get close to the exact value or not. Now, I'm going to . . . I'm going to skip certain parts of this particular problem while going through the forward elimination and back substitution, mainly because we have already done that in a separate segment. So this is what we get by using the . . . so at the end of . . . so we'll have forward elimination, so in this segment we are going to talk about the forward elimination. So we'll have two steps of forward elimination, because we have three equations, three unknowns. So in the first step what I need to do is I need to take the first . . . first column and make everything to be 0, and this is what I get, so that's part of your homework, you're using five significant digits with all the operations, so you get 20, 15, and 10, and at the end of the first step you're supposed to get 0 here and 0 here, and this is what I get, 0.001, 8.5, 0, 23375, I get 45 here, 8.501 here, and 23374 here, that's what I get at the end of the . . . no, that's not right, that's not what I get at the end of the first step of forward elimination, I get 0 here, and then I get -2.75, 0.5, and 2.25 . . . minus, that's what I get at the end of the first step of forward elimination. Keep in again mind that you do need to recognize that you are using five significant digits with chopping in order to be able to generate these numbers. Now I'm going to show you again the second step of forward elimination, I'm going to just show you what I get, so again, this is part of your homework, that you're going to show me that the first step of forward elimination gives you that. The second step of forward elimination will basically mean what? That you're going to take . . . use the second row, second column number to be able to make everything below that particular row in that particular column, which is the second column, to be 0, so keep in mind the second step corresponds to second row, second column being used to make everything below the second row in the second column to be 0, so there is some programmatic sense to it. Here, again, I made a mistake, I should have put x1, x2, x3, equal to whatever I get, which is 45, 8.501, and -2.25. And, again, this is your homework. Now here what we get is we get 0, 0.001, 8.5, then this turns out to be 0, and here I get 23375, x1, x2, x3, is equal to 45, 8.501, and 23374, so this is what we get at the end of the second step of forward elimination, which we expected that we will get now a 0 here, and that will give us an upper triangular matrix for the coefficient matrix. And again, as I said, if you look at any of the numbers which are shown anywhere here, they're all shown up to five significant digits with chopping. In this here you have five significant digits, here only showing two, because it turns out to be that way, here there's only one significant digit, because it turns out that way, but all the calculations of intermediate calculations, addition, subtraction, multiplication, and division, they all have to be done within five significant digits with chopping. This will be much more clear, what I mean by that is when we do the back substitution part of this particular problem, but let's leave it here that this is what we get at the end of forward elimination. And that's the end of this segment.