Docsity

Math 128A Homework 5: Integration Techniques & Error Analysis, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Math 128A, Spring 2007
Homework 5 Solution
5.2.8 (a) I(f) = Rb
af(x)dx ≈Rb
af((a+b)/2)dx = (b−a)f((a+b)/2) = M1(f).
(b) If we subdivide [a, b] into nsubintervals a=x0< x1<· · · < xn=b
with xi+1 =xi+hand apply M1to each subinterval, we get
I(f) = Zb
a
f(x)dx
=Zx1
x0
f(x)dx +· · · +Zxn
xn−1
f(x)dx
≈(x1−x0)f((x0+x1)/2) + · · · + (xn−xn−1)f((xn−1+xn)/2)
=hf(a+h/2) + · · · +hf (a+ (n−1/2)h)
(c) M1(1/(1 + x)) = 2/3≈.6667 and M2(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) = Zb
a
f(x)dx
≈Zb
a
P4(x)dx
=Zb
a
[f(x0)L0(x) + · · · +f(x4)L4(x)]dx
=C0f(x0) + · · · +C4f(x4)
where Ci=Rb
aLi(x)dx. These integrals are easily evaluated (but it is very
tedious!), and you get Boole’s rule.
(b) B4(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 M2(1/(1 + x)) from problem 8.
1

Partial preview of the text

Download Math 128A Homework 5: Integration Techniques & Error Analysis and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

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.