Assignment II Semester: Spring 2024 Faculty : Faculty of Science Department : Math & Computer Science Division/ program: Math/CS Course Name : Numerical Methods Course Code: Math 348 Note: Use maximum precision that your calculator provides in all calculations and provide the final answer in as many numbers of significant figures as the question specified. . 1. Approximate f(8.4) using Lagrange interpolating polynomial of degree three. Provide your answer in eight significant figures. x f(x) a) 17.87833; 8.1 17.61549 8.3 17.56492 b) 17.87716; 8.6 18.50515 8.7 18.2091 c) 17.810000; d) 17.60859; 2. Three values of the Gamma functions (x) are given in the table below. Use Lagrange’s second order interpolating polynomial to estimate (1.01). Provide your answer in four significant figures. x (x) a) 0.9943; 1.00 1.0000 b) 0.9835; 1.02 0.9888 1.04 0.9784 c) 0.9935; d) 0.9843 3. Use Newton third order interpolating polynomial to estimate f(9.2). Provide your answer in four significant figures. pg. 1 Dr. N. Yassine X f(x) a) 2.291; 8.0 2.079 9.0 2.197 b) 2.519; 9.5 2.251 c) 2.219; 11.0 2.398 d) 2.215; e) none of the above. 4. Use multiple applications of Simpson’s 1/3 rule with n = 6 to approximate the 3 / 8 integral tan x dx . 0 a) 0.960547; b) 0.961055; c) 0.961944; d) 0.998816 2 5. Estimate the integral e − x dx using a multiple application of the trapezoidal rule with 1 5 segments. 2 6. Apply multiple applications of Simpson’s 1/3 rule with n = 6 to evaluate sin( x 2 )dx . 0 7. Given the following data points, f(1) = 1.5, f(2) = 2.5, f(3) = 4.5, use a second order LaGrange interpolating polynomial to estimate the value of f(2.1). a) 2.655 b) 2.820 c) 2.995 d) 3.180 e) 3.375 8. Calculate the integral of the function f(x) = sin(x)/x from 0 to 5 using a multiple application of the trapezoidal rule with 5 segments. Note that f(0) is 1. a) 1.8383 b) 1.4453 c) 1.7520 d) 1.5996 e) 1.5581 9. Determine the missing entries in the table. X f (X ) 0.0 F [ X 0, X 1] 0.4 0.7 pg. 2 1st DD 2nd DD 50/7 10 6 Dr. N. Yassine 10. Find the ratio of the coefficients b3/b2 in Newton’s third order interpolating polynomial for the following data: x 1 2 3 4 y 1.9 3 6 10 Note: b3 is the coefficient of (x-1)(x-2)(x-3) and b2 is the coefficient of (x-1)(x-2). a) -0.15789 11. b) -0.055556 c) -0.20513 e) 0.33333 Fit quadratic splines to estimate f(2.2). Provide your answer in three significant figures. X 0 3.0 6.0 9.0 f(x) 1.0 2.2 3.1 5.9 a) 2.22; pg. 3 d) -0.23232 b) 1.85; c) 2.25; d) 1.88; e) none of the above Dr. N. Yassine FORMULAE Polynomial interpolation f ( x) = b0 + b1 ( x − x0 ) + b2 ( x − x0 )( x − x1 ) + + bn ( x − x0 )( x − x1 ) ( x − x n −1 ) b0 = f ( x0 ) b1 = f [ x1 , x0 ] bn = f [ x n , x n −1 , , x1 , x0 ] f [ xi , x j ] = f ( xi ) − f ( x j ) xi − x j f [ x n , x n −1 , , x1 , x0 ] = f [ x n , x n −1 , , x1 ] − f [ x n −1 , , x1 , x0 ] x n − x0 n f n ( x) = Li ( x) f ( xi ) i =0 n Li ( x) = j =0 j i pg. 4 x − xj xi − x j Dr. N. Yassine Integration h f (a) + f (b) 2 n −1 h b−a = f ( x 0 ) + 2 f ( xi ) + f ( x n ) h = 2 n i =1 h = f ( x0 ) + 4 f ( x1 ) + f ( x n ) 3 n −1 n−2 h = f ( x 0 ) + 4 f ( xi ) + 2 f ( x j ) + f ( x n ) 3 i =1,3,5,... j = 2, 4,6,... 3h b−a = f ( x0 ) + 3 f ( x1 ) + 3 f ( x 2 ) + f ( x3 ) h= 8 3 I (h1 ) − I (h2 ) = I (h2 ) + 2 h1 1 − h2 I= I I I I I n 4 1 16 1 64 1 I m − Il , I = I m − Il , I = I m − I l ,... 3 3 15 15 63 63 x c 2 0.5773502692 1.000000000000 I= h= b−a n − 0.5773502692 1.000000000000 3 0.7745966692 0.555555555556 0.0000000000 0.888888888889 − 0.7745966692 0.555555555556 b (b − a )t + b + a b − a dt 2 2 −1 1 f ( x)dx = f a pg. 5 Dr. N. Yassine