CHAPTER 07.05: GAUSS QUADRATURE RULE: 1-pt Gaussian Quadrature Rule: Derivation
In this segment, we're going to talk about the one-point Gauss quadrature rule. The nice thing about talking about the one-point Gauss quadrature rule is that you can derive the formulas in a very simple fashion, because in other cases when we are doing two-point Gauss quadrature rule, or other point Gauss quadrature rules, you will have to solver certain nonlinear equations to be able to find out what the arguments and the coefficients are. So the one-point Gauss quadrature rule for any integral going from a to b, f of x dx is approximated by c1 times f of x1, okay? So what that means is that you have two choices, you have the choice of choosing c1, you have the choice of choosing x1, and of course, your x1 has to be between a and b, those are the limitations, of course. So you want to be able to figure out how we can find out what c1 and x1 are for the one-point Gauss quadrature rule. So since we have two choices, we're going to say, okay, for a function which is a straight line, a0, plus a1 x, I will assume that whatever I'm going to get from my exact integration, from my integral calculus course, and what I'm going to get from this formula will be exactly the same. So that's how I will be able to find out what c1 and x1 should be. So if I take the exact value of the integral of a0, plus a1 x, dx, so this is where I'm using my integral calculus knowledge, I will get a0 times x, plus a1 times x squared by 2, from a to b, a0 times b minus a, plus a1 times b squared minus a squared by 2. So that's what I get as my exact value of the integral. Now, what do I get for from the formula which I want to use is c1 times f of x1 to approximate any integral which can be integrated from a to b, but I want this formula to be exact for the straight line . . . for the straight line. So that'll give c1 times a0, plus a1 times x1, that's what I'm going to get. So I'm going to separate out the a0 part, so a0 times c1 here, plus a1 times c1 x1 part here, that's what I'm going to get there. So since a0 and a1 which I assumed for the straight line are arbitrary numbers, that means that the coefficient of a0, which is c1, has to be same as the coefficient here, which is b minus a. The coefficient which I have here, which is c1 times x1, has to be same as the coefficient of a1, which is b squared minus a squared by 2. So those have to be the same, because if those are not the same, then I cannot choose a0 and a1 to be arbitrary constants. So those give me two equations, and one of those two equations which it gives me, it gives me c1 is equal to b minus a, and c2 is equal to b squared minus a squared by 2 . . . sorry, c1 x1, c1 x1 is equal to b squared minus a squared by 2. So c1 is already calculated, b minus a, c1 times x1 is calculated as b squared minus a squared by 2. So I can substitute the value of c1 here, which is this, and I know that b squared minus a squared by 2 is nothing but b minus a, times b plus a, divided by 2, that's from the formula which you have learned in your college algebra. So that gives me x1 is equal to b plus a, divided by 2. So the one-point Gauss quadrature rule formula, we can go through the whole derivation without any pain, turns out to be approximately equal to c1 times the value of the function at x1, and c1 is b minus a, and the value of the function which has to be calculated, it has to be calculated at a plus b, divided by 2. So that's what the one-point Gaussian quadrature rule turns out to be, that it is the width of the interval, times the value of the function at the midpoint between a and b. If we take an example for this to see that what we get for the one-point Gauss quadrature rule, so let's suppose somebody tells us to go ahead and integrate this function, 0.1 to 1.3, 5 x e to the power -2 x, dx, so this is my function, f of x. So what that means is that it is equal to b minus a, divided by 2, which is 1.3 minus 0.1, it's just b minus a, times the value of the function calculated at a plus b, divided by 2, which is 1.3 plus 0.1, divided by 2. So that gives me 1.2 times the value of the function at 0.7. So what that means is that, this should be approximate right here, because we are using the one-point Gauss quadrature rule, so it'll be 1.2 times the value of the function at 0.7, which is 5 times 0.7 times e to the power -2 times 0.7, and the value which I get here is 1.0357, that's what I get as the approximate value of the integral there, by using the one-point Gauss quadrature rule. So the question which I'm going to ask you which you can do at home, is the one-point Gauss quad rule, quadrature rule, because what you are finding out is that the way we derived the one-point Gauss quadrature rule was by using a straight line to get the coefficients out, so is the one-point Gauss quadrature rule same as the trapezoidal rule? Are they the same? Do they give you the same numbers for any kind of integral? So that's something which I would like you to see. And also, one of the things which you've got to appreciate between one-point Gauss quadrature rule and trapezoidal rule is that the one-point rule looks like this, while as the trapezoidal rule, which also gives you the exact value for a straight line, looks like this. So to get the same kind of accuracy, this will give you the exact value for a straight line, this one will give you the exact value for an integral of a straight line, also, but what is the difference between the two? The difference between the two is that you have to calculate the value of the function at two different arguments, that's where most of the computational time is spent whenever you do integration, and here you have to do it in only one place. So this one is your one-point Gauss quadrature rule, and this formula here is your trapezoidal rule. Both of them give you exact results for a straight line, for the integral of a straight line, but here you are only calculating the argument of the function at one point, here you're calculating the value of the argument at two points, and this is a very good example of showing that why Gauss quadrature rule is more popular than trapezoidal rule, because for half the computational time, almost, you are getting the same accuracy as the trapezoidal rule by using the one-point Gauss quadrature rule. And that's the end of this segment. |