Welcome to a video on the
Trapezoid Rule of Numerical Integration .
When trying to evaluate definite integrals analytically,
sometimes it's very difficult or even impossible
to determine a functions anti-derivative.
When the analytic method fails,
we use a numerical approach
to approximate a definite integral.
The trapezoid rule is an numerical method
to approximate a definite integral using trapezoids.
Let's take a look at how this is going to work.
Let's say we want to use a trapezoid
to approximate the definite integral
of this function on the interval from zero to eight.
You can see if we use one trapezoid in green
this area is this area is much larger
than the area bounded by the function and the X axis,
represented by the definite interval.
However, watch what happens when we increase
the number of trapezoids.
You can quickly see that as we increase the number
of trapezoids the sum of the area of those trapezoids
is going to approach the value of that definite integral.
Let's go and take a look at another function.
Again watch as the number of trapezoids increases.
You can see it quickly approaches the value
of that definite integral on the given interval.
Okay, let's go back to out presentation.
Let's do a bit of review first.
Remember a trapezoid is a quadrilateral with one pair
of parallel sides, so to determine the area of a trapezoid
we have the area equals one half times the quantity
of base one plus base two times the height.
And this would be the diagram.
However, we're going to be using right trapezoids.
Which means we have two right angles in the trapezoid.
The trapezoid will also rotated
from what we're used to seeing.
This will be base one and base two,
and the height would be the length of this side here.
Let's say I wanted to approximate
this definite integral in yellow
by using four trapezoids on the interval from A to B.
Well first, we have four trapezoids that means
N is going to equal four.
What we would do is we want to divide this interval
into four equal parts, and one way to do that
would be to pick the length of the entire interval
or B minus A and then divide it by N.
So, when we divide the interval into four equal parts
because N is equal to four.
This would be A which we'll call X sub zero.
This will be X sub one, X sub two, X sub three,
X sub four, which is also equal to B.
We have four equal intervals.
Next what you'd do is construct our four trapezoids,
so they would look like this.
There's our first trapezoid, our second trapezoid,
our third trapezoid, and our fourth trapezoid.
Now we can see this is going to be pretty good approximation
of this definite interval.
Let's go ahead label this trapezoid one,
trapezoid two, three, and four.
Remember the area of a trapezoid is one half
times the quantity of base one plus base two times height,
but we're going to go ahead and use it in this form,
we'll have the height times
base one plus base two divided by two.
So to approximate this definite integral
we'll determine the area of these four trapezoids.
For these function values would be the bases
of the trapezoids, and the length
of each X interval would be the height.
Notice how they're all equal to each other,
so we can use the formula
B minus A divided by N
to represent each height of the trapezoids.
We'd have the height times the sum of the two bases
divided by two for the area of trapezoid one.
That'd be F of X sub zero plus F of X sub one
divided by two.
This product here would be the height times half
of the sum of the bases, so this would be the area
of trapezoid one.
Since the height is the same we'll just write the sum
of the two bases divided by two here
for the second trapezoid.
That'd be F of X sub one plus F of X sub two divided by two.
This product would be the area of trapezoid two.
For trapezoid three we have F of X sub two plus
F of X sub three divided by two.
And then for the last trapezoid we have
F of X sub three plus F of X sub four divided by two.
Again each of these products when we distribute
represents the area of each of these trapezoids.
We find the sum of those that'll approximate the area
of this definite integral.
Now let's go ahead and take a look one more thing.
Notice how they all the denominator of two,
so we can factor this two out.
So we'd have B minus A divided by two N.
Notice that there are two F of X sub ones,
two of F of X sub twos, and two F of X sub threes.
Simplifying the numerator we would have F of X sub zero
plus two F of X sub one plus two F of X sub twos
and two F of X sub threes and we have one F of X sub four.
A way to notice the pattern of these coefficients.
We have one, two, two, two, one.
We'll always start with a coefficient of one
then we'll have two and we'll end with a one
regardless of what N is.
Let's go ahead and formalize the Trapezoid Rule.
Using the Trapezoid Rule we can approximate
this definite integral using this formula,
and this formula represents the area
of a certain number of trapezoids base upon the value of N.
Again I want you to notice we have one F of X,
two, two, two and so on, but we end with a one as well.
As N approaches infinity,
the right-hand is going to approach the value
of that definite integral.
Let's go ahead and take a look at an example.
When we evaluate this definite integral on the interval
from one to three using four trapezoids,
and therefore N is equal to four.
Here's the value of A and here's the value of B.
We would divide this into four equal intervals,
like so and then form our trapezoids.
Let's go ahead and do that.
Trapezoid one, trapezoid two, trapezoid three,
and trapezoid four is actually a triangle.
Now that we have the idea down let's go ahead
and use the formula.
This is going to be approximately B minus A divided two N.
Well B is three and A is one,
so we have three minus one divided by two times four.
One last thing we might want to do,
remember the width of each interval
is equal to B minus A divided by N.
So three minus one divided by four
that'll be two fourths or one half.
That's important because it'll help us get started
when we take a look at these function values.
Start with F of X sub zero which would be F of one
plus two times F of X sub one.
Well as long as we know that B minus A divided by N
is equal to one half we'll just add one half
to the receiving X value, so we had one here
so we'll have F of one and a half or one point five
plus two times F of.
We'll add another one half or point five to one point five.
That'd be F of 2.
How do you know when to stop?
We'll stop when we get to three
because three is where this integral ends.
Plus two times F of two point five.
Remember on this last one
we'll only have a coefficient of one,
so one F of three.
Okay, so now here we're going to have three minus one
that's two over eight, that's one fourth
or zero point two five.
Now to determine all of these function values
we'll use the calculator.
Let's go ahead and get that out.
What we're going to do is press Y equals,
and we'll type in our function to Y one which is
nine minus X squared.
Now we're going to go back to the home screen,
and we can evaluate all these at one time.
We press VARS, right arrow, enter,
and then enter to select Y one.
We want to evaluate this function at X equals one,
so we'll use function notation
instead of F we're using Y one.
Plus two times Y one of one point five, so press VARS,
right arrow, enter, enter again,
and then one point five plus two times F of two.
So again VARS, right arrow, enter, enter,
then the parenthesis two.
And we'll just keep doing that
until we reach an X value of three.
We have two two point five.
Be careful here
the last function value is not multiplied by two,
so we'll just press plus Y one three.
We have 37 for the sum of these function values.
Let's go ahead and write that down.
37 times point two five will give us nine point two five,
so we can say that this definite integral approximately
nine point two five.
Let's go and determine the actual value to compare,
and we can do that on the calculator as well.
We press MATH, option nine, type in our inter gran,
nine minus X squared comma X comma one comma three.
And it should be very close to nine point two five,
and it is.
Which is a good check that we have done this correctly.
Okay, I hope you found this presentation helpful.
Thank you for watching.