CHAPTER 07.05: GAUSS QUADRATURE RULE: Converting Limits of Integration
In this segment, what we're going to do is we're going to see how we can convert an integral going from a to b to an integral going from -1 to +1. So we're going to see how we can do this conversion from an integral going from a to b to an integral going from -1 to +1. Why do we need to do that? It is because in the handbooks, the values of the arguments and the weights for the Gaussian quadrature rule are given for an integral going from -1 to +1. So if you look at any handbook, you will find out that under Gaussian . . . Gauss quadrature rule, that they will give you the arguments, which are xi, the weights, which are ci, they will give you only for the function which is going from . . . for the integral which is going from -1 to +1. So we have to have some mechanism of knowing how we can convert this integral into this integral there. So let's go ahead and see how we can go about doing that. So in order to be able to convert this integral into this integral, what we need to figure out is that when the lower limit is a, the upper limit . . . the lower limit needs to be -1 here, when the upper limit is b here, I want upper limit to be 1 there. So what I'm going to do is I'm going to say, hey, let me go ahead and make a transformation, let me use a transformation that x is equal to m t, plus c. And the reason why this transformation is going to work is because m is basically going to contract you . . . or contract or expand your interval, while c is going to basically translate your interval to the left or right, because that's what you are doing. You have an interval going from a to b, you want to contract it or expand it to a width of 2, because that's the width of the interval here, but then also you will have to translate it so that the lower limit becomes -1, and the upper limit becomes +1, so this is a good transformation to use, a straight line transformation. So when x is a, you know that you want t to be -1. When x is b, you want to be +1. So that's where it comes from. When x is a, you want t to be -1, because that's what you want as the lower limit of integration. When t is +1, you want x to be b, or when your x is b, you want the upper limit of integration to be +1. So you're basically getting two equations, two unknowns, which can be solved for m and c. So m from here turns out to be b minus a, divided by 2, and your c turns out to be b plus a, divided by 2. That's what you get by solving these two equations and two unknowns, which basically means that I can do the transformation of x going to t by using this value of m and value of c. So what I get is x, x is equal to b minus a, divided by 2, times t, plus b plus a, divided by 2, that's what I get for the transformation, and I know that in order to be able to do the transformation of the integral, I'll have to calculate dx, which will be b minus a, times dt. So the original function which you have going from a to b, f of x dx, now will become exactly equal to the integral going from -1 to +1, but instead of x, you will substitute what we have here, which is b minus a, divided by 2, t, plus b plus a, divided by 2, and instead of dx, you're going to substitute this, which is b minus a, divided by 2, dt, and that's how you're going to transform an integral going from a to b to an integral going from -1 to +1. So I'm going to take the b minus a, divided by 2 outside, and I'm going to get integral going from -1 to +2, value of the function at this, times dt right there. So what that means is that in order to be able to convert the integral going from a to b to an integral going from -1 to +1, what you'll have to do is the argument has to be changed to this for the function, and you have to multiply it by this weight, which is b minus a, divided by 2. So let me go ahead and take an example. Let's suppose if you had an integral going from 0.1 to 1.2 . . . 1.3, let's suppose, f of x dx. What does that mean? What that means is that this will be equal to 1.3 minus 0.1, divided by 2, okay? That's what that will be. So this is b, this is a, times integral from -1 to +1, the value of the function, 1.3 minus 0.1, divided by 2, times t, plus 1.3 plus 0.1, divided by 2, times dt, and that'll give you 0.6, integral from -1 to +1, f of 0.6 t plus 0.1, dt. So all you have done is you have taken a function which was going from 0.1 to 1.3, and converted it into an integral going from -1 to +1. So this integral is going from 0.1 to 1.3, and this integral is going from -1 to +1. If you choose any function of your choice, let's suppose, as a homework, that's what you should do, go ahead and choose a function of your own choice, do this integral by using your integral calculus knowledge, then go ahead and use this transformed integral here for the same function, and see whether you get the same numbers, you should, if you're not getting the same numbers, then there's something wrong which you are doing when you are trying to do this exercise. So maybe you can choose a function like 3 x squared, let's suppose, go ahead and do that for the same upper limit and lower limit as I have given there. Do this by substituting 3 x squared there, try to do the problem by using your integral calculus knowledge, then go ahead and substitute, in this particular integral here, where the arguments are slightly different, and find the value of the integral, you should get exactly the same number. That will give you some confidence in understanding that how do we convert it from an integral going from arbitrary values of a and b to an integral going from -1 to +1, because this forms the basis for using the handbook values of the Gaussian quadrature scheme. And that's the end of this segment.