Docsity

Math 248: Interpolation, Differentiation, and Integration Exercise Solutions - Prof. Charl, Assignments of Mathematics

Toggle sidebar
bg1
Math 248 Computers and Numerical Algorithms–Pruett
EXTRA HW ASSIGNMENT 4 (Not to be collected)
1. Interpolation Error (Notes: Chapter 7) Suppose you want to interpolate sin(x)to 4-decimal-place
accuracy on [0,π/2]using equally spaced nodes. What is the maximum allowable distance between
nodes if
(a) linear interpolation is used?
(b) quadratic interpolation is used?
(c) cubic interpolation is used?
2. Numerical Differentiation (Notes: Chapter 8)
(a) Use Taylor’s theorem to derive the discretization-error formula for the centered second-derivative
approximation; namely,
e(2)
hf=f00(x)−D(2)
hf=−h2
12 f(4)(ξ)
(b) For f(x) = exat x=2, complete the following table, and show that the error diminishes in each
column at the expected rate:
h Dh+f eh+f Dh−f eh−f Dhf ehf
1/4
1/8
1/16
1/32
3. Numerical Integration (Notes: Chapter 9)
(a) Consider the definite elliptic integral
Zπ/4
0
p1−2sin2xdx
which cannot be integrated exactly. Complete the following table.
xif(xi)WLWRWTWS
0
1π/16
2π/16
3π/16
4π/16
Use the table to compute estimates L(h),R(h),T(h),S(h), and M(2h)for h=π/16. Verify
that S(h) = (2T(h)+M(2h))/3. Which estimate is probably the most accurate and why? What
could you do to improve accuracy if necessary?
(b) Show that Rx2
x0L1(x)dx =4h/3, where L1is the quadratic Lagrange function whose value is 1
at x1.

Partial preview of the text

Download Math 248: Interpolation, Differentiation, and Integration Exercise Solutions - Prof. Charl and more Assignments Mathematics in PDF only on Docsity!

Math 248 Computers and Numerical Algorithms–Pruett

EXTRA HW ASSIGNMENT 4 (Not to be collected)

  1. Interpolation Error (Notes: Chapter 7) Suppose you want to interpolate sin(x) to 4-decimal-place accuracy on [ 0 , π/ 2 ] using equally spaced nodes. What is the maximum allowable distance between nodes if

(a) linear interpolation is used? (b) quadratic interpolation is used? (c) cubic interpolation is used?

  1. Numerical Differentiation (Notes: Chapter 8)

(a) Use Taylor’s theorem to derive the discretization-error formula for the centered second-derivative approximation; namely,

e( h^2 )f = f ′′(x) − D( h^2 )f = −

h^2 12

f (^4 )(ξ)

(b) For f (x) = ex^ at x = 2, complete the following table, and show that the error diminishes in each column at the expected rate: h Dh+ f eh+ f Dh− f eh− f Dh f eh f 1 / 4 1 / 8 1 / 16 1 / 32

  1. Numerical Integration (Notes: Chapter 9)

(a) Consider the definite elliptic integral Z (^) π/ 4

0

1 − 2 sin^2 xdx

which cannot be integrated exactly. Complete the following table. xi f (xi) WL WR WT WS 0 1 π/ 16 2 π/ 16 3 π/ 16 4 π/ 16 Use the table to compute estimates L(h), R(h), T (h), S(h), and M( 2 h) for h = π/16. Verify that S(h) = ( 2 T (h) + M( 2 h))/3. Which estimate is probably the most accurate and why? What could you do to improve accuracy if necessary? (b) Show that

R (^) x 2 x 0 L^1 (x)dx^ =^4 h/3, where^ L^1 is the quadratic Lagrange function whose value is 1 at x 1.