CHAPTER 01.03: SOURCES OF ERROR : Truncation Error: Definition
In this segment we're going to talk about truncation error. I want to say that we have sources of error in numerical methods. And we're not talking about the errors which are created by writing the wrong program, so far as logic or syntax is concerned, but the errors which are inherent when you are using numerical methods, and one is called the round-off error, and the other one is called the truncation error. So in this segment we're going to talk about, what does it mean when we say that, hey, we are having a truncation error? So let's go ahead and write down the definite of truncation error. Truncation error is defined as the error created by truncating a mathematical procedure. So, truncation error is defined as the error which is created by truncating a mathematical procedure.
Now, some people don't like the word truncating in the definition of truncation error itself, because they say that it doesn't mean much. So I'm going to cross it off there, and I'm going to say, hey, approximating a mathematical procedure. So if you're going to approximate a mathematical procedure, it is going to create some error, and that error is associated with truncation error. Please don't think that truncation error is something which is associated with rounding off numbers. It is, truncation error is related to the error which is created by approximating, not numbers, but a mathematical procedure. Examples of truncation error as follows, so let's look at some examples. In this segment I'm just going to enumerate the examples, and then we will have three more segments, which will show each individual example with some numbers. One of the examples is, let's suppose you are using Maclaurin series. The Maclaurin series for e to the power x is 1 plus x plus x squared by factorial 2 plus x cubed by factorial 3, and plus so on and so forth. So you have infinite number of terms in this particular series for e to the power x. So if you want to calculate e to the power x at some value of x, let's suppose. And let's suppose if somebody says, hey, calculate e to the power 0.5, so I would say 1 plus 0.5 plus 0.5 squared divided by 2 factorial plus 0.5 cubed, factorial 3, and so on and so forth. Now you can realize that since there are infinite terms in this Maclaurin series to calculate e to the power 0.5, I don't have the privilege or the luxury to use all the terms, all the infinite number of terms which I have in that particular series. If somebody were to say, hey, I'm going to use only the first three terms of the series to calculate my value of e to the power 0.5. So what's happening is that you are not accounting for these other infinite terms after the fourth term, you're not accounting for those terms at all in your calculation e to the power 0.5, and whatever is leftover is your truncation error. Because what you did was, the original mathematical procedure required you to use infinite number of terms, but you are using only three terms, so whatever is leftover is truncation error, because you have basically truncated a procedure, a mathematical procedure requiring you to use infinite number of terms, and you're using only a few terms out of that . . . out of that series there. Now what happens is that, in the past, I used to give only this as an example of truncation error, and many students would think that truncation error is something which is only related to series. But there are other examples where you will see how a mathematical procedure gets truncated. So let's look at that.
If you remember your differential calculus class, you already know that the derivative of a function is defined as this, that you're going to take the rise over run of a secant line of a function, divided by delta x. So if I write it down graphically, what that means is that if you want to find the value of the derivative here, let's suppose, you might choose delta x to be here, so x plus delta x, the distance between the two points is delta x, and what you're going to do is, you're going to do the rise over run business here. So this will be f of x plus delta x, minus f of x, and that will be the run. But the exact mathematical procedure requires you to use delta x approaching 0. But, as we know that if I take delta x approaching 0, I can always choose a smaller and smaller delta x, and I would never be done, because I would have to choose delta x approaching 0, if I was going to use it as a numerical scheme. So the only thing which I can do, the second best thing which I can do is I can approximate by using a delta x which is a finite number to be able to calculate my derivative of the function. So what that means is that we have truncated a mathematical procedure, because the original mathematical procedure is requiring me to use delta x approaching 0. So the original mathematical procedure is requiring me to use delta x approaching 0, but here, when I look at this formula here, I'm choosing delta x to be a finite number. So that's another example of truncation of a mathematical procedure. Yet another example of a mathematical procedure can be if you are trying to integrate a function from a to b, f of x dx, let's suppose. In that case, let's suppose somebody gives you a function f of x, like this, says this is a, this is b, go ahead and find the area under the curve. I might go ahead and start like this, I'm might say, hey, I'm going to draw a rectangle like this one, then I'm going to draw a rectangle like this one, then I'm going to draw a rectangle like this one, and then I'm going to draw another rectangle like this one. And what I want to do is I want to find the area under this rectangle, this rectangle, this rectangle here, and this rectangle here. But by just looking at this particular figure here, you know that these rectangles, these four rectangles which I drew from point a to point b are not going to exactly represent the area of the curve from a to b. What I'll have to do is I'll have to draw infinite such . . . infinite such rectangles to be able to find out what the value of the integral is, and that's the same as saying the left-hand Riemann sum from your integral calculus class. So I will have to draw infinite number of rectangles going from point a to point b, but again, I don't have the luxury of doing that in numerical methods, because I can only choose a finite number of rectangles. So you have infinite rectangles which you will have to choose to get the exact value, but you're going to choose a finite number of rectangles to calculate the numerical value. So that's where your truncation is coming from. You need infinite rectangles for the exact value, but you're going to choose only a finite number of rectangles to calculate the approximate value. That's another example of a truncation error. And that's the end of this segment. |