You are on page 1of 2

Tutorial Sheet 5 Numerical Integration and Dierentiation (contd.

)
5.1 Numerical Dierentiation
(1) In this problem, perform the calculations using 6-digit rounding arithmetic. (i) Find the value of the derivative of the function f (x) = sin x at x = 1 using the forward, backward, and central dierence formulae with h1 = 0.015625, and h2 = 0.000015. (ii) Find f (1) directly and compare with the values obtained for each hi (i = 1, 2). (2) Obtain the central dierence formula for f (x) using polynomial interpolation with nodes at x h, x, x + h, where h > 0. (3) Given the values of the function f (x) = ln x at x0 = 2.0, x1 = 2.2 and x2 = 2.6, nd the approximate value of f (2.0) using the method based on quadratic interpolation. Obtain an error bound. (4) The following data corresponds to the function f (x) = sin x. x f (x) 0.5 0.4794 0.6 0.5646 0.7 0.6442

Obtain the approximate value of f (0.5), f (0.6), f (0.7) using forward, backward, and central dierence formulae whichever are applicable. Compute the relative error in all the three cases. (5) The following data corresponds to the function f (x) = ex 2x2 + 3x + 1. x f (x) 0.0 0.0 0.2 0.7414 0.4 1.3718

Obtain the approximate value of f (0.0), f (0.2), f (0.4) using forward, backward, and central dierence formulae whichever are applicable. Compute the relative error in all the three cases. (6) Obtain expressions for the arithmetic error in approximating the rst derivative of a function using the forward, backward, and central dierence formulae. (7) Find an approximation to f (x) as a formula involving f (x), f (x+h), and f (x+2h). Obtain an expression for the mathematical error involved in this approximation.

13

14

5.1. Numerical Differentiation

(8) Let h > 0. Use the method of undetermined coecients to nd a numerical dierentiation formula for approximating f (x) such that the formula uses values of the function f at each of the following sets of points: (a) x + 2h, x + h and x. (b) x + 3h, x + 2h x + h and x. Obtain expressions for mathematical error in both the cases. (9) For the method 4f (x + h) f (x + 2h) 3f (x) , 2h obtain an expression for mathematical error, arithmetic error, and hence total error. Find a bound on the absolute value of the total error as function of h. Determine the optimal value of h for which the bound obtained is minimum. f (x)

(10) Repeat the previous problem when central dierence formula is used for numerical dierentiation.

S. Baskar and S. Sivaji Ganesh

MA 214 / Spring 2012

You might also like