Skip to main content

casio calculator watch


bam! mr. tarrou. in this math lesson, we aregoing to be taking a look at some numerical integration problems in the form of estimatingdefinite integrals using the trapezoidal rule and simpson’s rule and in our lesson weare going to work out this example you already see on the board and notice i haven’t givenyou any notes yet, we are going to work out this problem just understanding how to findthe area of a trapezoid and we are going to find the area of four trapezoids. after yousee this example sort of worked out with just our knowledge, a little bit of knowledge ofwhat definite integrals are, and just the area of a trapezoid formula i am going towrite out that example and then somewhere put a line in that work that lets you seethe tying with just your basic geometry skills

and knowledge and what you will see in mygreen picture and picture of what the trapezoidal rule actually is or says and tie those togetherjust kind of show you that you can do these problems even if you don’t remember exactlywhat the trapezoidal rule says. now in calculus we don’t want to not memorize the formulaand theorems and derivatives and integration formulas through the process of going throughthis class, it is actually very important but just to show you how to work out thisproblem using skills you already know. we are going to then discuss when trapezoidalrule is going to over or underestimate the definite integral, we are going to do anotherexample which you might see on a standardized test or later on in the problems in your textbookwhere we are not going to know what the function

is, we are just going to have a table of valueskind of like a t table and use the trapezoidal rule to estimate the definite integral basedoff the information in that table. we are then going to talk a little bit about simpson'srule. i am going to get just, give you a diagram to explain exactly what's sort of happeningthere, give you the simpson’s rule and then work through this problem again, estimating,we are going to estimate this definite integral using the trapezoidal rule and simpson's rule.i am not going to derive the simpson’s rule, you can look at your textbook for that, it’squite a complicated derivation. and in our next lesson, we are going to be calculatingthe maximum possible area that we can get from these rules based on a certain numberof integrals that we are going to set n equal

to. so in this case, we are going to estimatethe definite integral using four trapezoids. okay, really before i get started, the realpower of the trapezoidal rule and simpson's rule for estimating definite integrals isthat you can work out problems that maybe you couldn’t otherwise work out. we'll justtake a second and actually forget the fact that we are going to estimate this definiteintegral with four trapezoids and just calculate this definite integral. we have the definiteintegral from 1 to 3 of x cubed dx. well this is a very basic elementary function and tointegrate this using the power rule, we are just going to raise that power by one anddivide by so we are going to have the definite integral from 1 to 3 of x cubed dx is goingto become raising that power by one, we are

going to have x to the fourth and then dividingby that raised power, i am going to divide by 4.. multiply by 1/4 and that’s goingto be from the values 3 and 1. now working this to, we are just going to have, excuseme, 1/4 of 3 to the fourth power minus 1/4 times 1^1/4. well 3^4 is... 3, 9, 27, 81.so we have 81/4 - 1/4. nice, we are going to have common denominators. and with thosecommon denominators, we subtract the numerators and get that it is equal to 81-1 which is80/4 which is 20. so the definite integral from 1 to 3 of x cubed dx is equal to 20.and because the function is above the x axis, through that entire interval from 1 to 3,you can possibly say that that might be an application problem of dealing with area andof course definite integrals are not just

giving you areas, it’s a limit of sums.so why bother with this idea of estimating definite integrals using the trapezoidal ruleand simpson's rule? well it’s not very hard for me to come up with a function like, welllets estimate from 1 to 3, the square root of, i don’t know, how about 4 minus, sincewe already used, 4- 5x^3 dx. we do not have any way of calculating that definite integral,we can’t integrate not with any elementary techniques that we have. so the problem is,we have an inside function in the square root here, now maybe if i change this problem justa little bit and say we have the finite integral from 1 to 3 of maybe 2 x squared times thesquare root 4- 5x^3 dx and depending on where you are on your calculus studies, you cando a little bit of u substitution and rewrite

this expression into a form that will integratebut this one will not, so if you want to calculate the definite integral from 1 to 3 of the squareroot of 4- 5x^3, well unless you are just going to completely rely on your calculator,you are going to want to do that with the trapezoidal rule or the simpson's rule. okayso that is power right here, especially in this example. that’s the power of the trapezoidalrule and simpson's rule. now if you are in a class that allows you to use a calculator,maybe this technique is a bit outdated or not something that you would go to immediately,but if you are in a class or studying this and you really want to actually know how toestimate these definite integrals, lets do this in a nice way using this trapezoidalrule or simpson's rule. now we already understand

when we develop the idea of definite integrals,we have already estimated areas using rectangles, we talked about lower sums and upper sumsand estimating areas using midpoints but the problem with that if you see is if i wantto say find the lower sum or estimate the area, this area between the x axis and thefunction y= x^3 from 1 to 3, if i talk about a lower sum and i just do it with four rectangles,you can see how much, these four rectangles, how poorly are they going to estimate thedefinite integral because you are going to underestimate that by quite a bit but if ijust use four trapezoids, look how closely these particular legs of these trapezoidsfollow the curve. so even with just four trapezoids, we are going to have an estimation that’spretty close. now how are we going to do that

because again i didn’t give you the rule?well how do you find the area of a trapezoid, the area of trapezoids, from geometry is 1/2the height, times base 1 + base2. so in other words, it’s the height times the averageof the two bases, the height of the trapezoid, well because we are going to find the definiteintegral, estimate the definite integral from 1 to 3, that’s two units along the numberline, so we are going to do well 3-1, of course we just said 2 and we are going to take thatlength of 2 divide it into four subintervals, in this case all even and so we are lookingat trapezoids that all have a height of 1/2. so, so far we have been looking at the areais equal to 1/2 the height times base 1 + base sub 2. well of course maybe the heightsof each of these trapezoids are all a value

or length of 1/2 but as we go through thisinterval, obviously the lengths of these bases are going to be changing and will be basedon the value that you are getting from the function itself so how long is this base.well, the y value that you get from the function when you plug in 1 is 1 and 1-0 is a lengthof 1 and the length of this base here is going to be well we are going to take the valueof 1.5, plug it into the function and 1.5 or 3/2 cubed comes out to a value of 27/8and again, well not again, if we take the value of 2 and plug it into x^3 we have 8,we take the value of 2.5 or 5/2 and cube that, cause that’s what the function is, we aregoing to get 125/8 and then finally we have the last point of 3- 27. i have already setup this diagram cause i didn’t want to free

hand that in front of you and make it littlebit sloppy and take up some time but i am letting the value of the function y=x^3, thosevalues be determined, those lengths of those bases be determined by that function and withall that information into the table, we can just say okay i want to estimate this definiteintegral of four trapezoids well then the area of these trapezoids added together really,this definite integral again is going to be , can be an area cause the function is abovethe x axis giving us all those positive values those positive sums that we are adding. sothe area or actually let’s say this, the definite integral from 1 to 3 of x cubed dxis approximately equal to 1/2 times the height of these trapezoids times the first base sothat first base, it doesn’t matter how you

do this but cause addition is commutativebut i am just going to go left to right that base right there is equal from 0 to 1 so it’sa length of 1 plus our second base right here, so i am looking at that first trapezoid andthat base is going to be 27/8 and that is the area of that first trapezoid. hopefullyyou are seeing that the bases are vertical and kind of like you need to turn your headsideways to sort of see the orientation of the trapezoids like you would have probablyseen in your geometry book or the bases were horizontal. and then we are going to haveanother 1/2 cause we are doing 1/2 the height cause the heights again of those trapezoidsare 1/2, now moving onto the next trapezoid right here, we have a base which is 27/8 andanother base which is 8. i am going to step

off and reveal the work one step at a timeto make it a little bit neater but whenever i have problems that have fractions, i tendto just write everything sort of looks like a fraction, plus 1/2 times 1/2, our next trapezoidis going to be, has a base of 8 and another parallel base of 125/8 and then finally ourfourth trapezoid has got again a height of 1/2 and a base of 125/8 and 27 so we can seethat all i am doing is using the area of a trapezoid formula four times and we can alsosee just by drawing how much better the estimation is going to be of this definite integral usingthose 4 orange trapezoids as opposed to the idea of using just simply 4 rectangles wherethe left endpoint of those rectangles is determined by the function and instead of having an estimationof those definite integrals which is going

to be a very, very, very underestimated oroverestimated if i use the right end points at least from the drawing it looks like weare going to be pretty close. so there you go. i did change the notationa little bit to match the notation that you are going to see in the trapezoid rule herein a second. i went back and showed where those values, where the 1, the 27/8, 8 andso on, where those values came from and used the function notation. we have 1/2 times 1/2,again where is you base 1 and base 2 coming from, 1/2 and 1/2 times base 1, base 2 andso on and so on and work through the notation, i wouldn’t do this if i was just doing oneproblem with trapezoidal rule and i didn’t know the rule, but i want to show you withan example where the rule comes from, we took

from each of these, or both or four of theseterms, all four of these terms have a common factor of 1/2 times 1/2 so we are pullingthat out, then we see, we have f(1), f(3/2), again another f(3/2), a couple of f(2), acouple of f(5/2) and finally f(3), the last function the last value, the upper limit ofour definite integral getting plugged into our function. well when you factor the 1/2times 1/2 out of each of these four terms, you see, yeah, there's a couple of, there'ssome like terms that you could add together so, there's two f(2) and two f(3/2)'s andso on, you can read that and now i am stopping and saying remember it was 1/2 times the heighttimes the sum of our two bases so well where did the 1/2 come from, where did the heightcome from for each of those trapezoids? the

height of that 1/2, that 1/2 came from doingthe upper limit of the definite integral minus the lower limit of the definite integral dividedby how many trapezoids you wanted to use to estimate that definite integral so i am justshowing, this is again only for the purpose of showing how those arithmetic and our pastknowledge of just basic geometry ties in with the trapezoidal rule. so i am writing that1/2 as i calculated it 3-1 over four and then finally just continuing over to okay so let’stake the function out and remember the function is simply x cubed so 1 cubed, maybe shouldhave put a 3 on that, just for academic purposes, and then we are taking the value of 3/2 andplugging that into the function again x cubed, and the next value of x cubed, and so on andso on. now putting those actual y values back

into the problem that i had in our discussion,3/2 cubed is the 27/8, 2 cubed is 8, 5/2 cubed is 125/8 and we come out to 20.5 and rememberbecause this is a definite integral that we could evaluate using our skills that we havelearned so far in evaluating definite integrals. we know the answer is really 20 and with justfour, only four trapezoids we got an estimate that was really quite close. its 20.5 so youcan see the power of this trapezoidal rule, how close the estimation is of that definiteintegral even with only four trapezoids and you make that 5 or 6 or 7 trapezoids insteadof just 4, you would get an estimate quite close and we will talk about that expectedmaximum error in our next lesson. now i did a lot of explaining just to tie your old knowledgewith your new knowledge but you can see here

this line where i particularly said i wantto tie this old school arithmetic and basic geometry knowledge with our trapezoidal ruleand focused on till here. if you knew the trapezoidal rule, you would have just pickedthe problem here and finished and you can see that it’s not very much work eitherso this, getting our fancy picture and picture, is what the trapezoidal rule says. the trapezoidalrule, let me get the glare out of here from the window if there is any. let f be a continuousfunction on a closed interval from a to b and if that condition is met, we have thedefinite integral from a to b of f(x) dx, is approximately equal to b-a over 2n timesf(x0) plus 2 times f(x1) this x sub 0 as you solve through arithmetic is simply that initialx value that x sub zero is going to be you

a value, the lower limit of your definiteintegral and then just working through those steps as you saw me doing with my 1 and 3/2and 2 and so on and again i stepped through those x values through the calculation ofb-a over, well i just did b-a over n so it’s a little bit curious where this 2n is comingfrom, i’ll talk about that in a second and see plugging in your x sub 0, x sub 1, x sub2 and you start off with 1 times f(x0) plus 2 times f(x1) plus 2 times f(x2) plus.. andyou just continue that process stepping through your interval along the x axis, or like, youcan find integrals, definite integrals on the y axis as well, but so you just step throughthat interval of which you are calculating the definite integral until you get up tox sub n now that’s going to be the upper

limit of your definite integral. as n approachesinfinity, as the number of trapezoids you are using to estimate the definite integralget larger and larger and larger, then the right hand side of this rule is going to approachthe actual definite integral and become more accurate estimates we saw with our limits,infinite limits of sums and developing our idea of the first fundamental theorem of calculusand estimating area with rectangles. we let the number of those rectangles approach infinityand whether we use the left end point or the right end point or the mid-point we got aninfinitely accurate estimate. okay the only thing bothering me a little bit here is thisidea of b-a over 2n because you saw in my non, you know we are going to do this problemwithout actually knowing the trapezoidal rule,

i did (b-a)/n to calculate the height of eachof those trapezoids. well yeah, the area of a trapezoid is 1/2 times the height timesb sub 1 plus b sub 2. well if (b-a)/n is the height and we are estimating area of a trapezoid,well there's this 1/2 that’s always going to be sitting out front and that’s wherethe 2n came from in the denominator of the trapezoidal rule. now, just in case you wantto see it again, voila, i knew before even starting that this estimation, i didn’tmaybe necessarily know how close the estimation was going to be to the actual answer of 20but i knew that the estimate that i got from the trapezoidal rule, this particular examplewas going to be a little bit of an overestimate so let’s talk about that right now. bam!so we have functions which are increasing

concave up, increasing but concave down, decreasingand concave down and then we have increasing and concave up. as you look across this board,what... did you see any similarity with all of these answers? when did the trapezoidalrule overestimate it? well it overestimated when it was increasing but it all underestimatedwhen the function was decreasing. but when the function was concave up and you connecttwo points along that function with a straight line, you are going to have when the functionis concave up, that trapezoidal rule is going to be overestimating your definite integraland when your function is concave down whether its increasing or decreasing, when you connectthose, any two points along that function with a straight line which would be effectivelyat one of the legs of that trapezoid, you

are going to see, it’s going to fall a littlebit below the function and underestimate the definite integral so trapezoidal rule overestimateswhen you function is.. excuse me, is concave up or the second derivative is positive andis going to underestimate when your function is concave down and your second derivativeis negative. now if they just give you sort of like a t table or a table of values thatrepresents a function and you don’t know the function, what the function actually is,what does it look like when you want to estimate the definite integral using the trapezoidalrule? it’s actually pretty simple as long as you know the rule.alrighty then for our last example dealing with the trapezoidal rule, we are going touse this table of values created by some function

f(x). we have the x values of 1 through 5and these given values coming from our function and we want to estimate the definite integralfrom 1 to 5 of f(x) dx using the trapezoidal rule with n=4 and now why are they askingus to use 4 trapezoids to estimate the definite integral which is defined by this function?well the x values of 1 and 2 are going to give us y values setting up 2 bases of ourfirst trapezoid and then 2 more bases of our second trapezoid and then three and then ourfourth adjacent trapezoid going from that definite integral or in this case along thex axis from 1 to 5. and unlike before where we just did this using our area formula ofa trapezoid from geometry, we have the trapezoidal rule now and that will speed up the processand allow us to do quite a bit less work and

the definite integral is approximated by well(b-a)/2n so we are going to have the definite integral from 1 to 5 of f(x) dx is approximatelyequal to b-a, well that’s going to be b-a so 5-1 over 2n and we explained where the2 came from in the denominator is our previous scene, so 2 times n, 2 times the number oftrapezoids you are going to sue to estimate the definite integrals so that’s going tobe 2 times 4 and let’s see what else does it now say. times, now we are going to takef(x0), the function, the y value you are getting from the function using that very first xvalue in your definite integral, that lower interval so it’s going to be f(1). wellf(1) is 2.236 plus, referring to our rule here and let you see how to read it, 2 timesf(x1) that’s simply the next number along

the interval next x or y value if you areintegrating along the y axis that’s within your interval so we are counting by well 1obviously and so f(x1) or x sub 1 in terms of that notation is going to be your two sowe are looking at two times f(2). well f(2) is 3.17 and we are just going to keep withthat idea of having that coefficient of the y value that we are getting from the, ourfunction until we get to the last term in this rule or we go to work with the last rightmost side base or length of the base of that trapezoid. so again we have, 2 times f(2)plus 2 times f(3), looks little bit like a 1, plus 2 times f(4) plus and now again, hopefullyyou understood sort of from my example working through that example with our geometry knowledgeand not this rule, why this last term does

not have a coefficient of two in front ofit, so make sure as you get to our beginning on that first and last x within our intervalyou don’t put a two in front of there, we have a 7.28 so let me just step off and revealthis work one step at a time and move on to estimating definite integral using simpson'srule. bam! simpson's rule. we are going to firstthough tie in with, point out some information that was going on with the trapezoidal ruleestimating the definite integral with the trapezoidal rule with any sub interval f isestimated by a first degree polynomial or a line and we can see here, i maybe put apart of possible cubic function or a sine function or a cosine function but at any ratewhen you are using straight line segments

to estimate the movement of a moving, curvingfunction, sometimes that estimation is not going to be that great but sometimes it willbe very, very nice and we saw with our fist example with only four trapezoids we got thedefinite integral an estimation that was within half of a unit and with these intervals being(b-a)/n still. but there is this idea of simpsons rule that is going to allow us to estimatethe movement of function f a little bit more accurately, actually in some cases a lot moreaccurately than we even can with the trapezoidal rule which is much, a lot of times much betterapproximation than just using of course a finite number of rectangles, so we are justimproving our estimation processes of these definite integrals. so the simpson’s ruleinstead of just using linear functions or

line segments if you will to estimate themovement of a function, i want to say polynomial but it could be any kind of function really.with simpson’s rule, the subintervals are grouped into pairs. in each double subinterval,you can estimate f by polynomial of degree less than or equal to 2. 3 points may be collinearbut if not a quadratic can be found passing through those three points. now here’s wherewe come in the idea, getting down here in to this reading of why we have to have subintervalgrouped into pairs. if we take our subintervals and we group them into pairs which is goingto be a problem for my diagram by the way cause i have got 1, 2,3,4,5 subintervals whichis great if you want to estimate a definite integral using trapezoids but it’s not goingto work when estimate definite integrals with

simpson's rule because you need to have aneven number of subintervals. they need to be grouped into pairs or double subintervals.why? because within like say here, we have a double subinterval and we got 1, 2, 3 pointscoming from that function within that double subinterval. well that should sound familiar.we have before, well let’s just read it, ‘this should sound familiar when you studied3 variable systems or matrices.’ well back when we learnt about working with 3 equationsand 3 unknowns and working with gaussian elimination method and then moving into matrices and maybestill doing gaussian elimination with, excuse me, well yeah with matrices or you might evendo cramer's rule to solve this higher order polynomials, not those high order polynomialsexcuse me, that’s another technique but

those systems of equations that had, ahh okaytechnically you can work with two equations but we have other techniques for that, thoseprobably would be simpler but when you are working with those three equations and threeunknowns or more but specifically three equations three unknowns you had problems that dealtwith 'hey you have a parabola passing through these three points, find the equation of theparabola and i included those kind of problems in my lessons as well and i will include one,a link to one in the description of this lesson and you can see i am trying to draw firsta red and then a green parabola through these double subintervals and estimate the movementof my yellow function with those parabolas and hopefully you can see a little bit ofvariation cause i am trying to show you that

simpson’s rule is not going to give youan exact approximation but yeah when you have a curving function and you just take littlepieces of that curving function and try to estimate its movement with a parabola, oftenthat parabola is going to very closely track the movement of whatever function is involvedor within your definite integral but my problem here is i have got a double interval hereso i have got my 1 2 3 points, my parabola, the quadratic is going to pass through, ihave another double interval here so 1 2 3 points but that last interval is a problemsee if i want to, well i am going to, just for the purposes of making it easy to drawthis picture, we are going to have to change this problem. i don’t want to try and drawsay six points within this interval but maybe

i could extend the interval to include justone more point and maybe something like this where now i have got 1 2 3 4 5 6 subintervalswithin this region along the x axis and now i can come through and maybe say that, thatparabola right there, that quadratic right there is going to be used so that we havethis double subinterval and that one quadratic estimating that part of the definite integraland then we have this double subinterval and that green parabola being used to estimatethe movement of my yellow function within this interval, of i don’t know, say 2 to4 and then finally finding my red chalk, we have our first parabola, you saw me revealingat the beginning of the scene that red parabola is going to estimate the movement of my functionbetween the values of 0 and maybe 2, if you

will, again i didn’t give you really a scalebut that’s what’s going on with simpson’s rule but yet, the formula looks very similarto the trapezoidal rule, it just seems like some of the coefficients are changing butyou are estimating movement of function with a parabola possibly instead of just beinglimited to estimating this movement with a line segment.simpson's rule, let f be a continuous function on the closed interval from a to b and letn be an even integer because as we just showed you it can’t be odd, you need double subintervals.the definite integral from a to b of f(x) dx is approximately equal to (b-a)/3n timesf(x0) plus now instead of before where it was always 2, it’s going to be 4 times f(x1)and then it’s going to go back to 2, 2 times

f(x2), then you go back to 4, 4 times f(x3)and again your first coefficient is 1 and now it’s going to flip flop or cycle backand forth between 4-2- 4-2-4-2 and then as you get to the end of this sequence of notationyou're going to write out, sequence of addition that you are going to write out. we have 4times f(x sub n-1) and then that’s going to be your last coefficient just before yourlast term which has a coefficient of 1 again plus f(x sub n) and just like before, as youlet the number of subintervals increase to infinity, the right hand side is going toapproach the left hand said giving you, we are not going to let n approach infinity inthese problems but it would approach, infinitely accurate example if we use an infinite numberof subintervals. but as you are going to see,

with this particular example, i am just goingto redo the, again the problem i did at the beginning of this lesson, where, you know,i wanted to give you a problem through the techniques of and understanding of the firstfundamental theorem of calculus that we have learned up until now and show you a comparisonwith that same problem with the trapezoidal rule and now the simpson's rule. estimatethe definite integral using simpson's rule and again we’re going to do the definiteintegral from 1 to 3 of x cubed dx with n=4 using the simpson's rule as opposed to trapezoidalrule. so this is approximately equal to, just for purposes of, purposes of space, i am goingto say approximately equal to, what do we have here, (b-a)/3n so that’s going to be3-1 over 3(4) 4 subintervals and the problem

with that was... 5 we couldn’t do it withthe simpson's rule, could with the trapezoidal rule; times f(x1) so that’s going to beplugging in 1 here, we have, times 1 cubed plus 4 times f(x1) and remember that our subintervalsare 1/2's so we had 3/2 cubed plus 2 times moving another, that (b-a)/3n that 3-1 over3(4) which was 1/6 that’s going to be 2 times 2 cubed plus 4 times 5/2 cubed and that’sour, our moving in here 1, 2, 3 and then our 4th subinterval is going to be plus 3, losingmy place here a little bit, cubed. now, right off the top of my head, actually i alreadydid my notes but i knew that after you do this arithmetic, this is going to come outto be approximately equal to 20. now in this particular case using 4 sub intervals withthe simpson’s rule, remember we started

this lesson off by doing this problem, withthe first fundamental theorem of calculus and we knew that the actual answer was goingto be 20, in this case the estimate that we got from simpson’s paradox, no i am notteaching statistics! simpson’s rule came out to be the same so our estimation is exactlyequal to the answer of 20 now it is an estimation though so we are going to talk about, in outnext lesson how to calculate the maximum possible error or the maximum error to expect whenusing trapezoidal rule and the simpson’s rule to estimate definite integrals, theyare not always going to be exactly the same but as you can see, they can be the same,actually i am sure with either one of these methods, well, more likely with the simpson'srule than the trapezoidal rule. but that’s

the end of my lesson. i am mr. tarrou. bam!go do your homework!

Comments