Welcome to an example
of numerical integration.
We want to use the trapezoid rule with N equals eight
to estimate the given def integral.
So because N equals eight,
that means we'll be using eight trapezoids
to approximate this def integral.
We've already learned from a previous lesson,
we'll be using this formula here
when using the trapezoid rule.
Notice how A and B are the limits of integration.
So you start with B minus A divided by two N.
Which is the same as delta X divided by two,
or one half delta x.
Now if you look at the sum here,
regardless of what the value of N is,
we'll always have a coefficient of one
on the first function, as well as the last function.
And the remaining coefficients will always be two.
Before we apply this formula,
let's took a look at a Wolfram demonstration
to visualize how this works.
While this blue function is not our function,
if we were trying to estimate the def interval
of this function over this interval
with two trapezoids, it would look like this.
And the whole idea is,
as the number of trapezoids increase,
it will approach the value of the def integral,
or in our case, because this function is non-negative,
we can say as the number of trapezoid increases,
the area of the trapezoids would approach
the area under the function.
We can see this as we increase the number of trapezoids.
Now, if we go back to where there are four trapezoids,
just for a moment, we can easily explain
why the pattern of the coefficients starts with one,
ends with one, and the remaining coefficients are two.
If we take a look at this first trapezoid,
notice how, in the area formula,
we would use this base once, and this base once,
where the lengths would be function values,
but when we take a look at the second trapezoid,
we use the base again in the second trapezoid,
which is the reason why the
second function value has a coefficient of two.
Notice how this base is also used twice in
the second and third trapezoid, and again,
this base here is also used twice,
in the third and fourth trapezoid,
ending with only using this last base once.
That's the reason why we have
the pattern of the coefficients.
Now, let's go back and take a look at our example.
We've already recognized that A is equal to one,
and B equals five, and N equals eight.
So, delta X, which is equal to B minus A,
divided by N, would be five minus one divided by eight,
which is four eighths, or one half,
or if we want, zero point five,
which means, the width of each sub interval
will be zero point five units,
which would also be the height of each trapezoid.
Now, let's go ahead and list all of our values
from X sub zero through, in this case, X sub eight.
X sub zero would be equal to A, or one,
and now, we will just add delta X each time
to find the subsequent X value.
So, X sub one would be one plus
point five, or one point five.
X sub two would be two.
X sub three would be two point five.
X sub four would be three.
X sub five would be three point five.
X sub six would be four.
X sub seven is four point five,
and finally, X sub eight is equal to five, which is also B.
Now, the given def integral is
going to be approximately equal to --
We will have B minus A, divided by two N,
or again, one half times delta X.
By using this formula exactly, we would have five minus one,
divided by two times eight,
and then we will have times this sum here.
Remember, the first coefficient is one,
so we will have just F of X sub zero,
or F of one, plus --
The remaining coefficients are two,
until we get to the last function value,
so, we will have to times F of one point five,
plus two times F of two,
plus two times F of two point five,
plus two times F of three,
plus two times F of three point five,
plus two times F of four,
plus two times F a four point five,
and finally, we are at X sub eight,
so we end with F of five.
Now, to find these function values,
we could sub all these X values into our integrand,
or the function F of X equals cosine X divided by X,
but we will go ahead and use a
graphing calculator to help us find these values.
Looking at this fraction here, we have four sixteenths,
or one fourth, and now we will find all
these function values using the graphing calculator.
So, the first thing we should do is make sure
that we are in radian mode, so let's press the mode key.
In the third row, notice how I do have radian highlighted.
If it wasn't highlighted, I would arrow down to radian,
press enter, and then it would be an radian mode.
Next, let's go ahead and type in our function into Y one.
I'll press Y equals, and we will type in
cosine X, divided by X.
Now that our function is in Y one,
we can use function notation, using Y sub one,
to determine these function values.
I'm going to press second mode to go to the home screen.
Then, to find F of one, which would be
cosine divided by one, I can simply press VARs,
right arrow, enter, enter, and then in parentheses, one.
So, the first function value is approximately
zero point five four zero three, to four decimal places.
Next, we have two times F of one point five.
I will press two, again, VARs,
right arrow, enter, enter,
and in parentheses, one point five.
This is a nice way to avoid having to evaluate this,
using cosine X divided by X each time.
So, if we press enter, two times F of one point five
is approximately point zero nine four three.
Let's go ahead and show one more,
then I will just write down the values of these,
to four decimal places.
So, we have two times F of two.
A quick way to do this would be to press second enter.
This brings up the last entry, which we can then edit.
So, for two, I could change one point five
to two point zero, which would save some time.
This would be approximately negative
zero point four one six one.
Again, to save time, I've already found
the remaining function values,
so I'll just copy them down.
Then, finally, one fourth times the sum would be
negative zero point four nine five three.
This would be our approximation, or our estimate
for the given def integral,
when using the trapezoid rule with N equals eight.
I realize the directions do say
keep at least two decimal places for accuracy,
but I usually prefer four.
I hope you found this explanation helpful.