Int 1 Merged
Int 1 Merged
Int 1 Merged
= 7.389
𝑥−3
(4) 𝑦 = ,4≤𝑥≤9
√𝑥
Solution:
1 𝑏
𝑀= ∫ 𝑓(𝑥) 𝑑𝑥
𝑏−𝑎 𝑎
1 9 𝑥−3
= ∫4 𝑑𝑥
9−4 √𝑥
1 9 𝑥 3
= ∫4 ( √𝑥 − √𝑥 ) 𝑑𝑥
5
1 9 3
= ∫4 ( √𝑥 − √𝑥 ) 𝑑𝑥
5
3
1 2 9
= [ 𝑥 2 − 6 √𝑥 ]
5 3 4
1 2 2
= [( ∗ 27 − 6 ∗ 3) − ( ∗ 8 − 6 ∗ 2)]
5 3 3
1 −20
= [0 − ( )]
5 3
4
=
3
Midpoint Rule
- 101 -
We will denote each of the intervals as follows,
[𝑥0 , 𝑥1 ], [𝑥1 , 𝑥2 ], … , [𝑥𝑛−1 , 𝑥𝑛 ] where 𝑥0 = 𝑎 and 𝑥𝑛 = 𝑏
Then for each interval let 𝒙∗𝒊 be the midpoint of the interval. We then
sketch in rectangles for each subinterval with a height of 𝒇(𝒙∗𝒊 ).
We can easily find the area for each of these rectangles and so for a
general 𝑛 we get that,
𝑏
∫𝑎 𝑓(𝑥) 𝑑𝑥 ≈ ℎ 𝑓(𝑥1∗ ) + ℎ 𝑓(𝑥2∗ ) + ⋯ + ℎ 𝑓(𝑥𝑛∗ )
𝑏
∫𝑎 𝑓(𝑥) 𝑑𝑥 ≈ ℎ 𝑓(𝑥1∗ ) + 𝑓(𝑥2∗ ) + ⋯ + 𝑓(𝑥𝑛∗ )൨
Trapezoid Rule
- 102 -
Then on each subinterval we will approximate the function with a
straight line that is equal to the function values at either endpoint of
the interval.
Note that all the function evaluations, with the exception of the first
and last, are multiplied by 2.
- 103 -
Simpson’s Rule
This is the final method we’re going to take a look at and in this case
we will again divide up the interval [𝒂, 𝒃] into 𝑛 subintervals
. However unlike the previous two methods we need to require
that 𝑛 be even. The reason for this will be evident in a bit. The width
of each subinterval is,
𝒃−𝒂
ℎ=
𝒏
- 104 -
ℎ
[ 𝑓(𝑥2 ) + 4 𝑓(𝑥3 ) + 𝑓(𝑥4 )] + ⋯ +
3
ℎ
[ 𝑓(𝑥𝑛−2 ) + 4 𝑓(𝑥𝑛−1 ) + 𝑓(𝑥𝑛 )]
3
𝑏 ℎ
∫𝑎 𝑓(𝑥) 𝑑𝑥 ≈ 𝑓 (𝑥0 ) + 4 𝑓(𝑥1 ) + 2 𝑓(𝑥2 ) + ⋯ +
3
In this case notice that all the function evaluations at points with odd
subscripts are multiplied by 4 and all the function evaluations at
points with even subscripts (except for the first and last) are
multiplied by 2. If you can remember this, this is a fairly easy rule to
remember.
Midpoint Rule
= 14.4856
Error = |14.4856 − 16.4526| = 1.967
Trapezoid Rule
2 2 ℎ
∫0 𝑒 𝑥 𝑑𝑥 ≈ 2 𝑓(𝑥0 ) + 2 (𝑓(𝑥1 ) + 𝑓(𝑥2 ) + 𝑓(𝑥3 )) + 𝑓(𝑥4 )൨
0.5
≈ 1 + 2 (1.2840 + 2.7183 + 9.4877) + 54.5982൨
2
= 20.6446
Error = |20.6446 − 16.4526 | = 4.192
Simpson’s Rule
2 2 ℎ
∫0 𝑒 𝑥 𝑑𝑥 ≈ 3 𝑓(𝑥0 ) + 4 (𝑓(𝑥1 ) + 𝑓(𝑥3 )) + 2( 𝑓(𝑥2 )) + 𝑓(𝑥4 )൨
0.5
≈ 1 + 4 (1.2840 + 9.4877) + 2(2.7183) + 54.5982൨
3
= 17.3536
Error = |17.3536 − 16.4526 | = 0.901
- 106 -
The best approximation in this case is from the Simpson’s Rule. To
get a better estimation we would need to use a larger 𝑛. So, for
completeness sake here are the estimates for some larger value of 𝑛.
𝑥 2 3 4 5 6 7 8 9 10
1 1 1 1 1 1 1 1 1
𝑓(𝑥)
2 3 4 5 6 7 8 9 10
Trapezoid Rule
- 107 -
10 1 ℎ
∫2 𝑑𝑥 ≈ 𝑓(𝑥0 ) + 2 (𝑓(𝑥1 ) + ⋯ + 𝑓(𝑥7 )) + 𝑓(𝑥8 )൨ ≈
𝑥 2
1 1 1 1 1 1 1 1 1 1
[ +2( + + + + + + ) + 10]
2 2 3 4 5 6 7 8 9
= 1.6290
Error = |1.6290 − 1.6094 | = 0.0196
Simpson’s Rule
10 1 ℎ
∫2 𝑑𝑥 ≈ 𝑓(𝑥0 ) + 4 (𝑓(𝑥1 ) + 𝑓(𝑥3 ) + 𝑓(𝑥5 ) + 𝑓(𝑥7 )) +
𝑥 3
1 1 1 1 1 1 1 1 1
≈ 1 + 4 ( + + + )+ 2( 4 + + ) + 10൨
3 3 5 7 9 6 8
= 1.6108
Error = |1.6108 − 1.6094| = 0.0014
𝜋 1 𝑑𝑥
Example 4.40 Find the value of 𝜋 form = ∫0 using the Simpson’s
4 1+𝑥 2
Rule and 𝑛 = 5.
Solution:
1−0 1 𝑏−𝑎
= = = 0.2 ℎ =
5 5 𝑛
- 108 -