CHAPTER 07.05: GAUSS QUADRATURE RULE: n-pt Gaussian Quadrature Rule: Discussion
In this segment we're going to talk about n-point Gauss quadrature rule. What we mean by n-point Gauss quadrature rule is that now we're going to have rather than 2 points, we're going to have n points. Now we already know that if we have an integral going from a to b, f of x dx, if we approximate it by c1 times f of x1 plus c2 times f of x2, that's the 2-point Gauss quadrature rule. In this case we've got c1 equal to b minus a divided by 2, we've got c2 equal to b minus a divided by 2, x1 turned out to be a formula which looked like this, b minus a divided by 2, times -1 divided by square root of 3, plus b plus a divided by 2, x2 turned out to be a similar formula, like this. So that's how we were able to derive what c1, c2, x1, and x2 are, based on the fact that since we have four choices, c1, x1, c2, x2, that we can get the exact value of the integral by using this formula for a 3rd-order polynomial. So that's the 2-point rule, so this is for 2-point rule, okay, these expressions are for the 2-point rule. Let's suppose if we had to do a 3-point rule, what would happen in this case? So if we had a 3-point rule, what you would do is, the way you would derive that expression would be saying that, hey, let me go ahead and integrate a function from a to b, f of x dx, and approximate it by c1 times f of x1 plus c2 times f of x2 plus c3 times f of x3. Because you have three points, so what you will find out is that that's the expression which you will have to choose for a 3-point Gauss quadrature rule, because you now have six choices, c1, x1, c2, x2, c3, x3. The points correspond to at how many places you are evaluating the function, so you have x1, x2, and x3. So in this case what you would do is you would choose a polynomial which would be a 5th-order polynomial, you will choose this polynomial, a0 plus a1 x plus a2 x squared plus a3 x cubed plus a4 x to the power 4, one, two, three, four, five, and six, a5 x to the power 5. So you will choose a 5th-order polynomial for which you will get the results from your integral calculus knowledge, and then you will substitute the values of the function at x1, x2, and x3 in this particular expression, equate the two, and you get six equations, six unknowns, and you will be able to find out what c1, x1, c2, x2, c3, and x3 are. So that's how you would develop any kind of 2-point rule, or 3-point rule. So you've got an n-point rule, what that would mean is that your a to b, f of x dx, would be starting from, would be approximately equal to c1 times f of x1, all the way up to cn times f of xn. That's what the n-point rule will look like. So you've got n points, so in fact we have one, two, three, four, so on and so forth, and this will be, there will be 2n unknowns which you will have. Because you have n points, and since you have n coefficients you will have 2n unkowns. So you have 2n unknowns, so you can assume it to be correct, you can assume that whatever you're going to get from integral calculus class and whatever you're going to get from the formula, that you will have the 2n minus 1th degrees polynomial for which you are going to get the same results. So that's how you will be able to develop the n-point rule, so you will take an nth-order polynomial expression, which will be the 2n minus 1th-order polynomial, and take a general 2n minus 1th-order polynomial and equate it to this particular expression there. And again you will get 2n equations, 2n unknowns, they will be nonlinear equations, and you will solve them and you will find out what these individual coefficients and arguments are. Now, in the handbooks what you will find out is that that's not the way, they give you the expressions for any arbitrary a and b, in the handbooks they give you the expression for integrals going from -1 to +1. So in the handbooks you will see expressions for this, summation, i is equal to 1 to n, ci, f of xi. So in the handbook you will find out that the values which are given for the coefficients and the arguments of this function, where you have to evaluate them, will be given for a special integral going from -1 to +1. So for example if you look at the 2-point rule, you will find out, this is what will be given to you, c1 will be given to be as 1, c2 will be given as 1, x1 will be given as -0.5773, x2 will be given as +0.5773. So you don't see any a and b in here, because these numbers for the coefficients and the arguments of the function, or you may call them weights, these weights and arguments of the function, so let me write it down here, these are the weights, and theses are the arguments. So these weights and arguments which you will see will be given for the integral going from -1 to +1. And this is not any different from what we obtained, we obtained c1 is equal to b minus a divided by 2, so if b is 1 and a is -1, you do get 1. And same as c2, because c2 and c1 are the same. If you look at x1, we derived x1 to be b minus a divided by 2, times -1 divided by the square root of 3, plus b plus a divided by 2, and that turns out to be 1 minus -1 divided by 2, times -1 divide by the square root of 3, plus 1 plus -1 divided by 2, and this turns out to be -1 divided by square root of 3, okay, because this will turn out to be 2 divided by 2, which is 1, and this will turn out to be 0, so you're going to get -1 divided by the square root of 3, which is nothing but -0.5773. So the values of these x1 and x2, and c1 and c2 have been calculated from the formulas which we derived for an arbitrary a and b, but what you are finding out is that these values which are given for c1, c2, x1, and x2, for the 2-point rule let's suppose, they are given for the integral going from -1 to +1. Now, for the sake of completion, let me show you what the arguments are for the 3-point rule. So let's suppose you're doing a 3-point rule, you are given the arguments for a . . . no, not for a to b, but from -1 to +1, again, in the handbooks, you will find out that the coefficients and the weights are given for, again, for an integral from -1 to +1. So in that case it'll be summation, i is equal to 1 to 3, ci f of xi, because you will have 3 coefficients and 3 arguments. And in that case you will find out c1 is given as 0.5556, c2 is given as 0.8889, c3 is given as 0.5556. And let's look at what the x values are given as, x1 is given as -0.7746, x2 is 0, and x3 is 0.7746. So again you are finding out that the weights and the coefficients are given for an integral going from -1 to +1. And you have to use these numbers here to be able to calculate any integral which you have, which we will see in a separate segment. And that's the end of this segment.