222 CHAPTER 9. INTEGRATION

40. In the above Taylor’s formula, use Problem 32 on Page 220 to obtain the existenceof some z between x0 and x such that

f (x) = f (x0)+n

∑k=1

f (k) (x0)

k!(x− x0)

k +f (n+1) (z)(n+1)!

(x− x0)n+1 .

Hint: You might consider two cases, the case when x > x0 and the case when x < x0.

41. There is a general procedure for constructing methods of approximate integrationlike the trapezoid rule and Simpson’s rule. Consider [0,1] and divide this intervalinto n pieces using a uniform partition, {x0, · · · ,xn} where xi− xi−1 = 1/n for eachi. The approximate integration scheme for a function f , will be of the form(

1n

) n

∑i=0

ci fi ≈∫ 1

0f (x) dx

where fi = f (xi) and the constants, ci are chosen in such a way that the above sumgives the exact answer for

∫ 10 f (x) dx where f (x) = 1,x,x2, · · · ,xn. When this has

been done, change variables to write∫ b

af (y) dy = (b−a)

∫ 1

0f (a+(b−a)x) dx

≈ b−an

n

∑i=1

ci f(

a+(b−a)(

in

))=

b−an

n

∑i=1

ci fi

where fi = f(a+(b−a)

( in

)). Consider the case where n = 1. It is necessary to find

constants c0 and c1 such that

c0 + c1 = 1 =∫ 1

01dx, 0c0 + c1 = 1/2 =

∫ 1

0xdx.

Show that c0 = c1 = 1/2, and that this yields the trapezoid rule. Next take n = 2 andshow the above procedure yields Simpson’s rule. Show also that if this integrationscheme is applied to any polynomial of degree 3 the result will be exact. That is,

12

(13

f0 +43

f1 +13

f2

)=∫ 1

0f (x) dx

whenever f (x) is a polynomial of degree three. Show that if fi are the values of f ata, a+b

2 , and b with f1 = f( a+b

2

), it follows that the above formula gives

∫ ba f (x) dx

exactly whenever f is a polynomial of degree three. Obtain an integration schemefor n = 3.

42. Let f have four continuous derivatives on [xi−1,xi+1] where xi+1 = xi−1 + 2h andxi = xi−1 + h. Show using Problem 40, there exists a polynomial of degree three,p3 (x) , such that

f (x) = p3 (x)+14!

f (4) (ξ )(x− xi)4

Now use Problem 41 and Problem 38 to conclude∣∣∣∣∫ xi+1

xi−1

f (x) dx−(

h fi−1

3+

h fi43

+h fi+1

3

)∣∣∣∣< M4!

2h5

5,

22240.Al.42.CHAPTER 9. INTEGRATIONIn the above Taylor’s formula, use Problem 32 on Page 220 to obtain the existenceof some z between xg and x such thatFO (0) (yyy LY)n+lk! y+ (n+1)! :(x —x0)fo) =o) +¥,k=1Hint: You might consider two cases, the case when x > xo and the case when x < xo.There is a general procedure for constructing methods of approximate integrationlike the trapezoid rule and Simpson’s rule. Consider [0,1] and divide this intervalinto n pieces using a uniform partition, {xo,--- ,x,} where x; —x;-; = 1/n for eachi. The approximate integration scheme for a function f, will be of the form(5) Zevi~ [roveswhere f; = f (x;) and the constants, c; are chosen in such a way that the above sumgives the exact answer for Io f (x) dx where f (x) = 1,x,x?,-+-,x”. When this hasbeen done, change variables to write(ba) | Flat (b—a)x) ax[rove2nwhere f; = f (a+ (b—a) (4)) . Consider the case where n = 1. It is necessary to findconstants cg and c; such that1 1corer =1= ldx, aber =1/2= | ax,0 0Show that co = c; = 1/2, and that this yields the trapezoid rule. Next take n = 2 andshow the above procedure yields Simpson’s rule. Show also that if this integrationscheme is applied to any polynomial of degree 3 the result will be exact. That is,1/1 4 1 |5 (jr git sh) =f Sf (x) dxwhenever f (x) is a polynomial of degree three. Show that if f; are the values of f ata, “#2, and b with fi = f (4£2), it follows that the above formula gives [? f (x) dxexactly whenever f is a polynomial of degree three. Obtain an integration schemeforn = 3.Let f have four continuous derivatives on [x;-1,xi+1] where xj41 = x;-1 + 2h andXj = xj-1 +h. Show using Problem 40, there exists a polynomial of degree three,p3 (x), such that£00) = pala) + GF (6) (xm)Now use Problem 41 and Problem 38 to concludeSid hfi-, hfid fix. \| — M2k°dx — <a[ seoax (“4 a | 4! 5”