01.06.2015 Views

Chapter 4 Numerical Differentiation And Integration

Chapter 4 Numerical Differentiation And Integration

Chapter 4 Numerical Differentiation And Integration

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Chapter</strong> 4<br />

<strong>Numerical</strong> <strong>Differentiation</strong> <strong>And</strong><br />

<strong>Integration</strong><br />

Divided the interval [a,b],<br />

a = x 0 < x 1 < ... < x n−1 < x n = b,<br />

x k = a + kh, h = b − a<br />

n<br />

4.1 The Trapezoidal Rule<br />

Assume f ∈ C 2 [a,b]. The trapezoidal rule on subinterval [x k ,x k+1 ] is defined as:<br />

∫ xk+1<br />

∫ xk+1<br />

f(x)dx = p 1 (f;x)dx +<br />

x k x k<br />

∫ xk+1<br />

x k<br />

R 1 (x)dx<br />

p 1 (f;x) = f k + (x − x k )f[x k ,x k+1 ]<br />

R 1 (x) = (x − x k )(x − x k+1 ) f ′′ (ξ(x))<br />

, ξ(x) ∈ [x k ,x k+1 ]<br />

2<br />

Using the mean value theorem, the error term of trapezoidal rule is obtained<br />

∫ xk+1<br />

x k<br />

R 1 (x)dx = f ′′ (ξ k )<br />

2<br />

∫ xk+1<br />

x k<br />

(x − x k )(x − x k+1 )dx<br />

= − 1 12 h3 f ′′ (ξ k ), x k ≤ ξ k ≤ x k+1<br />

1


Then the trapezoidal rule is rewritten as:<br />

∫ xk+1<br />

The composite trapezoidal rule<br />

∫ b<br />

a<br />

f(x)dx =<br />

x k<br />

f(x)dx = h 2 (f k + f k+1 ) − 1 12 h3 f ′′ (ξ k )<br />

n−1 ∑<br />

k=0<br />

∫ xk+1<br />

x k<br />

f(x)dx<br />

= h 2 (f 0 + 2f 1 + ... + 2f n−1 + f n ) − 1 n−1 ∑<br />

12 h3<br />

The error term of composite trapezoidal integration rule is<br />

En T (f) = − 1 n−1 ∑<br />

12 h3 f ′′ (ξ k ) = − 1 [ 1<br />

12 h2 (b − a)<br />

n<br />

k=0<br />

= − 1 12 h2 (b − a)f ′′ (ξ)<br />

n−1 ∑<br />

k=0<br />

k=0<br />

f ′′ (ξ k )<br />

f ′′ (ξ k )<br />

]<br />

4.2 Simpson’s Rule<br />

f ′′ (ξ) = maxf ′′ (ξ k ), a ≤ ξ ≤ b.<br />

Assume f ∈ C 4 [a,b]. The Simpson’s rule on subinterval [x k ,x k+2 ] is defined as:<br />

∫ xk+2<br />

∫ xk+2<br />

f(x)dx = p 2 (f;x)dx +<br />

x k x k<br />

∫ xk+2<br />

x k<br />

R 2 (x)dx<br />

p 2 (f;x) = f k + (x − x k )f[x k ,x k+1 ] + (x − x k )(x − x k+1 )f[x k ,x k+1 ,x k+2 ]<br />

R 2 (x) = (x − x k )(x − x k+1 )(x − x k+2 )f[x k ,x k+1 ,x k+2 ,x]<br />

Note that, since (x − x k )(x − x k+1 )(x − x k+2 ) changes sign at x = x ± k+1 , it can not use<br />

the mean value theorem to obtain the error term, so define<br />

∫ x<br />

w(x) = (t − x k )(t − x k+1 )(t − x k+2 )dt<br />

x k<br />

w ′ (x) = (x − x k )(x − x k+1 )(x − x k+2 )<br />

2


Then w(x k ) = w(x k+2 ) = 0 and w(x) > 0 for x k < x < x k+2 . Therefore, the error term<br />

is obtained by integral by part and the mean value theorem<br />

∫ xk+2<br />

x k<br />

R 2 (x)dx =<br />

= −<br />

∫ xk+2<br />

x k<br />

∫ xk+2<br />

x k<br />

w ′ (x)f[x k ,x k+1 ,x k+2 ,x]dx<br />

w(x)f[x k ,x k+1 ,x k+2 ,x,x]dx<br />

= −f[x k ,x k+1 ,x k+2 ,ξ,ξ]<br />

= − 1 [ ] 4<br />

24 f(4) (ξ k )<br />

15 h5<br />

∫ xk+2<br />

x k<br />

w(x)dx<br />

∫ xk+2<br />

x k<br />

f(x)dx = h 3 (f k + 4f k+1 + f k+2 ) − 1 90 h5 f (4) (ξ k ), x k < ξ k < x k+2<br />

The composite Simpson’s rule for even n<br />

∫ b<br />

f(x)dx = h 3 (f 0 + 4f 1 + 2f 2 + 4f 3 + 2f 4 + ... + 4f n−1 + f n )<br />

a<br />

− 1<br />

180 h4 (b − a)f (4) (ξ).<br />

Note that the Simpson’s rule is exact for polynomial of degree ≤ 3.<br />

4.3 Newton-Cotes <strong>Integration</strong> Formulas<br />

∫ b<br />

∫ b n∑<br />

n∑<br />

I n (f) = p n (f;x)dx = l j,n (x)f(x j ) = w j,n f(x j )<br />

a<br />

a<br />

j=0<br />

j=0<br />

w j,n =<br />

∫ b<br />

a<br />

l j,n (x),<br />

j = 0, 1,...,n<br />

n = 1 I 1 = h [f(a) + f(b)] −h3<br />

2<br />

12 f ′′ (ξ)<br />

n = 2 I 2 = h [f(a) + 4f(a + h) + f(b)] −h5<br />

3<br />

90 f(4) (ξ)<br />

n = 3 I 3 = 3h 8<br />

[f(a) + 3f(a + h) + 3f(a + 2h) + f(b)] −3h5<br />

80 f(4) (ξ)<br />

3


Theorem 4.1 (a) For n even, assume f(x) ∈ C n+2 [a,b]. Then<br />

I(f) − I n (f) = C n h n+3 f (n+2) (η),<br />

C n =<br />

η ∈ [a,b]<br />

∫<br />

1 n<br />

µ 2 (µ − 1)...(µ − n)dµ<br />

(n + 2)! 0<br />

(b) For n odd, assume f(x) ∈ C n+1 [a,b]. Then<br />

proof :<br />

I(f) − I n (f) = C n h n+2 f (n+1) (η),<br />

C n =<br />

E n (f) = I(f) − I n (f) =<br />

η ∈ [a,b]<br />

∫<br />

1 n<br />

µ(µ − 1)...(µ − n)dµ<br />

(n + 1)! 0<br />

∫ b<br />

a<br />

(x − x 0 )(x − x 1 )...(x − x n )f[x 0 ,x 1 ,...,x n ,x]dx<br />

If n odd then (x − x 0 )(x − x 1 )...(x −x n ) is unchange sign on [a,b]. Using the mean value<br />

theorem we obtain the (b) easily. If n even, define<br />

w(x) =<br />

∫ x<br />

a<br />

(t − x 0 )(t − x 1 )...(t − x n )dt, w ′ (x) = (x − x 0 )(x − x 1 )...(x − x n ).<br />

Then w(a) = w(b) = 0 and w(x) > 0 for x ∈ [a,b]. Using the integral by part and the<br />

mean value theorem we obtain the error term<br />

E n (f) =<br />

∫ b<br />

a<br />

w ′ (x)f[x 0 ,x 1 ,...,x n ,x]dx = −<br />

= −f[x 0 ,x 1 ,...,x n ,ξ,ξ]<br />

= − f(n+2) (η)<br />

(n + 2)!<br />

∫ b<br />

a<br />

w(x)dx =<br />

∫ b ∫ x<br />

a<br />

a<br />

∫ b ∫ b<br />

a t<br />

∫ xn<br />

This completes the proof of theorem.<br />

∫ b<br />

a<br />

w(x)dx,<br />

∫ b<br />

a<br />

w(x)f[x 0 ,x 1 ,...,x n ,x,x]dx<br />

a ≤ ξ ≤ b<br />

(t − x 0 )(t − x 1 )...(t − x n )dtdx<br />

(t − x 0 )(t − x 1 )...(t − x n )dxdt<br />

= (t − x 0 )(t − x 1 )...(t − x n )(x n − t)dt<br />

x 0<br />

∫ n<br />

= −h n+3 µ(µ − 1)...(µ − n) 2 dµ<br />

0<br />

∫ n<br />

= −h n+3 µ 2 (µ − 1)...(µ − n)dµ<br />

0<br />

4


4.4 The Midpoint Rule<br />

Using Taylor’s expansion for f(x) ∈ C 2 [a,b] at c = (b + a)/2<br />

∫ b<br />

a<br />

f(x) = f(c) + f ′ (c)(x − c) + f ′′ (η)<br />

(x − c) 2 , a ≤ η ≤ b<br />

2<br />

f(x)dx =<br />

∫ b<br />

a<br />

f(c)dx +<br />

∫ b<br />

a<br />

f ′ (c)(x − c)dx +<br />

(b − a)3<br />

= (b − a)f(c) + 0 + f ′′ (η)<br />

24<br />

Then we obtain the midpoint integration formula<br />

∫ b<br />

a<br />

f(x)dx = (b − a)f( b + a<br />

2<br />

(b − a)3<br />

) + f ′′ (η),<br />

24<br />

∫ b<br />

a<br />

f ′′ (η)<br />

(x − c) 2 dx<br />

2<br />

η ∈ [a,b]<br />

For the composite midpoint rule define x j = a + (j − 1 )h, j = 1, 2,...,n, the midpoints of<br />

2<br />

[a + (j − 1)h,a + jh]. Then<br />

∫ b<br />

a<br />

f(x)dx = h[f 1 + f 2 + ... + f n ] +<br />

(b − a)h2<br />

f ′′ (η),<br />

24<br />

η ∈ [a,b]<br />

4.5 Gauss-Legendre Quadrature<br />

The generality integration formulas<br />

n∑<br />

I n (f) = w j,n f(x j,n ) =<br />

.<br />

j=1<br />

∫ b<br />

a<br />

w(x)f(x)dx = I(f) (4.5.1)<br />

The weight function w(x) is assumed to be nonnegative and integrable on [a,b]. The<br />

special case w(x) = 1,<br />

∫ 1<br />

f(x)dx . n∑<br />

= w j f(x j )<br />

−1<br />

j=1<br />

The weight {w j } and nodes {x j } are to be determined to make the error<br />

∫ 1<br />

n∑<br />

E n (f) = f(x)dx − w j f(x j )<br />

−1<br />

j=1<br />

equal zero for as high a degree polynomial f(x) as possible. Note that E n (f) = 0 for<br />

every polynomial of degree ≤ m if and only if E n (x i ) = 0, i = 0, 1,...,m.<br />

5


(1) n=1. Since there are two parameters w 1 and x 1 , we consider<br />

E n (1) = 0, E n (x) = 0<br />

∫ 1<br />

−1<br />

1dx − w 1 = 0,<br />

∫ 1<br />

−1<br />

xdx − w 1 x 1 = 0<br />

This implies w 1 = 2 and x 1 = 0. Thus the formula is the midpoint rule,<br />

∫ 1<br />

f(x)dx = . 2f(0)<br />

−1<br />

(2) n=2. There are four parameters w 1 , w 2 , x 1 , x 2 and thus we put four constraints on<br />

these parameters:<br />

E n (x i ) =<br />

∫ 1<br />

−1<br />

x i dx − [w 1 x i 1 + w 2 x i 2] = 0, i = 0, 1, 2, 3<br />

These lead to the unique formula,<br />

∫ 1<br />

f(x)dx = . f(− √ 3/3) + f( √ 3/3)<br />

−1<br />

(3) For a general n there are 2n free parameters {x i } and {w i }. The equations to be<br />

solved are<br />

E n (x i ) = 0, i = 0, 1, 2,..., 2n − 1<br />

These are nonlinear equations, and their solvability is not at all obvious.<br />

The quadrature formula (4.5.1) has degree of exactness d if E n (f) = 0 for all f ∈ P d .<br />

We call (4.5.1) interpolatory if it has degree of exactness d = n − 1. The interpolatory<br />

formula is precisely for which<br />

n∑<br />

∫ b<br />

w j f(x j ) = p n−1 (f;x 1 ,...,x n ;x)w(x)dx<br />

j=1<br />

a<br />

n∑<br />

n∏ x − x k<br />

p n−1 (x) = l j (x)f(x j ), l j (x) =<br />

j=1<br />

k=1,k≠j<br />

x j − x k<br />

w j =<br />

∫ b<br />

a<br />

l j (x)w(x)dx,<br />

j = 1, 2,...,n.<br />

6


Theorem 4.2 Given an integer k with 0 ≤ k ≤ n the quadrature formula (4.5.1) has<br />

degree of exactness d = n−1+k if and only if both of the following conditions are satisfied<br />

(a) The formula (4.5.1) is interpolatory.<br />

(b) The node polynomial ω n (x) = ∏ n<br />

j=1 (x − x j ) satisfies<br />

∫ b<br />

a<br />

ω n (x)p(x)w(x)dx = 0,<br />

∀ p ∈ P k−1<br />

proof : (⇒) Since d = n − 1 + k ≥ n − 1, condition (a) is trivial. For any p(x) ∈ P k−1 ,<br />

ω n (x)p(x) ∈ P n−1+k , hence<br />

∫ b<br />

n∑<br />

ω n (x)p(x)w(x)dx = w j ω n (x j )p(x j ) = 0<br />

a<br />

j=1<br />

since ω n (x j ) = 0, for j = 1, 2,...,n.<br />

(⇐) Given any p(x) ∈ P n−1+k divide it by ω n (x), so that<br />

p(x) = q(x)ω n (x) + r(x),<br />

q ∈ P k−1 , r ∈ P n−1<br />

∫ b<br />

a<br />

p(x)w(x)dx =<br />

∫ b<br />

a<br />

q(x)ω n (x)w(x)dx +<br />

∫ b<br />

a<br />

r(x)w(x)dx (4.5.2)<br />

The first integral on the right, by (b), is zero, since q ∈ P k−1 . By (a), since r = p −qω n ∈<br />

P n−1<br />

∫ b<br />

a<br />

n∑<br />

n∑<br />

n∑<br />

r(x)w(x)dx = w j r(x j ) = w j [p(x j ) − q(x j )ω n (x j )] = w j p(x j ) (4.5.3)<br />

j=1<br />

j=1<br />

j=1<br />

We obtain from (4.5.2) and (4.5.3)<br />

∫ b<br />

n∑<br />

p(x)w(x)dx = w j p(x j )<br />

a<br />

j=1<br />

Then E n (p) = 0. This completes the proof of theorem.<br />

7


• Gauss-Legendre quadrature<br />

∫ 1<br />

f(x)dx . n∑<br />

= w j f(x j )<br />

−1<br />

j=1<br />

For integrals on other finite intervals with weight function w(x) = 1, use the following<br />

linear change of variables:<br />

t =<br />

a + b + x(b − a)<br />

, dt = b − a<br />

2<br />

2 dx<br />

∫ b<br />

a<br />

f(t)dt =<br />

( ) b − a ∫ 1<br />

2<br />

f<br />

−1<br />

( )<br />

a + b + x(b − a)<br />

dx<br />

2<br />

n x i w i<br />

2 ± 0.5773502692 1.0<br />

3 ± 0.7745966692 0.5555555556<br />

0.0 0.8888888889<br />

4 ± 0.8611363116 0.3478546451<br />

± 0.3399810436 0.6521451549<br />

5 ± 0.9061798459 0.2369268851<br />

± 0.5384693101 0.4786286705<br />

0.0 0.5688888889<br />

6 ± 0.9324695142 0.1713244924<br />

± 0.6612093865 0.3607615730<br />

± 0.2386191861 0.4679139346<br />

7 ± 0.9491079123 0.1294849662<br />

± 0.7415311856 0.2797053915<br />

± 0.4058451514 0.3818300505<br />

0.0 0.4179591837<br />

8 ± 0.9602898565 0.1012285363<br />

± 0.7966664774 0.2223810345<br />

± 0.5255324099 0.3137066459<br />

± 0.1834346425 0.3626837834<br />

Note that go up to n = 512 in Stroud and Secrest (1966) Gaussian Quadrature<br />

Formulas, Prentice-Hall, Englewood Cliffs, N.J. .<br />

8


4.6 Extrapolation<br />

• Aitken extrapolation<br />

Assume that the integration formula has an error formula<br />

I − I n = c n p p > 0<br />

This is not always valid. Ex., Gaussian quadrature does not usually satisfy. The Aitken<br />

extrapolation has two steps:<br />

Step 1. Estimate p, using the following equation,<br />

I 2n − I n<br />

= (I − I n) − (I − I 2n )<br />

I 4n − I 2n (I − I 2n ) − (I − I 4n ) = (c/np ) − (c/2 p n p )<br />

(c/2 p n p ) − (c/4 p n p ) = 2p<br />

Step 2. To estimate the integral I with increased accuracy, suppose that I n , I 2n and I 4n<br />

have been computed.<br />

• Richardson extrapolation<br />

I − I n<br />

I − I 2n<br />

= 2 p = I − I 2n<br />

I − I 4n<br />

(I − I n )(I − I 4n ) = (I − I 2n ) 2<br />

I = Ĩ4n = I 4n −<br />

(I 4n − I 2n ) 2<br />

(I 4n − I 2n ) − (I 2n − I n )<br />

I − I n = d 2<br />

n + d 4<br />

+ ... (4.6.4)<br />

2 n4 multiply (4.6.4) by 4 and subtract from (4.6.5):<br />

I − I n/2 = 4d 2<br />

n 2 + 16d 4<br />

n 4 + ... (4.6.5)<br />

4(I − I n ) − (I − I n/2 ) = − 12d 4<br />

n 4 + ...<br />

9


I = 4I n − I n/2<br />

− 12d 4<br />

+ ...<br />

3 n 4<br />

Define Ĩ = (4I n − I n/2 )/3 then the error convergence order increasing from O(1/n 2 ) to<br />

O(1/n 4 ).<br />

• Romberg integration<br />

The Richardson’s extrapolation process can be continued inductively. Define<br />

I (k)<br />

n<br />

with n a multiple of 2 k , k ≥ 1.<br />

= 4k I n<br />

(k−1)<br />

I (0)<br />

1<br />

4 k − 1<br />

I (0)<br />

2 I (1)<br />

2<br />

− I (k−1)<br />

n/2<br />

I (0)<br />

4 I (1)<br />

4 I (2)<br />

4<br />

I (0)<br />

8 I (1)<br />

8 I (2)<br />

8 I (3)<br />

8<br />

... ... ... ...<br />

4.7 <strong>Numerical</strong> <strong>Differentiation</strong><br />

From the Newton’s interpolation polynomial,<br />

, n ≥ 2 k<br />

f(x) − p n (x) = Φ n (x)f[x 0 ,x 1 ,...,x n ,x], Φ n (x) = (x − x 0 )...(x − x n )<br />

f ′ (x) − p ′ n(x) = Φ ′ n(x)f[x 0 ,x 1 ,...,x n ,x] + Φ n (x)f[x 0 ,x 1 ,...,x n ,x,x]<br />

= Φ ′ n(x) f(n+1) (ξ 1 )<br />

(n + 1)!<br />

Thus let x j = x 0 + jh, j = 0, 1,...,n. Then<br />

+ Φ n (x) f(n+2) (ξ 2 )<br />

(n + 2)!<br />

Φ n (x) = O(h n+1 ), Φ ′ n(x) = O(h n )<br />

f ′ (x) − p ′ n(x) =<br />

{<br />

O(h n ) Φ ′ n(x) ≠ 0<br />

O(h n+1 ) Φ ′ n(x) = 0<br />

10


• Undetermined coefficients method<br />

We illustrate the method by deriving a formula for f ′′ (x). Assume<br />

f ′′ (x) . = Af(x + h) + Bf(x) + Cf(x − h)<br />

with A, B and C undetermined. Replace f(x+h) and f(x −h) by the Taylor expansions<br />

f(x ± h) = f(x) ± hf ′ (x) + h2<br />

2 f ′′ (x) ± h3<br />

6 f(3) (x) + h4<br />

24 f(4) (ξ ± )<br />

with x − h ≤ ξ − ≤ x ≤ ξ + ≤ x + h.<br />

Af(x + h) + Bf(x) + Cf(x − h) = (A + B + C)f(x) + h(A − C)f ′ (x)<br />

+ h2<br />

2 (A + C)f ′′ (x) + h3<br />

6 (A − C)f(3) (x) + h4 [<br />

Af (4) (ξ + ) + Cf (4) (ξ − ) ]<br />

24<br />

In order for this to equal f ′′ (x), we get<br />

A + B + C = 0, A − C = 0, A + C = 2 h 2<br />

This yields the formula<br />

A = C = 1 h 2,<br />

B = −2<br />

h 2<br />

f ′′ (x) =<br />

f(x + h) − 2f(x) + f(x − h)<br />

h 2<br />

− h2<br />

12 f(4) (ξ)<br />

4.8 Peano Representation of Linear functionals<br />

Suppose that f ∈ C d+1 [a,b]. Then by Taylor’s theorem we have<br />

f(x) = f(a) + f ′ (a)(x − a) + ... + f(d) (a)<br />

(x − a) d + 1 ∫ x<br />

(x − t) d f (d+1) (t)dt<br />

d! d! a<br />

The last integral can be extended to t = b if we replace x − t by 0 when t > x:<br />

{<br />

x − t if x ≥ t<br />

(x − t) + =<br />

0 if x < t<br />

11


∫ x<br />

a<br />

(x − t) d f (d+1) (t)dt =<br />

∫ b<br />

a<br />

(x − t) d +f (d+1) (t)dt<br />

Let E be a linear functional operator with E(p) = 0, ∀ p ∈ P d . Then<br />

E(f) =<br />

= 1 d!<br />

1 ( ∫ )<br />

b<br />

d! E (x − t) d +f (d+1) (t)dt<br />

∫ b<br />

a<br />

a<br />

E (x)<br />

(<br />

(x − t)<br />

d<br />

+<br />

)<br />

f (d+1) (t)dt<br />

Define the d-th Peano kernel for E as:<br />

K d (t) = 1 d! E ( )<br />

(x) (x − t)<br />

d<br />

+ , t ∈ R<br />

Thus we have the Peano representation of the functional E and K d .<br />

• Example<br />

E(f) =<br />

∫ b<br />

a<br />

K d (t)f (d+1) (t)dt<br />

12


4.9 Exercises<br />

1. Let p 2 (x) be the quadratic polynomial interpolating f(x) at x = 0, h, 2h. Use this<br />

to derive a numerical integration formula I h for I = ∫ 3h<br />

0 f(x)dx. Use a Taylor series<br />

expansion of f(x) to show<br />

I − I h = 3 8 h4 f (3) (0) + O(h 5 )<br />

2. Let t (2n)<br />

k be the nodes ordered monotonically of the (2n)-point Gauss-Legendre<br />

quadrature rule and w (2n)<br />

k the associated weights. Show that<br />

∫ 1<br />

0<br />

t −1/2 p(t)dt = 2<br />

n∑<br />

k=1<br />

w (2n)<br />

k<br />

p ([ t (2n) ])<br />

, ∀ p ∈ P2n−1<br />

3.(W.G., p.192, 5) Consider the integral I = ∫ 1<br />

−1 |x|dx whose exact value is evidently 1.<br />

Suppose I is approximated (as it stands) by the composite trapezoidal rule T(h)<br />

with h = 2/n, n = 1, 2, 3,....<br />

(a) Show (without any computation) that T(2/n) = 1 if n is even.<br />

(b) Determine T(2/n) for n odd and comment on the speed of convergence.<br />

4.(W.G., p.192, 7)<br />

(a) Derive the midpoint rule of integration<br />

∫ xk +h<br />

x k<br />

f(x)dx = hf(x k + 1 2 h) + 1 24 h3 f ′′ (ξ), x k ≤ ξ ≤ x k + h<br />

(b) Obtain the composite midpoint rule for ∫ b<br />

a f(x)dx including the error term<br />

subdividing [a,b] into n subintervals of length h = (b − a)/n.<br />

5.(W.G., p.194, 16)<br />

(a) Construct the weighted Newton-Cotes formula<br />

∫ 1<br />

0<br />

f(x) · x ln(1/x)dx ≈ a 0 f(0) + a 1 f(1)<br />

Hint: Use ∫ 1<br />

0 xr ln(1/x)dx = (r + 1) −2 , r = 0, 1, 2,....<br />

13<br />

k


(b) Discuss how the formula in (a) can be used to approximate<br />

∫ h<br />

g(t) · t ln(1/t)dt for small h > 0<br />

0<br />

6.(W.G., p.195, 17) Let s be the function defined by<br />

{<br />

(x + 1)<br />

3<br />

if − 1 ≤ x ≤ 0<br />

s(x) =<br />

(1 − x) 3 if 0 ≤ x ≤ 1<br />

(a) With △ denoting the subdivision of [−1, 1] into the two subintervals [−1, 0]<br />

and [0, 1] to what class S k m(△) does the spline s belong ?<br />

(b) Estimate the error of the composite trapezoidal rule applied to ∫ 1<br />

−1 s(x)dx<br />

when [−1, 1] is divided into n subintervals of equal length h = 2/n and n is<br />

even.<br />

(c) What is the error of the composite Simpson’s rule applied to ∫ 1<br />

−1 s(x)dx with<br />

the same subdivision of [−1, 1] as in (b).<br />

(d) What is the error resulting from applying the 2-point Gauss-Legendra rule to<br />

∫ 0<br />

−1 s(x)dx and ∫ 1<br />

0 s(x)dx separately and summing ?<br />

7.(W.G., p.195, 18)(Gauss-Kronrod rule) Let π n (·;w) be the (monic) orthogonal<br />

polynomial of degree n relative to a nonnegative weight function w on [a,b] and<br />

t (n)<br />

k its zeros. Use the theorem proved in class to determine conditions on w k , wk,<br />

∗<br />

t ∗ k for the quadrature rule<br />

∫ b<br />

a<br />

f(t)w(t)dt =<br />

n∑<br />

k=1<br />

w k f ( t (n)<br />

k<br />

to have degree of exactness at least 3n + 1.<br />

Hind: Replace in Theorem 4.2 n by 2n + 1.<br />

) n+1 ∑<br />

+ wkf(t ∗ ∗ k) + E n (f)<br />

k=1<br />

8.(W.G., p.198, 29) Let π n (·;w) be the n-th degree orthogonal polynomial with respect<br />

to the weight function w on [a,b], t 1 , t 2 , ..., t n its n zeros and w 1 , w 2 , ..., w n the n<br />

Gauss weights.<br />

(a) Assuming n > 1 show that the n polynomials π 0 , π 1 , ..., π n−1 are also orthogonal<br />

with respect to the discrete inner product<br />

n∑<br />

(u,v) = w j u(t j )v(t j )<br />

j=1<br />

14


(b) Denoting the elementary Lagrange interpolation polynomials associated with<br />

the nodes t 1 , t 2 , ..., t n<br />

l i (t) = ∏ k≠i<br />

t − t k<br />

t i − t k<br />

,<br />

i = 1, 2,...,n<br />

Show that<br />

∫ b<br />

a<br />

l i (t)l k (t)w(t)dt = 0,<br />

if i ≠ k<br />

9.(W.G., p.198, 30) Consider a quadrature formula of the type<br />

∫ ∞<br />

e −x f(x)dx = af(0) + bf(c) + E(f)<br />

0<br />

(a) Find a, b, c such that the formula has degree of exactness d = 2. Can you<br />

identify the formula so obtained ?<br />

Hind: ∫ ∞<br />

0 e −x x r dx = r!<br />

(b) Let p 2 (x) = p 2 (f; 0, 2, 2;x) be the Hermite interpolation polynomial interpolating<br />

f at the (simple) point x = 0 and the double points x = 2. Determine<br />

∫ ∞<br />

0 e −x p 2 (x)dx and compare with the result in (a).<br />

(c) Obtain the remainder E(f) in the form E(f) = const · f ′′′ (ξ), ξ > 0.<br />

10.(W.G., p.199, 34) Show that ∫ 1<br />

0 (1 − t)−1/2 f(t)dt when f is smooth can be computed<br />

accurately by Gauss-Legendre quadrature.<br />

Hind: Substitute 1 − t = x 2 .<br />

11.(W.G., p.178, Ex) Suppose in the approximate formula<br />

∫ 1<br />

0<br />

√ xf(x)dx = −<br />

2<br />

15 f(0) + 4 5<br />

derived in class the function f ∈ C 1 [0, 1].<br />

∫ 1<br />

0<br />

f(x)dx<br />

(a) Derive the appropriate Peano representation of the error functional E(f).<br />

(b) Obtain an estimate of the form |E(f)| ≤ c 0 ‖f ′ ‖ ∞ .<br />

12.(W.G., p.201, 42) Determine the quadrature formula of the type<br />

∫ 1<br />

∫ −1/2<br />

∫ 1<br />

f(t)dt = α −1 f(t)dt + α 0 f(0) + α 1 f(t)dt + E(f)<br />

−1<br />

−1<br />

having maximum degree of exactness d. What is the value of d?<br />

15<br />

1/2


13.(W.G., p.202, 47)<br />

∫ b<br />

n∑<br />

E(f) = f(x)dx − w k f(x k )<br />

a<br />

k=1<br />

is the error of a quadrature rule having degree of exactness d. Show that none of<br />

the Peano kernels K 0 , K 1 , ..., K d−1 can be definite.<br />

14.(W.G., p.203, 50)<br />

(a) Use the method of undetermined coefficients to construct a quadrature formula<br />

of the type<br />

∫ 1<br />

0<br />

f(x)dx = af(0) + bf(1) + cf ′′ (γ) + E(f)<br />

having maximum degree of exactness d the variables being a, b, c and γ.<br />

(b) Show that the Peano kernel K d for the formula obtained in (a) is definite and<br />

hence express the remainder in the form<br />

E(f) = e d+1 f (d+1) (ξ), 0 < ξ < 1.<br />

15. Let f ∈ C 4 derive the three-point midpoint numerical differentiation formula for<br />

f ′′ (c) with truncation error.<br />

f ′′ (c) =<br />

f(c + h) − 2f(c) + f(c − h)<br />

h 2<br />

− h2<br />

12 f(4) (ξ)<br />

16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!