CHAPTER 07.03: SIMPSON'S 1/3RD RULE: Multiple Segment: Example: Part 1 of 2

 

In this segment, we're going to take the example, so we have multiple segment 1/3 rule . . . Simpson's 1/3 rule, and we're going to take an example to illustrate how to use the formula to be able to do that. So the example which we're going to take is that we're going to say, hey, find the integral, approximate of course, this integral x e to the power -x, dx, by using Simpson's . . . Simpson's 1/3 rule, using n equal to 6. So we're going to use six segments, and we're going to see that how we can apply Simpson's 1/3 rule to that particular integral, and we'll then see that how good our answers are.  So if we again go back to our . . . our general formula, let me just write it down here so that we can follow it. So the general formula is a to b, f of x dx is approximately equal to b minus a, divided by 3 n, times the value of the function at the lower limit, which is x0, plus 4 times summation, i is equal to 1 to n minus 1, i is odd, f of xi, plus two times summation, i is equal to 2 to n minus 2, i is even, f of xi, plus f of xn. So that's what we have as the general formula for Simpson's 1/3 rule, and what we want to do is we want to be able to apply this to this particular function and this integral which is going from 0.2 to 3.8. So a is 0.2, b is 3.8, and since n is 6, that means h is nothing but b minus a, divided by n, which is 3.8 minus 0.2, divided by 6, that gives me 0.6.  So what that implies is that we have the segment width to be 0.6 in between various points.  So if I draw it on a line here, I have 0.2 here, and I have 3.8 here, and this is a, this is b, and as we said in the derivation, we are calling is x0, and we'll call this to be xn.  So if this is going to be 0.6, we're going to have the next segment at 0.8, the next segment at 1.4, then the next segment at 2.0, and the next segment at 2.6, and the next segment at 3.2.  So that's, it's not drawn to scale, but you get the point that these are equidistant points here, and the way that we have found out these equidistant points are based on that the distance between the two consecutive points which have been chosen for the Simpson's 1/3 rule, multiple segment Simpson's 1/3 rule is 0.6. So 0.8 plus 0.6, plus 0.6, plus 0.6, plus 0.6, plus 0.6, give you those numbers, and this one will be then x1, this one will be x2, this one will be x3, this one will be x4, and this one will be x5, and of course, since n is 6, this is nothing but x6.  So those are the points at which we will need the formula to . . . we'll need the values of the function, that's just based on what we have derived in the Simpson's 1/3 rule.  So what that implies is that if I, again, write down those . . . write down those approximations, I have a to b, f of x dx is approximated by b minus a, which is 3.8 minus 0.2, divided by 3 times 6, because n is 6.  Now, what I have here is the value of the function at x0, plus the summation of i is equal to 1, and i being odd, and goes all the way up to n minus 1, which is nothing but 5, because n is 6, so n minus 1 is 5, f of xi, so it's 4 times that, plus 2 times the values of the function at the even subscripts, i is equal to 2 to 4, n minus 2 is 4, because n is 6, 6 minus 2 is 4, and i is even, f of xi, plus f of xn, which is f of x6.  So what we have done is we have accounted the value of n, we have accounted for the value of a, b, and shown that what we need to . . . how we need to write down this summation.  Now we're going to expand this summation.  So we'll get 3.6 divided by 18, times the value of the function at x0, which we just showed is 0.2, plus, if we expand this summation, we get 4 times the value of the function at xi going from 1 to 5, where is are odd, so we'll get f of x1, plus f of x3, plus f of x5, and that's where I'm going to stop, because that is the upper limit. So I need to . . . let me just write this down again so that we write it correctly, we get 4 times the value of the function at x1, plus f of x3, plus f of x5, and that's where I'm going to stop, because 5 is the upper limit of the summation, plus 2 times the value of the function at x2, the even numbers now, x2 and x4, because 4 is the upper limit of summation, that's where I'm going to stop, plus the value of the function at x6, which is nothing but b itself. So I'm going to write this again, so in order for this to be consistent, I'm going to not substitute x0 there yet, I'm going to just call it x0, just to be consistent.  And now I'm going to go ahead and substitute the values of x0, x1, x2, x3, x4, x5, and x6 into the formula.  So this will be 0.2, plus 4 times the value of the function at x1, which is 0.8, from the previous board, plus f at x3, so keep in mind that you're skipping the next nodal point, you're going from x1 to x3, so it'll be 2.0, plus the value of the function, again, skipping one, you get 3.2, plus 2 times the value of the function at x2, which is 1.4, plus the value of the function at x4, again, you're skipping x3, and you're going to get 2.6, plus the value of the function at x6, which is nothing but 3.8, which is, in fact, b itself.  So this is something which you have to carefully write out, otherwise you might make some mistakes when you write this thing out.  It very important to understand what the summations start from and where they end, and also that what is even and what is odd.