CHAPTER 07.07: IMPROPER INTEGRATION: Multiple Segment Gauss Quadrature Rule for Singular Integrands: Part 2 of 2

 

Get your formula, so this will become 0.75 times c1, so this is approximation, times c1, which is 1, times the value of the function at x1, plus 1 times the value of the function at x2 of the formula for the Gaussian quadrature formula.  And the next one is 0.75 times 1 times the value of the function at 0.75 x1, plus 2.25, plus 1 times the value of the function at 0.75 x1 . . . x2, plus 2.25, so that's going to give us the approximation of the . . . of the integrals.  So now we're going to substitute these values for x1 and x2 in here.  We get 0.75 times the value of the function at 0.75 times -0.5773, plus 0.75, plus f of 0.75 times 0.5773, plus 0.75, so that takes care of the first integral. The second integral will be taken care of, again, by substituting the values of x1 and x2 in the argument of the integrand . . . argument of the function, which is 2.25, plus the value of the function at 0.75 times 0.5773, plus 2.25.  So eventually, when you look at this one, you're going to have to find the value of the function at four points.  So the first point will be between 0 and 1.5, which turns out to be 0.3170, and the second one also has to be between 0 and 1.5, which turns into 1.183.  The second integral, the value of the function is at 1.817, and the value at 2.683, which are the two points between 1.5 and 3. So once we have that, we just need to substitute the values of the function at those points, I'm going to directly put those, you already know what the function is.  The function, f of x, is simply 5 x, divided by square root of 9 minus x squared, so all I am writing down here when I am going to write down the values of the function is simply substituting the values of these arguments in this function to get the values of the function, and these turn out to be 0.5315, the next one turns out to be 2.146, the value of the function at 1.817 turns out to be 3.806, the value of the function at 2.683 turns out to be 9.995, and the value which here . . . which I get is 12.36. So this is the approximate value of the integral which I get by using the . . . by first taking the integral from 0 to 3, and dividing it into two equal segments, and then applying the two-point Gaussian quadrature rule over each segment.  So I'm going to write it down right here, that the integral going from 0 to 3, 5 x, divided by square root of 9 minus x squared, dx, turns out to be approximately equal to 12.36. Of course, we know the exact value is 15, so the absolute relative true error in this case turns out to be exact value minus approximate value, divided by exact value, times 100, and this number here turns out to be 17.60 percent. So somebody might say that as you keep on increasing the number of segments, in this case, we have two segments which have been developed, does the number become better and better?  Yes, it does.  So I have developed a table for it to show you that as you keep on increasing the number of segments, that is, you are dividing it into equidistant segments, how does the application of the two-point quadrature rule on each of those equidistant segments improve our value? So if I have n here, I have value here, and I have the relative true error here, because that's based on the exact value of 15, if I have 1, 2, 3, and then I'm going to show you the value for 8. And again, you can do these as your homework, or maybe if you are going to write a computer program for it, maybe you can then check your answer against these.  I got 11.24 in the previous example, I got 12.36 in the current example, because that's using two segments.  With three segments I got 12.85.  With eight segments I got 13.66.  So the relative true error here is 25.07 percent, here it is 17.60 percent, in the current example, which I just calculated right here, here it reduces to 14.33 percent, and here it reduces to 8.933 percent.  So what you are finding out is that as you are increasing the number of equidistant segments you are breaking your interval from 0 to 3 into, and applying the two-point Gaussian quadrature rule over each of the segments yes, the value is becoming better and better, and close and closer to the exact value of 15, but the convergence of that is pretty . . . pretty bad, in terms of getting the value of the integral accurately.  In fact, at this point you don't even have one significant digit which you can trust in the solution.  I shouldn't say that based on this number here, but the true error is quite high to make that kind of an argument.  So what do we do for this one? There are other quadrature rules, such as Gauss- Chebyshev rules.  So there are Gauss-Chebyshev rules which take into account the nature of the . . . nature of this integrand, so you have the integrand which we are trying to integrate is given by this, right?  And what these Gauss-Chebyshev quadrature rules do is they take into account the singularity of the value of the function.  Now, Gauss-Chebyshev rules may not be the best rule to use, because I think the singularities are based on both the ends of this, but you might be able to somehow be able to use similar type of . . . similar type of quadrature rules to be able to get a more accurate estimate faster than what you are getting by using the Gauss quadrature rule.  It's quite possible by using . . . by going from -3 to +3 . . . no, this is an odd function, so you're going to get 0 from there, but some variation of Gauss-Chebyshev rule most probably will help you to get this integral more exactly.  And that's the end of this segment.