Upload
kaylin-crull
View
218
Download
2
Embed Size (px)
Citation preview
© Boardworks Ltd 20061 of 54
Co
nte
nts
© Boardworks Ltd 20061 of 54
Using graphs to solve equations
The change-of-sign rule
Solving equations by iteration
Review of the trapezium rule
Simpson's rule
Examination-style questions
Simpson's rule
© Boardworks Ltd 20062 of 54
Simpson's rule
When we used the trapezium rule we split the area that we were trying to find equal strips and then fitted straight lines to the curve. This led to approximations that often had a large percentage error.
Simpson's rule also works by dividing the area to be found into equal strips, but instead of fitting straight lines to the curve we fit parabolas.
The general form of a parabolic curve is y = ax2 + bx + c.
If we are given the coordinates of any three non-collinear points we can draw a parabola through them.
We can find the equation of this parabola using the three points to give us three equations in the three unknowns, a, b and c.
© Boardworks Ltd 20063 of 54
Defining a parabola using three points
© Boardworks Ltd 20064 of 54
Simpson’s rule
Consider the following parabola passing through the three points P, Q and R with coordinates (–h, y0),(0, y1) and (h, y2).
If we take the equation of the parabola to be y = ax2 + bx + c then we can write the area, A, of the two strips from –h to h as:
x0
y
y0 y1 y2
P Q
RWe can use these points to define the area, A, divided by the ordinates y0, y1 and y2, into two strips of equal width, h.
–h h
2= ( + + )h
hA ax bx c dx
3 21 1
3 2= + +h
hax bx cx
3 2 3 21 1 1 13 2 3 2= ( + + ) ( + )ah bh ch ah bh ch
323= + 2ah ch
A
© Boardworks Ltd 20065 of 54
Simpson’s rule
We can find a and c using the points (–h, y0), (0, y1) and (h, y2) to write three equations:
When y = y0 and x = –h :
y0 = a(–h)2 + b(–h) + c = ah2 – bh + c
y1 = c
y2 = ah2 + bh + c
When y = y1 and x = 0:
When y = y2 and x = h :
Adding the first and last equations together gives:
y0 + y2 = 2ah2 + 2c
y0 + y2 = 2ah2 + 2y1
Since c = y1
© Boardworks Ltd 20066 of 54
Simpson’s rule
So,
We can now use this to write the area, A, in terms of the ordinates y0, y1 and y2:
In general, the area under any quadratic function, q(x), divided into two equal strips from x = a to x = b is given by:
2ah2 = y0 + y2 – 2y1
323= + 2A ah ch
It is best not to isolate a because we actually want an expression for .32
3 ah
0 2 1 113= ( + 2 )+ 2h y y y hy
0 2 1 113= ( + 2 + 6 )h y y y y
0 1 213= ( + 4 + )h y y y
q 0 1 213( ) = ( + 4 + )
b
ax h y y y
where h = .2
b a
© Boardworks Ltd 20067 of 54
Simpson’s rule
This forms the basis of Simpson’s rule where we divide the area under a curve into an even number of strips and fit a parabola to the curve across every pair of strips.The area of each pair of strips is taken to be approximately:
If there are four strips (with 5 ordinates) the area will be:
0 1 213 ( + 4 + )h y y y
0 1 2 2 3 413 ( + 4 + )+ ( + 4 + )h y y y y y y
0 1 2 3 413= ( + 4 + 2 + 4 + )h y y y y y
Adding another pair of strips would give the area as:
0 1 2 3 4 5 613 ( + 4 + 2 + 4 + 2 + 4 + )h y y y y y y y
0 1 3 2 413= ( + 4( + )+ 2 + )h y y y y y
0 1 3 5 2 4 613= ( + 4( + + )+ 2( + )+ )h y y y y y y y
© Boardworks Ltd 20068 of 54
Simpson’s rule
In general, for n strips the approximate area under the curve y = f(x) between the x-axis and x = a and x = b is given by:
Where n is an even number and .
This can be more easily remembered as:
f 0 1 3 1 2 4 213( ) ( + + 4( + +...+ )+ 2( + +...+ ))
b
n n nax dx h y y y y y y y y
13 h (yfirst + ylast + 4(sum of yodds) + 2(sum of yevens))
This is Simpson’s rule.
Don’t forget that Simpson’s rule can only be used with an even number of strips (or an odd number of ordinates).
n
abh
© Boardworks Ltd 20069 of 54
x
y
0
Simpson’s rule
Let’s apply Simpson’s rule to approximate the area under the curve y = e–2x between x = 0, x = 2 and the x-axis.
Let’s use four strips as we did when we approximated this area before.
2
y = e–2x
12
y1
1
y2
32
y3 y4
y0
These five points define two parabolas over each pair of strips.
The coordinates of the five points can be found using a table:
1
210x2= xy e 1e
12
32
2e 3e 4e
© Boardworks Ltd 200610 of 54
Simpson’s rule
Using Simpson’s rule with h = gives:1 2
0
xe dx 4 1 3 211+ + 4( + )+ 2
6e e e e
= 0.493 (to 3 s.f.)
12
When we calculated this area using the same number of strips with the trapezium rule we obtained an area of 0.531 (to 3 s.f.).
This result had a percentage error of 8.15%.
Comparing the area given by Simpson’s rule to the actual area gives us a percentage error of:
0.493 0.491×100%
0.491
= 0.41%
Therefore, Simpson’s rule is much more accurate than the trapezium rule using the same number of strips.
© Boardworks Ltd 200611 of 54
Co
nte
nts
© Boardworks Ltd 200611 of 54
Using graphs to solve equations
The change-of-sign rule
Solving equations by iteration
Review of the trapezium rule
Simpson's rule
Examination-style questions
Examination-style questions
© Boardworks Ltd 200612 of 54
Examination-style question 1
a) Use Simpson's rule with five ordinates to find an approximate value for
to 3 decimal places.
b) Use integration by parts to find the exact value of the definite integral given in part a).
c) Give the percentage error of the approximation found in part a) to 2 decimal places.
3 2
1lnx x dx
a) If there are five ordinates there are four strips. The width of each strip is therefore
3 1= =
4h
1
2
© Boardworks Ltd 200613 of 54
Examination-style question 1
Using Simpson's rule:
321x2= lny x x
32
52
0 9 34 2ln 4ln2 25 5
4 2ln 9ln3
3 20 1 2 3 41
ln ( + 4 + 2 + 4 + )3
hx x dx y y y y y
9 3 25 54 2 4 2
1= (0 + 4( ln )+ 2(4ln2)+ 4( ln )+ 9ln3)
6
6.998 (to 3 d= .p.)
b) Let and = lnu x 2=dv
xdx
So and1
=du
dx x
3
=3
xv
© Boardworks Ltd 200614 of 54
Examination-style question 1
Integrating by parts:
c) The percentage error is
33 23 32
1 11
ln = ln3 3
x xx x dx x dx
33
1
= (9ln3 0)9
x
19= 9ln3 3
6.776 (to 3 d= .p.)
6.998 6.776×100% =
6.776
3.28%