CHAPTER 04.06: GAUSSIAN ELIMINATION: Round-off Error Issues: Example: Part 2 of 3
So we need to now be able to do the second step of forward elimination, so before I do that, now, what will happen at the second step of forward elimination is that I look at the second . . . I start from the second row, second column now, and I look at all the elements in the second column below . . . the second row and below, so I get 0.001, -2.75, so what that means, I have to take the absolute value of 0.001 and the absolute value of -2.75, see which one is greater, and based on that, I have to do the switch. So what that means is that . . . so if I start my second step of forward elimination, I've got to take 0.001, absolute value of that, and -2.75, the absolute value of that, and that turns out to be the maximum is 2.75. So what that means is I am at the second step of forward elimination . . . I am at the second step of forward elimination, and it so happens that the third column . . . third row, second column has the maximum element. So what that means is that I have to switch rows two and three. So I have to switch rows two and three. So what that means is that, if I'm going to write down this in the matrix form, I get 20, 15, 10. So I'm switching rows one, two, and three, that does not make any changes to the solution vector, as some people may believe. So you get 0, -2.75, 0.5, so this is where the switching is taking place, 0, -0.001, 8.5, the next one is 45, this one is -2.25, and this one is 8.501. So that's how the switching of the rows is taking place, because we have moved the maximum absolute element which we had to . . . to the pivot location there. So now we're going to use this row and this element here to make this to be 0 in my . . . in my second step of forward elimination, so but before I conduct any elimination, I have to see whether I need to switch any rows. So let's go ahead and do that and see that what do we get from there. So it's very important that you realize that all the calculations which I am showing to you, that they're all done with five significant digits with chopping.
Until now, we didn't have to worry about whether we are using five significant digits with chopping, because all the numbers which we got were with less than or equal to five significant digits, because of the multiplication and the . . . and the multipliers we had, but that won't be the case now, because what I need to do is, in order to make the element to be 0, I'll have to divide by -2.75 and multiply by 0.001. So my multiplier is going to be 0.001, divided by . . . divided by 2.75, that's going to be my multiplier, and this multiplier here . . . is it minus? Yes, minus, -2.75, so that will be the multiplier. So the multiplier is turning out to be -0.00036363. Remember, I'm taking five significant digits with chopping, so that's the number which I am going to write down, I'm not going to write down anything more than that or less than that. And I need to take the last equation, which is 0 . . . so the second equation is 0, -2.75, 0.5, and the right-hand side is what? -2.25, and I've got to multiply by this number right here. And this is what I get, I get 0, 0.00099998, and here I get -0.00018182, and the last number, which is the right-hand side number, is 0.00081816. So remember all these calculations are being done with five significant digits with chopping, so that's what you're going to get. Now you're going to take this result which you got and subtract it from the third row. The third row is 0, 0.001, 8.5, 8.501, and we're going to subtract this right here. So we're going to have 0, 0.00099998, then -0.00018182, and then 0.0008186. Seems to be a lot of numbers we are writing down here, but we have to follow the protocol of five significant digits with chopping, so we have no recourse for that. So if we subtract this, you get 0, and then you get 0 here. Now somebody might say, hey, this is not 0, but algorithmically I have to put 0 there, because that . . . that is supposed to be 0, so even if I put the number which I am actually going to get, within the five significant digits with chopping, it will be treated as 0 when I apply my back substitution algorithm, so no need to figure that one out, and in fact it's not even figured out in the algorithm itself, because it's assumed to be 0, no need to waste time . . . computational time to do that. Now here, when I do this I get 8.50018182, and this last one here, the right-hand side is 8.5018184 . . . 8.5001, so let me write this down again here, I get 8.50018184. And but we know that we can only take five significant digits with chopping, so I can only take these five digits, and I can take only these five digits here, so this number here becomes 8.5001, and this number here becomes 8.5001. So, again, all the calculations have to be done with five significant digits with chopping, so that's what I get there. So if I look at what do I get at the end of the second step of forward elimination, this is what I get, I get x1, x2, x3 here. So if I look at that, I get 20, 15, 10, 0, -2.75, 0.5, that stays the same, and then 0, 0, 8.5001, then 45, -2.25, and 8.5001. So that's what I get at the end of the second step of forward elimination, so second step of forward elimination end. At the end of the forward elimination, second step of forward elimination, that's what I get, but since I have three equations, three unknowns, I'll have only two steps of forward elimination, that's the end of the . . . all the forward elimination steps, now I need to conduct back substitution steps. So that's the end of this segment. |