A.
Composite Rectangle Rule
1. Let Z 2
I(f ) = (1 + x2 )e−x dx.
0
(a) Approximate I(f ) by the composite left rectangle rule with h = 0.25, compare
with a reference value, and compute the absolute error.
(b) Find the least integer n such that
ER = |I(f ) − IR | ≤ 10−3 .
2. Let Z 3
I(f ) = x ln(1 + x) dx.
1
(a) Approximate I(f ) by the composite left rectangle rule with n = 8, compare
with the exact value, and compute the absolute error.
(b) Find the least integer n such that
ER ≤ 10−4 .
3. Let Z 1 √
I(f ) = 1 + x4 dx.
0
(a) Approximate I(f ) by the composite left rectangle rule with h = 0.1, compare
with a reference value, and compute the absolute error.
(b) Find the least integer n such that
ER ≤ 10−3 .
B. Composite Midpoint Rule
1. Let
2
ex
Z
I(f ) = dx.
0 (1 + ex )3
(a) Approximate I(f ) by the composite midpoint rule with h = 0.2, and estimate
EM .
(b) Find the least integer n such that EM ≤ 10−4 .
2. Let Z π
13
I(f ) = cos x + x sin x dx.
0 2
(a) Approximate I(f ) by the composite midpoint rule with h = π8 , and estimate
EM .
(b) Find the least integer n such that EM ≤ 10−5 .
4
3. Let Z 1
I(f ) = ex (cos x + x sin x) dx.
0
(a) Approximate I(f ) by the composite midpoint rule with h = 0.2, compare with
the exact value, and compute the absolute error.
(b) Find the least integer n such that EM ≤ 10−3 .
C. Composite Trapezoidal Rule
1. Let Z 2
I(f ) = (x + 1) cos(2x) dx.
0
(a) Approximate I(f ) by the composite trapezoidal rule with h = 21 , and estimate
ET .
(b) Find the least integer n such that ET ≤ 10−3 .
2. Let Z 2
I(f ) = (1 + x)ex dx.
0
(a) Approximate I(f ) by the composite trapezoidal rule with h = 0.2, compare
with the exact value, and compute the absolute error.
(b) Find the least integer n such that ET ≤ 10−4 .
3. Let Z 1
1+x
I(f ) = dx.
0 1 + x + x2
(a) Approximate I(f ) by the composite trapezoidal rule with h = 0.2, and esti-
mate ET .
(b) Find the least integer n such that ET ≤ 10−5 .
D. Composite Simpson’s 1/3 Rule
1. Let Z 2
1+x
I(f ) = dx.
0 1 + 12x2
(a) Approximate I(f ) by Simpson’s 1/3 rule with n = 2m = 8, and estimate ES1/3 .
(b) Find the least even integer n such that ES1/3 ≤ 10−5 .
2. Let Z 1
2
I(f ) = (1 + x2 )ex dx.
−1
(a) Approximate I(f ) by Simpson’s 1/3 rule with h = 0.5, and estimate ES1/3 .
(b) Find the least even integer n such that ES1/3 ≤ 10−4 .
5
E. Finite Difference Formulas by Equating Coefficients
1. Develop, by equating coefficients, a formula for f ′′ (x) using only
f (x − 3h), f (x), f (x + 3h).
Find the truncation error. Then approximate f ′′ (0.5) with h = 0.05 for
ex
f (x) = .
1−x
Estimate the error.
2. Develop, by equating coefficients, a formula for f ′′ (x) using only
f (x − 4h), f (x), f (x + 4h).
Find the truncation error and the order of convergence. Then approximate f ′′ (π/2)
with h = π/8 for
f (x) = e−x sin(2x).
Estimate the error.
3. Develop, by equating coefficients, a formula for f ′ (x) using only
f (x − h), f (x), f (x + 3h).
Find the truncation error and the order of convergence. Then approximate f ′ (−0.5)
with h = 0.05 for
ex
f (x) = .
(1 + x)2
Estimate the error.
4. Develop, by equating coefficients, a formula for f ′ (x) using only
f (x − 9h), f (x), f (x + 3h).
Find the truncation error and the order of convergence. Then approximate f ′ (2)
with h = 0.1 for r
x+2
f (x) = .
x+1
Estimate the error.
5. Develop, by equating coefficients, a formula for f ′′ (x) using only
f (x − 2h), f (x), f (x + 2h).
Find the truncation error and the order of convergence. Then approximate f ′′ (1.5)
with h = 0.05 for
x
f (x) = .
1 + ln x
Estimate the error.
6
F. Central Difference Formula for the Second Derivative
1. Use the central difference formula to approximate f ′′ (π), where
f (x) = (1 + sin x)esin x ,
for h = π/8, π/4, π/2, respectively. Find the exact value of f ′′ (π), compute the
absolute error for each h, and verify the error estimate predicted by the theory.
2. Use the central difference formula to approximate f ′′ (0.5), where
2/3 3/2
x2
f (x) = 1 − x + ,
10
for h = 0.01, 0.1, 0.25, respectively. Find the exact value of f ′′ (0.5), compute the
absolute error for each h, and verify the error estimate predicted by the theory.
3. Use the central difference formula to approximate f ′′ (1), where
r
1
f (x) = x2 + 2x + ,
2
for h = 0.01, 0.1, 0.25, respectively. Find the exact value of f ′′ (1), compute the
absolute error for each h, and verify the error estimate predicted by the theory.