Welcome to a video on
Simpson's Rule Of Numerical Integration
When trying to evaluate a
definite integral analytically
sometimes it's very difficult
or even impossible to
determine a functions antiderivative.
And when analytic methods fail,
we can use a numerical approach
to approximate a definite integral.
And Simpson's Rule is a numerical method
to approximate a definite
integral that uses parabolas.
Let's take a look at how this works.
We've already discussed how to approximate
a definite integral using rectangles.
And you can see here we
were trying to approximate
this definite integral from
zero to four using two rectangles.
We've also discussed how to
approximate the definite
integral using trapezoids.
Using the Trapezoidal Rule as we see here.
Again you can see this is
a much better approximation
than using rectangles.
And Simpson's rule uses parabolas
to approximate definite integral.
Notice when we select Simpson's
Rule we have a parabola that
now spans across two
intervals rather than one.
And it looks like it's even
a better approximation than
even the Trapezoidal Rule.
And you can see the reason why is
because a degree two equation can curve.
Whereas using trapezoids we can only draw
straight lines across intervals.
Let's go take a look at one more function.
Again, here we're seeing on this interval
we're using two rectangles to
approximate the definite integral.
Next we have the Trapezoidal
Rule and then thirdly,
which we're discussing in
this video is Simpson's Rule.
And one of the things that I
want you to notice here is that
we use two intervals
to create this parabola
rather than one for
rectangles and trapezoids.
Let's go ahead and kind of develop
the idea of Simpson's Rule.
We won't be able to go
over all the details
because of the short video but hopefully
you'll be able to make
the important connections.
Again, we see a function
in blue and in red
we have a parabola through three points
spanning two intervals from
X sub zero to x sub two.
So what we're saying down here is that
the definite integral of the
function is approximately
equal to the definite integral of
p of x which is this quadratic function.
And if we were to integrate
ax squared plus bx plus c
with respect to x from
x sub zero to x sub two
we could show that it's equal
to all of this down here.
And we don't have time to
go through all that here
but what I want you to notice is just as
the trapezoidal rule,
we have a value out here
and in this case it's the width
of two intervals divided by six.
And notice inside these brackets the
coefficients are one, four, and then one.
So what's going to
happen is, when we start
summing the area under multiple parabolas
the next parabola is going to
share this common end point.
Let's go ahead and take a look at
the formula for Simpson's Rule.
Again, we can approximatethis
definite integral using
Simpson's Rule given by...
There's a few things I
want to point out here.
The first thing you'll
notice, on the previous screen
we had x two minus x
sub zero divided by six
instead of b minus a divided by three n.
Well remember that x two minus x sub zero
spanned two intervals where each interval
has a length of b minus a divided by n.
So if we take the width of one interval
and multiply it by two it would
equal x two minus x sub zero
and now you can see the
two and the six simplify
and this is where we come up with
b minus a divided by three n.
Next thing you'll notice
too on the previous screen.
The next thing you may have noticed is,
on the previous screen when
we're dealing with one parabola
the coefficients of the
functions were one, four, one.
And this value for x was,
x sub zero plus x sub two divided by two.
Well remember if you add
those and divide by two
you would get the average or
the midpoint or x sub one.
And one last thing the
previous example was just using
one parabola which had
coefficients of one, four, one.
Well if we use two parabolas the next one
would be one, four, one as well.
And so you'll notice that we
would use f of x sub two twice.
So we have a pattern of
one, four, two, four.
And then if we were done we'd have a one,
but if we continued we'd have another
two, another four, and then another one.
So that's where these
coefficients are coming from.
Okay, so I hope all of that makes sense.
There's a lot going on here.
And it can be shown but
not in ten minutes or less.
Let's go ahead and take
a look at an example.
We want to use Simpson's
Rule to approximate
the definite integral
where n is equal to four.
So we can see from our definite integral,
our integral is going
to be from one to three.
So we'll divide the integral from one
to three into four equal parts.
Here's one and here's three.
We'll divide it in half.
And then in half again.
Remember the width of each interval is
b minus a divided by n.
So we'd have three minus
one divided by four.
Which is equal to 1/2, or 0.5.
Now remember, so now even
though we are going to go ahead
and just use this formula remember that
to use Simpson's Rule we actually,
to use Simpson's Rule one
parabola is going to span
two intervals so we'd actually
be using two parabolas
to approximate this definite integral
on the integral from one to three.
Let's go ahead and see how
this formula is going to work.
So we have b minus a divided by three n.
B minus one divided by three times four.
All of this times f of x sub zero,
well x sub zero is one,
so we have f of one
plus notice the next coefficient is four,
so I have four times f of x sub one.
Well if we know that a is equal to one
and each interval has a width of 0.5
this would be f of 1.5.
Notice the next coefficient is two.
So plus two times f of two.
Again we're just adding
.5 to each x value.
So we have one, four,
two. Next we have four.
So plus four f of 2.5 and then
and our interval ends
at three so this is the
last function value so we go
back to a coefficient of one.
So f of three. So here
we have three minus one.
That'd be two over twelve or 1/6.
Let's use our calculator to determine
all of these function values.
So the first thing we'll
do is press y equals
and type in the function.
I've already done that.
Nine minus x squared.
Next we'll go back to the home screen.
And we're going to enter all of this in
using function notation, but
instead of f we'll use y one.
The way to do that is press
vars, right arrow, enter.
And we'll select y one by pressing enter.
So we have f of one, we'll
type in y one of one.
Plus four times, this
will be y one of 1.5.
Vars, right arrow, enter, enter.
And then in parenthesis 1.5 plus,
the next coefficient is two.
Vars, right arrow, enter, enter.
We just entered in an x value of 1.5.
So now we use an x value of
two plus four times f of 2.5.
And the last function
value was f of three.
So we'll type in y one of three.
Enter.
So this has value of 56.
So all of this is 56.
This is equal to 28/3 or 9 and 1/3.
Now let's go ahead and
compare our approximation
to the real value of
this definite integral.
And we can do that here by
pressing math, option nine.
So again, we typed in our integrand,
the variable x, the lower
limit of integration
and the upper limit of integration.
And in this case our answers
are exactly the same.
That doesn't always happen.
The reason it worked out
that way here is because
if you look at the original integrand,
it's a degree two equation.
So if we use a degree two
equation to approximate
the definite integral of
a degree two function,
of course, they will be the same.
Okay, Hope you found this video helpful.
Thank you and have a good day.
