WEBVTT mathematics/calculus-ii/murray
00:00:00.000 --> 00:00:14.000
This is educator.com, and today we are going to discuss three methods of integration approximation, the trapezoidal rule, the midpoint rule, and the left and right end-point rules.
00:00:14.000 --> 00:00:27.000
The idea here is that you are trying to approximate the area under a curve
00:00:27.000 --> 00:00:44.000
The function here is f(x) and we are trying to approximate that from x=a to x=b and we are trying to find that area.
00:00:44.000 --> 00:00:50.000
What you have done so far in your calculus class, is you just take the integral of f and then you plug in the endpoints.
00:00:50.000 --> 00:00:55.000
The point is that there are a lot of functions that you will not be able to take the integral of directly.
00:00:55.000 --> 00:01:02.000
So, what we are going to try to do is find approximation techniques that do not rely on us being able to take the integral.
00:01:02.000 --> 00:01:22.000
The idea for all of these techniques is that you start out by dividing the region between a to b into n equal partitions.
00:01:22.000 --> 00:01:26.000
Then we are going to look at the area on each one of those.
00:01:26.000 --> 00:01:33.000
That is the first part of the formula here.
00:01:33.000 --> 00:01:48.000
Each one of these partitions is Δx y, and Δx comes from b - a, that is the total width, divided by n because there are n of these segments.
00:01:48.000 --> 00:01:55.000
Now on the trapezoidal rule, what we are going to do is label each one of these points on the x axis.
00:01:55.000 --> 00:02:04.000
This is x₀, x₁, x₂ all the way up to x < font size="-6" > n < /font > is b.
00:02:04.000 --> 00:02:07.000
That is where the next part of this formula comes from.
00:02:07.000 --> 00:02:27.000
x₀ is a, x₁ is a + ΔX because it is a and then you go over Δx, x₂ is a + 2 ΔX all the way up to x < font size="-6" > n < /font > is a + n Δx.
00:02:27.000 --> 00:02:36.000
But, of course a + n Δx is a + b - a/n.
00:02:36.000 --> 00:02:42.000
So, that is a + b -a which is b, so xn is the same as b
00:02:42.000 --> 00:02:52.000
We have labelled these points on the x axis, and what we are trying to do is approximate the area.
00:02:52.000 --> 00:02:59.000
What we do to approximate the area is we are going to use several different rules.
00:02:59.000 --> 00:03:03.000
The first one is called the trapezoidal rule.
00:03:03.000 --> 00:03:20.000
The trapezoidal rule means that you draw little trapezoids on each of these segments, and then you find the area of these trapezoids.
00:03:20.000 --> 00:03:38.000
The area of a trapezoid is = 1/2(base₁ × base₂ × height).
00:03:38.000 --> 00:03:45.000
That area of the trapezoid is reflected in this formula right here.
00:03:45.000 --> 00:04:03.000
The 1/2 gives you that 2 right there, the height of a trapezoid, that is the height, and that is the width of one of those trapezoids, and that is ΔX
00:04:03.000 --> 00:04:20.000
Then you have base₁ + base₂ is, I am going to show this in red, base₁ + base₂, that is for the first trapezoid.
00:04:20.000 --> 00:04:39.000
For the next trapezoid, base₁ + base₂, and so on, up to the last trapezoid, base₁ + base₂.
00:04:39.000 --> 00:04:47.000
What you are doing is you are plugging each of these x₀, x₁, x₂ into f to get these heights
00:04:47.000 --> 00:04:57.000
But you only have 1 of the end one and 2 of each of the middle ones.
00:04:57.000 --> 00:05:05.000
That is why you get 1 here, and two of each of the middle ones, and one of the end one.
00:05:05.000 --> 00:05:08.000
So, that is where the formula for the trapezoidal rule comes from.
00:05:08.000 --> 00:05:13.000
Let us try it out on an example.
00:05:13.000 --> 00:05:22.000
Example 1 is we are going to try to estimate the integral from 1 to 2 of sin(x) dX.
00:05:22.000 --> 00:05:30.000
Here is 1, and here is 2, and we are going to try to estimate that using n = 4.
00:05:30.000 --> 00:05:36.000
That means we are going to divide the region from 1 to 2 into 4 pieces.
00:05:36.000 --> 00:05:41.000
Using the formula for the trapezoid rule, we have Δx/2.
00:05:41.000 --> 00:05:52.000
Well Δx is (b - a)/n, so that is 1/4.
00:05:52.000 --> 00:06:25.000
Δx/2 is 1/8, so we are going to have 1/8 times f(x₀) + 2f(x₁) + 2f(x₂) + 2f(x₃) + only 1 of f(x₄).
00:06:25.000 --> 00:06:50.000
These x₀'s are the division points in between 1 and 2, so this x₀ is 1, so that is sin(1) + 2, now that is 1, x₁ × Δx is 1/4.
00:06:50.000 --> 00:07:10.000
x₂ can go over another unit of Δx, so that is 1 and 1/2, 1 and 3/4 and finally, sin(2).
00:07:10.000 --> 00:07:13.000
We are going to take all of that, and multiply it by 1/8.
00:07:13.000 --> 00:07:17.000
At this point it is simply a matter of plugging all of these values into a calculator.
00:07:17.000 --> 00:07:48.000
I have a TI calculator here, and I am going to plug in 1/8 sin(1) is 0.01745 + 2sin(1.25), which is 0.0281, and so on.
00:07:48.000 --> 00:07:56.000
You can plug the rest of the values into a calculator.
00:07:56.000 --> 00:08:06.000
What you get at the end simplifies down to 0.951462.
00:08:06.000 --> 00:08:23.000
So, we say that the integral from 1 to 2 of sin(x) dX is approximately = 0.951462
00:08:23.000 --> 00:08:28.000
Next rule we are going to learn is the midpoint rule.
00:08:28.000 --> 00:08:42.000
It is the same idea, where you have a function that you want to integrate from a to b, and you break the region up into partitions.
00:08:42.000 --> 00:08:53.000
So, you have x₀ = a, x < font size="-6" > n < /font > = b and a bunch of partitions in between, each partition is Δx y.
00:08:53.000 --> 00:09:02.000
Except, in each partition, instead of building trapezoids, we are going to build rectangles.
00:09:02.000 --> 00:09:08.000
We are going to build rectangles on the height of the middle of the partition.
00:09:08.000 --> 00:09:15.000
Here, we are going to look at the middle of the partition,
00:09:15.000 --> 00:09:24.000
We see how tall the function is at the middle of the partition and we build a rectangle that is that height.
00:09:24.000 --> 00:09:35.000
We do that on every rectangle.
00:09:35.000 --> 00:09:56.000
The formula we get in total is Δx, that is the width of the rectangles, times the height of these rectangles,
00:09:56.000 --> 00:10:16.000
I have labelled the midpoints of those rectangles x₁* and x₂* and x < font size="-6" > n < /font > *.
00:10:16.000 --> 00:10:22.000
Those represent these midpoints, so that is x₁*, there is x₂*, and so on.
00:10:22.000 --> 00:10:32.000
Those are the midpoints so x₁* is just x₀ + x₁/2, x₂* is just x₂ + x₂/2,
00:10:32.000 --> 00:10:40.000
And so on and those just represent the midpoints of each of these intervals.
00:10:40.000 --> 00:10:50.000
We plug those midpoints in to find the heights of the rectangles and estimate the area.
00:10:50.000 --> 00:11:03.000
What we are going to do for the last rule today, is we are going to use instead of the midpoints, we will use the left endpoints of each rectangle.
00:11:03.000 --> 00:11:17.000
Instead of having to find the midpoints, the x₁× and the x₂× and so on will be the left endpoint of each interval.
00:11:17.000 --> 00:11:20.000
We will use those to get the heights.
00:11:20.000 --> 00:11:22.000
We will see those in the second.
00:11:22.000 --> 00:11:26.000
First we will do an example with the midpoint rule using the same integral as before.
00:11:26.000 --> 00:11:38.000
Sin(x), there is 1, there is 2, again we are using n = 4 so we will break it up into 4 partitions.
00:11:38.000 --> 00:11:40.000
Except we are going to use a slightly different formula to solve it.
00:11:40.000 --> 00:11:55.000
Again, Δx = 1/4, because that is the width of each of these rectangles, but now we are going to look at the midpoints of those 4 rectangles to find the heights.
00:11:55.000 --> 00:12:11.000
The midpoints are, well, this is 1 right here, that is 1 and 1/4, the midpoint there is 1 and 1/8.
00:12:11.000 --> 00:12:20.000
The next midpoint is halfway between 1 and 1/4 and 1 and 1/2 and that is 1 and 3/8.
00:12:20.000 --> 00:12:51.000
The formula that we get is ΔX(f(1 + 1/8) + f(1 + 3/8) + f(1 + 5/8) + f(1 + 7/8) and that is just 1/4.
00:12:51.000 --> 00:13:20.000
Now the function here is sin(x) so we will be doing sin(1 + 1/8), that is 1.125, + sin(1 + 3/8), that is 1.375, sin(1 + 5/8) is 1.625, and sin(1 + 7/8) is 1.875.
00:13:20.000 --> 00:13:25.000
Now it is just an expression that we can plug into our calculator.
00:13:25.000 --> 00:13:47.000
I worked this out ahead of time, I got 0.958944
00:13:47.000 --> 00:13:55.000
That is our best approximation for the integral using the midpoint rule.
00:13:55.000 --> 00:14:00.000
The next formula we want to learn is the right and left endpoint rule.
00:14:00.000 --> 00:14:05.000
We will talk about the left endpoint rule first.
00:14:05.000 --> 00:14:09.000
It is pretty much the same as the midpoint rule.
00:14:09.000 --> 00:14:22.000
Again, you are drawing these rectangles except instead of using the midpoint to find the height of the rectangle, you are using the left endpoint.
00:14:22.000 --> 00:14:25.000
So that means you start out with the exact same formula,
00:14:25.000 --> 00:14:36.000
Except that the star points that you choose to plug in to find the heights are just the left endpoints, x₀, x₁, up to x < font size="-6" > n-1 < /font > .
00:14:36.000 --> 00:14:39.000
You do not go up to x < font size="-6" > n < /font > .
00:14:39.000 --> 00:14:45.000
For the right endpoint rule it is the same formula except you use the right endpoints.
00:14:45.000 --> 00:14:50.000
The right endpoint would be x₁, x₂, up to x < font size="-6" > n < /font > .
00:14:50.000 --> 00:14:56.000
You do not have x₀ anymore because that is the first endpoint of the left formula.
00:14:56.000 --> 00:15:02.000
Let me draw these in different colors here.
00:15:02.000 --> 00:15:12.000
The left endpoints give you x₀, x₁, up to x < font size="-6" > n-1 < /font > , so that is the left endpoint rule.
00:15:12.000 --> 00:15:28.000
The right endpoint, I will do that one in blue, is x₁, x₂, up to x < font size="-6" > n-1 < /font > , and x < font size="-6" > n < /font > .
00:15:28.000 --> 00:15:32.000
You are using the right endpoints so that is the right endpoint rule.
00:15:32.000 --> 00:15:34.000
We will do another example.
00:15:34.000 --> 00:15:47.000
Again we are going to figure out the integral, or estimate the integral of sin(x) from 1 to 2.
00:15:47.000 --> 00:16:04.000
We are going to use the left endpoint rule so that means the key points that we plug in for the heights are 1, 1 + 1/4, 1 + 1/2, and 1 + 3/4.
00:16:04.000 --> 00:16:15.000
Again Δx = 1/4 and our formula says Δx × f(left endpoint).
00:16:15.000 --> 00:16:30.000
So, f(1) + f(1 + 1/4) + f(1 + 1/2) + f(1 + 3/4).
00:16:30.000 --> 00:16:40.000
We do not go to 2 because that was the right endpoint of the left interval.
00:16:40.000 --> 00:16:50.000
The integral is approximately equal to that.
00:16:50.000 --> 00:17:02.000
That is sin(1) + sin(1 + 1/4) + sin(1 + 1/2) + sin(1 + 3/4).
00:17:02.000 --> 00:17:18.000
That is something that you can plug into your calculator, and when I did that ahead of time I got 0.942984.
00:17:18.000 --> 00:22:36.000
That is our estimation of that integral using the left endpoint rule.