
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to problem 5.2.8 and 5.2.10 in the math 128a, spring 2007 course. It covers the application of the midpoint rule (m1) and simpson's rule (p4) for approximating definite integrals, as well as the error analysis for these methods. The document also includes the comparison of the approximated values with the exact integral value for the function 1/(1+x).
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Math 128A, Spring 2007
Homework 5 Solution
5.2.8 (a) I(f ) =
∫ (^) b a f^ (x)dx^ ≈^
∫ (^) b a f^ ((a^ +^ b)/2)dx^ = (b^ −^ a)f^ ((a^ +^ b)/2) =^ M^1 (f^ ). (b) If we subdivide [a, b] into n subintervals a = x 0 < x 1 < · · · < xn = b with xi+1 = xi + h and apply M 1 to each subinterval, we get
I(f ) =
∫ (^) b
a
f (x)dx
∫ (^) x 1
x 0
f (x)dx + · · · +
∫ (^) xn
xn− 1
f (x)dx
≈ (x 1 − x 0 )f ((x 0 + x 1 )/2) + · · · + (xn − xn− 1 )f ((xn− 1 + xn)/2) = hf (a + h/2) + · · · + hf (a + (n − 1 /2)h)
(c) M 1 (1/(1 + x)) = 2/ 3 ≈ .6667 and M 2 (1/(1 + x)) = 2/5 + 2/ 7 ≈ .6857, while I = log 2 ≈ .6931.
5.2.10 (a) Following the derivation of Simpson’s rule,
I(f ) =
∫ (^) b
a
f (x)dx
∫ (^) b
a
P 4 (x)dx
∫ (^) b
a
[f (x 0 )L 0 (x) + · · · + f (x 4 )L 4 (x)]dx
= C 0 f (x 0 ) + · · · + C 4 f (x 4 )
where Ci =
∫ (^) b a Li(x)dx. These integrals are easily evaluated (but it is very tedious!), and you get Boole’s rule. (b) B 4 (1/(1+x)) = (2/45)∗(1/4)∗(7+32∗ 4 /5+13∗ 2 /3+32∗ 4 /7+7∗ 1 /2) ≈ .7006. This is just a little worse than M 2 (1/(1 + x)) from problem 8.