A textbook of Computer Based Numerical and Statiscal Techniques part 28 potx

10 327 0
A textbook of Computer Based Numerical and Statiscal Techniques part 28 potx

Đang tải... (xem toàn văn)

Thông tin tài liệu

256 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Example 9. Using Newton’s divided difference formula, prove that f(x) = f(0) + x ∆ f (–1) + () x1x 2! + () 2 f1 − ∆ + ()() x1xx1 3! +− 3 f∆ (–2) + Sol. Taking the arguments, 0, –1, 1, –2, the Newton’s divided difference formula is f(x)= f(0) + 1 x − ∆ f(0) + x(x + 1) 2 1,1− ∆ f(0) + x(x + 1) (x – 1) 3 1,1 2−− ∆ f(0) + (1) f(x)= f(0) + 0 x ∆ f(–1) + x(x + 1) 2 0,1 ∆ f(–1) + x(x + 1) (x – 1) 3 0, 1,1− ∆ f(–2) + Now, 0 ∆ f(–1) = () ( ) () 01 01 ff −− −− = f∆ (–1) 2 0,1 ∆ f(–1) = () 1 11 −− = () ( ) 10 01 ff  ∆−∆−   = 1 2 () ( ) () 2 1 01 1 2 ff f ∆−∆−=∆−   3 1,0,1− ∆ f(–2) = () 1 12 −− () () 22 0,1 1,0 12 ff −  ∆−−∆−   = 1 3 () () 22 12 22 ff  ∆− ∆− −    = () 3 2 32 f ∆− × = () 3 2 3! f ∆− and so on. Substituting these values in (1) f(x)= f(0) + x ∆ f (–1) + () 1 2! xx + 2 f∆ (–1) + ()() 11 3! xxx +− 3 f∆ (–2)+ Example 10. Using Newton’s divided difference formula, calculate the value of f(6) from the following data: () x:1278 fx : 1 5 5 4 INTERPOLATION WITH UNEQUAL INTERVAL 257 Sol. The divided difference table is () () () () 23 11 4 2 25 3 1 0 14 1 75 6 1 84 xfxfxfxfx ∆∆ ∆ − − − Applying Newton’s divided difference formula, f(x) = 1 + (x – 1) (4) + (x – 1) (x – 2) 2 3  −   + (x – 1) (x – 2) (x – 7) 1 14    f(6) = 1 + 20 + (5) (4) 2 3  −   + (5) (4) (–1) 1 14    = 6.2381 Example 11. Find the value of log 10 656 using Newton’s divided difference formula from the data given below: 10 x : 654 658 659 661 log x : 2.8156 2.8182 2.8189 2.8202 Sol. Divided difference table for the given data is as: () () () () 5 5 52 53 10 10 10 10 654 281560 260 65 4 70 _ 65 658 281820 1 5 70 1.66 1 70 10.38 17 65 70 659 281890 1.66 3 130 65 2 661 282020 xfx fx fx fx ∆∆ ∆ = = −− == − =− = 258 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES For the given argument, the divided difference formula is, f(x)= y 0 + (x – x 0 ) 0 y∆ + (x – x 0 ) (x – x 1 ) 2 0 y∆ + (x – x 0 ) (x – x 1 ) (x – x 2 ) 3 0 y∆ 10 5 f(x) = 281560 + (x – 654) 65 + (x – 654) (x – 658).1 + (x – 654) (x – 658) (x – 659) (0.38) On Substituting x = 656, we get 10 5 f(x) = 281560 + 2 × 65 + (–4) + (–4) (–3) × (0.38) = 281560 + 130 – 4 + 4.56 10 5 f(x) = 281690. 56 ⇒ f(x) = 2.8169056 ⇒ log 10 656 = 2.8169056 PROBLEM SET 5.3 1. By means of Newton’s divided difference formula, Find the value of f(8) and f(15) from the following table: () : 4 5 7 10 11 13 : 48 100 294 900 1210 2028 x fx [Ans. 448, 3150] 2. Using Newton’s divided difference formula, find a polynomial function satisfying the following data: () :41025 : 1245 3 5 9 1335 x fx −− Hence find f(3) [Ans. f (x) = 3x 4 – 5x 3 + 6x 2 – 14x + 5, f (3) = 89] 3. From the given data, find f(x) as a polynomial in powers of (x – 5) () :0 2 3 4 7 9 : 4 26 58 112 466 922 x fx [Ans. (x – 5) 3 + 17 (x – 5) 2 + 98 (x – 5) + 194] 4. Find the value of log 10 33 from the data given below: log 10 2 = 0.3010, log 10 3 = 0.4771, log 10 7 = 0.8451, [Ans. log 10 33 = 1.5184] 5. Find f’(10) from the given data: () :3 511 27 34 : 13 23 899 17315 35606 x fx − [Ans. f′ (10) = 233] 6. Find approximately the real root of the equation x 3 – 2x – 5 = 0 [Ans. 2.0945595] 7. Find the value of f(x) at point x = 2 and 5 from the data: () :1.536 :0.25220 x fx [Ans. f(2) = 0, f(5) = 12] 8. Evaluate f(9) using Newton’s divided difference formula. () :5 7 11 13 17 : 150 392 1452 2366 5202 x fx [Ans. f (9) = 810] INTERPOLATION WITH UNEQUAL INTERVAL 259 9. Use Newton’s divided difference formula to find f(7) if f(3) = 24, f(5) = 120, f(8) = 504 f(9) = 720, and f(12) = 1716 [Ans. f (7) = 328] 10. There is a data be given () :01 2 5 :2312147 x fx What is the form of the function? [Ans. x 3 + x 2 – x + 2] 11. Find yx in powers of x – 4 where y 0 = 8, y 1 = 11, y 4 = 68, y 5 = 125 () () () 1 22 11 4 117 4 447 4 680 10 xxx   −+ −− −+     Ans. 12. Express the function as a sums of partial functions. () ()() 2 2 61 146 xx xxx +− −−− () () ()() 1 3 13 71 5 1 35 1 10 4 70 6xxxx  +−+  −+−−   Ans. 13. If f(x) = u (x) v(x), find the divided difference f(x 0 , x 1 ) in terms of u (x 0 ), v (x 1 ) and the divided differences u(x 0 , x 1 ), v (x 0 , x 1 ) 14. Find f(3), using Newton’s divided difference formula from the given data () :0 1 2 45 6 : 1 14 15 5 6 19 x fx [Ans. 10] 5.6. HERMITE’S INTERPOLATION FORMULA Hermite’s interpolation is similar to as Lagrange’s interpolation. The difference is that in the Lagrange’s interpolation the interpolating polynomial consider with f(x) at the interpolation points x 0 , x 1 , x 2 , x n where as Hermite’s interpolation formula interpolate both the function as well as its derivative at each of the points. Sometimes it is also called osculating interpolation formula. Let the set of data points (x i , y i , y’ i ), 0 ≤ i ≤ n be given. A polynomial of the least degree say H(x) is to be determined such that H(x i ) = y i and H’ (x i ) = y’ i ; i = 0, 1, 2, n (1) H(x) is called Hermite’s interpolating polynomial Since there are 2n + 2 conditions to be satisfied, H(x) must be a polynomial of degree ≤ 2n +1 The required polynomial may be written as H(x) = 0 n i i u = ∑ (x) y i + 0 n i i v = ∑ (x)y′ i (2) Where u i (x) and vi(x) are polynomials in x of degree ≤ 2n + 1 and satisfy. (i) u i (x i ) = 0, 1, ij ij ≠   =  (3a) 260 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES (ii) v i (x j ) = = 0 ∀ i, j (3b) (iii) u′ i (x j ) = 0 ∀ i, j (3c) (iv) v′ i (x j ) = 0, 1, ij ij ≠   =  (3d) Using the Lagrange fundamental polynomials L i (x), we choose and () () () () () () 2 2 iii iii ux AxLx vx BxLx  ′ =    =     (4) where L i (x) is defined as L i (x) = ()()( )( )() ()()()()() 01 1 1 01 1 1 ii n i i ii ii in xx xx xx xx xx xxxx xx xx xx −+ −+ −− − − − −− − − − Since L i 2 (x) is a polynomial of degree 2n, A i (x) and B i (x) must be linear polynomials. Let A i (x) = a i x + b i and B i (x) = c i x + d i therefore from (4), () () () 2 2 iiii iiii u (x) = (a x + b )[L (x)] vx cxd Lx     =+    (5) using conditions (3a) and (3b) in (5), we get a i x + b i = 1 (6a) and c i x + d i = 0(6b) Since [L i (x i )] 2 = 1 Again, using conditions (3c) and (3d) in (5), we get a i + 2L i ′ (x i ) = 0 (6c) and c i = 1 (6d) From equations 6(a, b, c, & d), we deduce () () 2 12 1 ii iiii i aLx bxLx c λ ′ =−    ′ =+   =   and d i = – x i (7) Hence, from (5) u i (x) = [– 2xL i ’ (x i ) + 1 + 2x i L i ’ (x i )] [L i (x)] 2 = [1 – 2 (x – x i ) L i ’ (x i )] [L i (x)] 2 and v i (x)= (x – x i ) [L i (x)] 2 Therefore from (2), H(x)= 0 n i = ∑ {1 – 2 (x – x i ) L i ’ (x i )} [L i (x)] 2 y i + [] 2 0 ()() n ii i i xx Lx y = ′ − ∑ Which is the required Hermite’s interpolation formula. INTERPOLATION WITH UNEQUAL INTERVAL 261 Example 1. Apply Hermite’s interpolation formula to obtain a polynomial of degree 4 from the following data. i i i x012 y109 y 0024 ′ : : : Sol. Using h Hermite’s interpolation formula [] [] 22 2 2 0=0 () () 1 2( ) ( ) + ( ) () i ii i i i i i ii Lx Hx x x L x y x-x L x y =  ′′ =−−  ∑∑ We have, H(x) = {1 – 2 (x – x 0 ) L 0 ’ (x 0 )} [L 0 (x)] 2 y 0 + {1 – 2(x – x 1 ) L 1 ’ (x 1 )} [L 1 (x)] 2 y 1 {1 – 2 (x – x 2 ) L 2 ’ (x 2 )} [L 2 (x)] 2 y 2 + (x – x 0 ) [L 0 (x 0 )] 2 y’ 0 + (x – x 1 ) [L 1 (x)] 2 y ′ 1 + (x – x 2 ) [L 2 (x)] 2 y’ 2 L 0 (x)= ()() ()() 12 0102 xx xx xxxx −− −− = ()() ()() () 2 12 1 32 0102 2 xx xx −− =−+ −− L 1 (x)= ()() ()() ()() ()() 02 2 1012 02 2 1002 xx xx x x xx xxxx −− −− ==− −− −− L 2 (x)= ()() ()() ()() ()() () 01 2 2120 01 1 2021 2 xx xx x x xx xxxx −− −− ==− −− −− L 0 ’ (x)= 23 2 x − , L 1 ’ (x) = 2 – 2x, L 2 ’ (x) = 21 2 x − , L 0 ’ (x 0 )= 3 2 − , L 1 ’ (x 1 ) = 0, L 2 ’ (x 2 ) = 3 2 , Using these values in equation, we get H (x) = [1 – 2 (x – 0) (– 3/2)] 1 4 (x 2 + 3x + 2) 2 × 1 + [1 – 2 (x – 2) (3/2)] 1 4 (x 2 – x) 2 × 9 + (x – 2) 1 4 (x 2 – x) 2 × 24 H(x) = (1 + 3x) 1 4 (x 2 + 3x + 2) 2 + (1 – 3x + 6) 9 4 (x 2 – x) 2 + (x – 2)6 (x 2 – x) 2 ∴ H(x)= x 4 – 2x 2 + 1 Example 2. Apply Hermite’s interpolation formula to find a cubic polynomial which meets the following specifications. iii xyy ′ 000 111 262 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Sol. Hermite’s interpolation formula is H(x)= () () ][ () () () 11 2 2 00 12 ii i i i i i i ii xxLx Lx y xx Lx y ==  ′ ′ −− + −    ∑∑ H(x) = [1 – 2(x – x 0 ) L 0 ’ (x 0 )] [L 0 (x)] 2 y 0 +[1 – 2(x – x 1 ) L i ’(x 1 )] [L 1 (x)] 2 y 1 + (x – x 0 ) [L 0 (x)] 2 y′ 0 + (x – x 1 ) [L i (x)] 2 y 1 ’ (1) Now, L 0 (x)= 0 01 xx xx − − = 0 1 01 x x − =− − L 1 (x)= 0 10 0 10 xx x x xx −− == −− ∴ L 0 ’(x) = – 1 and L 1 ’ (x) = 1 Hence, L 0 ’(x) = –1 and L 1 ’ (x 1 ) = 1 ∴ From (1), H (x) = [1 – 2 (x – 0) (– 1)] (1 – x 2 ) (0) + [1 – 2(x – 1) (1)]x 2 (1) + (x – 0) (1 – x) 2 (0) + (x – 1)x 2 (1) = x 2 – 2x 2 (x – 1) + x 2 (x – 1) = x 2 – x 2 (x – 1) = x 2 (2 – x) = 2x 2 – x 3 Example 3. Apply Hermite interpolation to find the value of sin (1.05) from the following data i x Sin x Cos x 1.00 1.10 0.84147 0.89121 0.54030 0.45360 Sol. Here, f(x) = sin x, f’(x) = cos x, x 0 = 1 & x 1 = 1.10 L 0 (x)= 1 01 1.10 11.10 xx x xx −− = −− = – 10x + 11 L’ 0 (x) = – 10 and L 1 (x)= 0 10 1.00 1.10 1.00 xx x xx −− = −− = 10x – 10 L’ 1 (x 1 )= 10 f(x 0 ) = 0.84147, f(x 1 ) = 0.54030 f(x 2 ) = 0.89121, f(x 3 ) = 0.45360 Now, using Hermite’s formula, we have H(x)= () () () () () () () 11 22 1 00 12 kk k k k k k k kk L x xx Lx fx xx Lx fx ==  ′ −− +−      ∑∑ INTERPOLATION WITH UNEQUAL INTERVAL 263 H(x)= () () {} () () () () {} () () 22 11 00 0 0 0 11 1 1 1 12 12 Lx xx Lx fx Lx xx Lx fx −− +−−     () () () () () () 22 00 0 11 1 xx Lx fx xx Lx fx ′′ +− +−     H(x) = {1 + 20 (x – 1)} (–10x + 11) 2 (0.84147) + {1 – 20(x – 1.10)} (10x – 10) 2 (0.89121) + (x – 1.00) (–10x + 11) 2 (0.54030) 2 (0.54030) + (x – 1.10) (10x – 10) 2 (0.45360) Put, x = 1.05, so we get H (1.05) = sin (1.05) = {1 + 20(1.05 – 1)} (–10(1.05) + 11) 2 (0.84147) + {1 – 20((1.05) – 1.10)} (10(1.05) – 10) 2 (0.89121) + ((1.05) – 1.00) (–10(1.05) + 11) 2 (0.54030) + ((1.05) – 1.10) (10(1.05) – 10) 2 (0.45360) H(x) = 2(0.25) (0.84147) + 2(0. 25) (0.89122) + (0.05) (0.25) (0.54030) – (0.5) (0.25) (0.45360) sin (1.05) = 0.420735 + 0.445605 + 0.00675375 – 0.00567 sin (1.05) = 0.86742. Ans. Example 4. A switching path between parallel railroad tracks is to be a cubic polynomial joining positions (0,0) and (4,2) and tangent to the lines y = 0 and y = 2 as shown in the figure. Apply Hermite’s interpolation formula to obtain this polynomial Sol. Since tangents are parallel to X-axis, y′ = 0 in both the cases. ∴ We have the table of values. xyy ′ 00 0 42 0 Hermite interpolation formula is H(x)= () () () () () () () 11 22 00 12 ii i i i i i i ii Lx xx Lx fx xx Lx f x == ′  ′ −− +−      ∑∑ (1) Now, L 0 (x)= 1 01 4 04 xx x xx −− = −− = 1 – 4 x 264 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES L 1 (x)= 0 10 0 40 4 xx x x xx −− == −− ∴ L 0 ′ (x)= () 1 11 and 44 Lx ′ −= Hence, L 0 ’ (x 0 )= – 1 4 and L 1 ’ (x 1 ) = 1 4 . Therefore from (1) H(x)= () () 22 11 12 0 1 0 12 4 2 44 44 xx xx     −−− −×+−− ×         + () () 22 01 0 4 0 44 xx xx   −−×+− ×     H(x)= () 2 2 6 4 1 28 16 xx x x − −   −=     H(x)= 1 16 (6x 2 – x 3 ). Ans. Example 5. Using Hermite interpolation formula, estimate the value of 1 n (3.2) from the following table: () n xylxy x == ′ 1 3 1.09861 0.33333 3.5 1.25276 0.28571 4.0 1.38629 0.25000 Sol. Using Hermite’s interpolation formula, we have H(x)= () ()[] () () 22 2 2 00 12 () ii i i i i i i ii Lx x x lx y xx Lx y == ′  −− +−    ∑∑ H(x) = [1 –2(x – x 0 )L 0 ’ (x 0 )] [L 0 (x)] 2 y 0 + [1 – 2(x – x 1 ) L 1 ’ (x 1 )] [L 1 (x)] 2 y 1 + [1 – 2(x – x 2 ) L 2 ’ (x 2 )] [L 2 (x)] 2 y 2 + (x – x 0 ) [L 0 (x)] 2 y 0 ’ + (x – x 1 ) [L 1 (x)] 2 y 1 ’ + (x – x 2 ) [L 2 (x)] 2 y 2 ’ Now, L 0 (x)= ()() ()() ()() ()() 12 0102 3.5 4 33.5 34 xx xx x x xxxx −− − − = −− −− = 2(x 2 – 4x – 3.5 x + 14) = 2(x 2 – 7.5x + 14) INTERPOLATION WITH UNEQUAL INTERVAL 265 L 1 (x)= ()() ()() ()() ()() 02 1012 34 3.5 3 3.5 4 xx xx x x xxxx −− −− = −− −− = – 4(x 2 – 7x + 12) L 2 (x)= ()() ()() ()( ) 01 2021 33.5 10.5 xx xx x x xxxx −− −− = −− × = 2(x 2 – 6.5x + 10.5) ∴ L 0 ’ (x)= 4x – 15, L 1 ’ (x) = – 8x + 28, L 0 ’ (x 0 ) = – 3, L 1 ’ (x 1 ) = 0 L 2 ’ (x) = 4x – 13 i.e., L 2 ’ (x 2 )= 3 ∴ H(x)= () () () () () () () () () () () () () () () () () () () 2 2 22 22 2 2 2 2 22 1 2 3 3 2 7.5 14 1. 09861 1 2 3.5 0 4 7 12 1.25276 1 2 4 3 2 6.5 10.5 1.38629 3 2 7.5 14 0.33333 3.5 4 7 12 0.28571 4 2 ( 6.5 10.5) 0.250 xxx x xx x x x xxx x xx x x x    −−− − + × +−−        ×− − + × + − − − +      ×+−−+×+−    ×− − + × + − − + ×   () 00 On Putting x = 3.2, we get H(3.2) = ()() () () () () () () () ( )() () () ( )( ) () () ( )( ) () () ( ) 2 2 22 22 2 2 2 2 1 2 0.2 3 2 3.2 7.5 3. 2 14 1.09861 0 1 2 1.2 3 2 ( 3.2 6.5 3.2 10.5) 1.386929 0.2 2 ( 3.2 7.5 3.2) 14 0.33333 0.3 4 ( 3.2 7 3.2 12) 0.28571 1.2 2 ( 3.2 6.5 3.2 10.5) 0.25000   −− − +× ++−−      ×−+× + −+   ×+−−−+×+−   ×−+×  l n (3.2) = (2.2 {4(0.0576)} × ()( )( )() ()()() {}( )(){}( ) (1.09861) 0 8.2 4 0.0036 1.38629 0.2 4 99.2016 0.33333 0.3 46 0.0256 0.28571 1.2 4 0.0036 0.25000 +×+   ×−   ×+ −     l n (3.2) = 1.6314 Example 6. Show that ab f 2 +    = () () () () () bafa fb fa fb 28 −−′′  +  + Sol. By Hermite’s interpolation formula. () () () () () () xfx fx afa fa bfb fb ′ ′ ′ . = 0.86742. Ans. Example 4. A switching path between parallel railroad tracks is to be a cubic polynomial joining positions (0,0) and (4,2) and tangent to the lines y = 0 and y = 2 as shown in. + 1 Example 2. Apply Hermite’s interpolation formula to find a cubic polynomial which meets the following specifications. iii xyy ′ 000 111 262 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Sol (x) and vi(x) are polynomials in x of degree ≤ 2n + 1 and satisfy. (i) u i (x i ) = 0, 1, ij ij ≠   =  ( 3a) 260 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES (ii) v i (x j )

Ngày đăng: 04/07/2014, 15:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan