When using the trapezoid rule
to approximate a def integral,
there will be an error in most cases,
however, as N increases, the error will also decrease.
For this example, we want to know
how large should N be to guarantee that
the trapezoid rule approximation of the given def integral
is accurate within zero point one, or one tenth.
To answer this question,
we will be using the error balance formula
for the trapezoid rule, given here below.
Well, the error is less than or equal to
the quantity B minus A cubed,
where A and B are the limits of integration,
divided by 12 N squared,
times the absolute value of the maximum function value
of the second derivative function
on the closed interval from A to B.
There's really two steps to this problem.
We will first have to find this maximum function value
on the closed interval,
and then solve this inequality for N.
Let's begin to set this up.
Looking at the right side of this inequality,
we would have the quantity B minus A cubed,
where A is negative two, and B is one.
We would have one minus negative two to the third,
divided by 12 N squared,
times the absolute value
of the maximum function value
of the second derivative function,
and in our case,
on the closed interval from negative two to positive one.
We want this to be accurate within one tenth,
so we want this to be less than or equal to one tenth.
Now, we'll go to the next slide and work on
finding this maximum function value on this closed interval.
Our function is the integrand function,
so F of X equals negative X to the fourth
minus two X to the third
plus 12 X squared
plus two X minus five.
Of course, before we find the second derivative,
we must find the first derivative.
F prime of X would be negative four X to the third
minus six X squared
plus 24 X plus two minus zero.
Our second derivative function would be
negative 12 X squared
minus 12 X plus 24 plus zero.
Remember, our goal here is to find
the maximum function value of this function
on the closed interval from negative two to positive one.
There's a couple ways of doing this.
We could analyze the graph of this function.
Notice how it's a quadratic function, where A is negative,
so it's a parabola that opens down,
and therefore, the Y-coordinate of the vertex
would be our maximum function value,
as long as it's in this closed interval.
We could also use calculus techniques,
by finding the critical numbers of this function,
which would be where the derivative of this function,
or the third derivative,
would be equal to zero, or undefined,
then we would evaluate the second derivative function here
at the critical numbers, as well as at the in points.
Let's go ahead and use calculus techniques first,
and then we will verify our work graphically.
The third derivative function would be
negative 24 X minus 12.
This is never undefined, so let's go ahead
and set it equal to zero, and solve for X.
We would add 12 to both sides, divide by negative 24,
that would give us X equals negative one half.
Now that we have our critical number,
we're going to evaluate the second derivative function,
this function here
at the in points, and the critical number.
We would have F double prime of negative two,
F double prime of negative one half,
and F double prime of positive one.
To save some time, I've already
determined these function values.
F double prime of negative two would be zero,
F double prime of negative one half is 27,
and F double prime of one is also zero,
so the maximum function value that we are looking for is 27.
Let's go ahead and verify this graphically.
Here's the graph of the second derivative function
on the closed interval from negative two to positive one.
Notice, at the in points, the function value is zero,
and then at X equals negative one half,
we do have our vertex, and notice how the Y-coordinate,
or the function value is positive 27.
This does verify our work.
Now, going back to the first slide,
we will replace this maximum function value with 27,
and then solve for N.
This would be three cubed, that's 27.
divided by 12 N squared,
times 27,
is less than or equal to one tenth.
Well, 27 times 27 is equal to 729,
so you would have 729 divided by 12 N squared
is less than or equal to one tenth.
Now, the fraction of 729 over 12 does simplify
to 243 over four,
so our denominator would now be for N squared,
less than or equal to one tenth.
Now, let's go ahead and
clear the fractions from this inequality.
One way to do this would be to multiply
both sides of the equation by four N squared.
This would clear the denominator from this side.
Let's also multiply both sides by 10,
which will clear the denominator in this side.
Again, notice how, here, 10 over 10 simplifies out,
and here, four N squared over for N squared simplifies out,
leaving us with 2430 is
less than or equal to four N squared.
Dividing both sides by four,
we would have N squared is
greater than or equal to 607 point five.
We know N has to be positive,
so now we will take the principal square root
of both sides of the equation.
Will have to get a decimal approximation here.
We would have N is greater than or equal to
approximately 24 point six five,
or if we want,
we can say N is approximately greater than or equal to
24 point six five, by reversing the order of the inequality.
Remember, N is a number of sub intervals,
or the number of trapezoids,
and therefore, we know it has to be a counting number,
or natural number,
so we would have to round this up to 25,
so to answer the question,
N must be equal to 25 to guarantee
that the error will be within one tenth.
I hope you found this explanation helpful.