A textbook of Computer Based Numerical and Statiscal Techniques part 3 ppsx

10 2.2K 2
A textbook of Computer Based Numerical and Statiscal Techniques part 3 ppsx

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

Thông tin tài liệu

6 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Using the principle of equal effects, which states 12 1 2 X X xx x x ∂∂ δ=δ ∂∂ = = n n X x x ∂ δ ∂ this implies that 1 1 ∂ δ=δ ∂ X Xnx x or 1 1 X x X n x δ δ= ∂ ∂ . Similarly we get 23 23 , , XX xx XX nn xx δδ δ= δ= ∂∂ ∂∂ , n n X x X n x δ δ= ∂ ∂ and so on. This form is useful where error in dependent variable is given and also we are to find errors in both independent variables. Remark: The Error 1 10 2 n − =× , if a number is correct to n decimal places. Also Relative error is less than 1 1 10 n l − × , if number is correct to n significant digits and l is the first significant digit of a number. 1.4.6 Error in Evaluating x k Let x k be the function having k is an integer or fraction then Relative Error for this function is given Relative Error = or xXx kk xXx δδ δ ≤ Example 2. Find the absolute, percentage and relative errors if x is rounded-off to three decimal digits. Given x = 0.005998. Sol. If x is rounded-off to three decimal places we get x = 0.006. Therefore Error = True value – Approximate value Error = .005998 – .006 = – .000002 Absolute Error = E a = Error = 0.000002 Relative Error = 0.000002 0.0033344 0.005998 0.005998 aa r EE E True value = === and Percentage Error = E p = E r × 100 = 0.33344. Example 3. Find the number of trustworthy figure in (0.491) 3 assuming that the number 0.491 is correct to last figure. Sol. We know that Relative Error, E r = δδ ≤ Xx k Xx Here δx = 0.0005 because − ×= 3 1 10 0.0005 2 ERRORS AND FLOATING POINT 7 or 3 0.0005 3 0.0005 3 0.01267 0.118371 (0.491) x k x × =× = = δ Therefore, Absolute Error = E r .X or Absolute Error < 0.01267 × (0.491) 3 = 0.01267 × 0.118371 = 0.0015 The error affects the third decimal place, therefore, (0.491) 3 = 0.1183 is correct to second decimal places. Example 4. If 0.333 is the approximate value of 1 3 , then find its absolute, relative and percentage errors. Sol. Given that True value () 1 3 x = , and its Approximate value (x′) = 0.333 Therefore, Absolute Error, 1 0.333 0.333333 0.333 0.000333 3 a Exx ′ =− =− = − = Relative Error, E r = 0.000333 0.000999 0.333333 a E x == and Percentage Error, E p = 100 0.000999 100 0.099% r E ×= ×= . Example 5. Round-off the number 75462 to four significant digits and then calculate its absolute error, relative error and percentage error. Sol. After rounded-off the number to four significant digits we get 75460. Therefore Absolute Error E a = 75462 75460 2−= Relative Error E r = 2 75462 75462 aa EE true value == = 0.0000265 Percentage Error E p = E r × 100 = 0.00265. Example 6. Find the relative error of the number 8.6 if both of its digits are correct. Sol. Since − =× = 1 1 10 0.05 2 a E therefore, Relative Error = == 0.5 0.0058 8.6 r E . Example 7. Three approximate values of number 1 3 are given as 0.30, 0.33 and 0.34. Which of these three is the best approximation? Sol. The number, which has least absolute error, gives the best approximation. True value x = 1 0.33333 3 = When approximate value x′ is 0.30 the Absolute Error is given by: E a = −= − = ′ 0.33333 0.30 0.03333xx 8 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES When approximate value x′ is 0.33 the Absolute Error is given by: E a = ′ −= − =0.33333 0.33 0.00333xx When approximate value x′ is 0.34 the Absolute Error is given by: E a = ′ −= − =0.33333 0.34 0.00667xx Here absolute error is least when approximate value is 0.33. Hence 0.33 is the best approximation. Example 8. Calculate the sum of 3, 5 and 7 to four significant digits and find its absolute and relative errors. Sol. Here === 3 1.732, 5 2.236, 7 2.646 Hence Sum = 6.614 and Absolute Error = E a = 0.0005 + 0.0005 + 0.0005 = 0.0015 (Because − × 3 1 10 = 0.0005). 2 Also the total absolute error shows that the sum is correct up to 3 significant figures. Therefore S = 6.61 and Relative Error,E r = = 0.0015 0.0002 6.61 . Example 9. Approximate values of 1 7 and 1 11 , correct to 4 decimal places are 0.1429 and 0.0909 respectively. Find the possible relative error and absolute error in the sum of 0.1429 and 0.0909. Sol. The maximum error in each case = − ×=× = 4 11 10 0.0001 0.00005 22 1. Relative Error, E r = δ <+ 0.00005 0.00005 0.2338 0.2338 X X (Because X = 0.1429 + 0.0909) Therefore, δ <= 0.0001 0.00043 0.2338 X X 2. Absolute Error, E a = 0.0001 0.2338 0.0001. 0.2338 X X X δ ×= × = Example 10. Find the number of trustworthy figures in (367) 1/5 where 367 is correct to three significant figures. Sol. Relative Error δ < 1 ; 5 r x E x Therefore, δ =× = 1 1 0.5 0.0003 5 5 367 x x Similarly, Absolute Error <×=×= 1/5 (367) 0.0003 3.258 0.0003 0.001 a E Hence Absolute Error <0.001. Thus error effects fourth significant figure and hence (367) 1/5 ≈ 3.26 correct to the three figures. ERRORS AND FLOATING POINT 9 Example 11. Find the relative error in calculation of 7.342 0.241 . Where numbers 7.342 and 0.241 are correct to three decimal places. Determine the smallest interval in which true result lies. Sol. Relative Error δδ ≤+ 12 12 xx xx Here δx 1 = δx 2 = 0.0005, x 1 = 7.342, x 2 = 0.241 Therefore, Relative Error ≤+ 0.0005 0.0005 7.342 0.241 ×  ≤+= =  ×  1 1 0.0005 7.583 0.0005 0.0021 7.342 0.241 7.342 0.241 Similarly, Absolute Error  × ≤×= =   1 2 0.0021 7.342 0.0021 0.0639 0.241 x x Here 1 2 x x = = 7.342 30.4647 0.241 Hence true value of 7.342 0.241 lies between 30.4647 – 0.0639 = 30. 4008 and 30.4647 + 0.0639 = 30.5286. Example 12. Find the product of 346.1 and 865.2 and state how many figures of the result are trustworthy, given that the numbers are correct to four significant figures. Sol. For given numbers 346.1 and 865.2, δx 1 = 0.05 = δx 2 Because Error = − × 1 10 2 n Also, X = 346.1 × 865.2 = 299446 (correct to six significant figures) Therefore Relative Error δδ ≤+= + 12 12 0.05 0.05 346.1 865.2 r xx E xx = 0.000144 + 0.000058 = 0.000202 Similarly, Absolute Error E a = E r X ≤ 0.000202 × 299446 ≈ 60 So, true value of the product of the given numbers lies between 299446 – 60 = 299386 And 299446 + 60 = 299506. Hence the mean of these values is + = 299386 299506 299446 2 which is written as 299.4 × 10 3 . This is correct to four significant figures. Example 13. Find the relative error in the calculation of 3.724 × 4.312 and determine the interval in which true result lies. Given that the numbers 3.724 and 4.312 are correct to last digit? Sol. For product of numbers, Relative Error = δδδ δ ≤++ + 12 12 n n xxx X Xx x x 10 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Therefore, Relative Error, E r = += 0.0005 0.0005 0.0002501 3.724 4.312 (Because Error −− =× =× = 3 11 10 10 0.0005) 22 n Absolute Error, E a = E r X = 0.002501 × 3.724 × 4.312 = 0.0040157 Product x 1 x 2 = 3.724 × 4.312 = 16.057888 Lower limit is given by 16.057888 – 0.004016 = 16.053872 Upper limit is given by 16.057888 + 0.004016=16.061904 Hence true value lies between 16.0539 and 16.0619. Example 14. Find the absolute error in calculating (768) 1/5 and determine the interval in which true value lies 768 is correct its last digit. Sol. Relative Error, E r = δx k x =× 10.5 5 768 = = 0.1 0.0001302 768 Absolute Error, E a = E r × (768) 1/5 = 0.0001302 × 3.77636 = 0.0004916 Therefore, lower limit = 3.77636 – 0.00049 = 3.77587 and Upper limit = 3.77636 + 0.00049 = 3.77685 Hence value of (768) 1/5 lies between 3.77587 and 3.77685. Example 15. Find the number of correct figure in the quotient 65.3 7 , assuming that the numerator is correct to last figure. Sol. Since Relative Error, 12 12 δδ ≤+ r xx E xx Here δx 1 = 0.05 = δx 2 , x 1 = 65.7 and x 2 = 2.6 Therefore, Relative Error, 0.05 0.05 0.05 68.3 0.01999 65.7 2.6 65.7 2.6 r E × ≤+≤ = × Also, Absolute Error, 65.3 0.01999 0.502 2.6 a E ≤×= (since the error affects the first decimal place). Example 16. Find the percentage error if 625.483 is approximated to three significant figures. Sol. Here x = 625.483 and x′ = 625.0 therefore, Absolute Error, 625.483 625 0.483, a E =−= ERRORS AND FLOATING POINT 11 Relative Error, 0.483 0.000772 625.483 625.483 a r E E === and Percentage Error, 100 0.077%. pr EE =× = Example 17. Find the relative error in taking the difference of numbers 5.5 = 2.345 and 6.1 = 2.470 . Numbers should be correct to four significant figures. Sol. Relative Error 12 r xx E XX δδ ≤+ Here δx 1 = 0.0005 = δx 2 Therefore, Relative Error = 1 0.0005 22 2.470 2.345 x X δ = − = 0.0005 0.001 20.008 0.125 0.125 == . Example 18. If X = x + e prove that −≈ e Xx 2X . Sol. L.H.S. Xx− = 1 2 1 e XXe XX x  −−= − −   = 1 2 e XX X  −−   = 22 ee XX XX −+ ≈ . R.H.S. proved. Example 19. If 23 4 4x y u= z and errors in x, y, z be 0.001, compute the relative maximum error in u when x = y = z = 1. Sol. We know uuu uxyz xyz ∂∂∂ δ= δ+ δ+ δ ∂∂∂ Since − ∂∂ ∂ == = ∂∂ ∂ 322 23 44 5 812 16 ,, xy xy xy uu u xy z zz z Also the errors δx, δy, δz may be positive or negative, therefore absolute values of terms on R.H.S. is, () δ max u = δ+ δ+ δ 32223 44 5 812 12 xy xy xy xyz zz z = 8(0.001) + 12(0.001) + 16(0.001) = 0.036 Also, Max. Relative Error = = 0.036 0.009 4 (Because E r(max) = δ ; u u u = 4 at x = y = z = 1). 12 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Example 20. It is required to obtain the roots of X 2 – 2X + log 10 2 = 0 to four decimal places. To what accuracy should log 10 2 be given? Sol. Roots of the equation X 2 – 2X + log 10 2 = 0 are given by, X = ±− =± − 10 10 244log2 11log2 2 Therefore, δX = 4 (log 2) 1 0.5 10 2 1log2 − δ <× − or −− δ<××− < × 41/2 4 (log 2) 2 0.5 10 (1 log 2) 0.83604 10 ≈ 8.3604 × 10 –5 . Example 21. If r = 3h(h 6 – 2), find the percentage error in r at h = 1, if the percentage error in h is 5. Sol. We know δ n x = δ ∂ ∂ n X X n x where X = f(x 1 , x 2 , , x n ) Therefore, δr = δ δ= − δ ∂ 6 (21 6) r hh h h δ ×100 r r =  − δ×  −  6 7 21 6 100 36 h h hh = −δ   ×=×=−   −−   21 6 15 100 5 25% 36 3 h h Percentage Error = δ =× = 100 25% p r E r . Example 22. Find the relative error in the function 12 12 n mmm n yax x x = . Sol. Given function 12 12 n mmm n yax x x = . On taking log both the sides, we get log y = log a + m 1 log x 1 + m 2 log x 2 + + m n log x n Therefore,   ∂∂∂ ===   ∂∂∂    312 11 22 33 11 1 , , etc. yyym mm yx xyx xyx x Hence Relative Error, ∂∂ ∂ δδδ =++ + ∂∂ ∂ 12 12 n r n yy y xxx E xy x y x y = δδδ +++ 12 12 12 n n n xxx mm m xx x ERRORS AND FLOATING POINT 13 Since errors δx 1 , δx 2 may be positive or negative, therefore absolute values of terms on R.H.S. give, () δ δδ ≤+++ 12 12 max 12 n rn n x xx Emm m xx x . Remark: If y = x 1 x 2 x 3 x n , then relative error is given by δδδ ≈++ + 12 12 n r n xxx E xx x Therefore relative error of n product of n numbers is approximately equal to the algebraic sum of their relative errors. Example 23. The discharge Q over a notch for head H is calculated by the formula Q = kH 5/2 , where k is a given constant. If the head is 75 cm and an error of 0.15 cm is possible in its measurement, estimate the percentage error in computing the discharge. Sol. Given that Q = kH 5/2 On taking Log both the sides of the equation, we have log Q = log + 5 2 k log H On differentiating, we get 5 2 QH QH δδ = 50.15 1 100 100 0.5. 275 2 Q Q δ ×=× ×== Example 24. Compute the percentage error in the time period = 1 T2 g π for l = 1m if the error in the measurement of l is 0.01. Sol. Given T = π2 l g On taking log both the sides, we get log T = log 2π + − 11 log log 22 lg ⇒ δ 1 T T = δ1 2 l l ⇒ δ ×100 T T = δ ×= ×= × 0.01 100 100 0.5% 221 l l . Example 25. If u = 2V 6 – 5V, find the percentage error in u at V = 1, if error in V is 0.05. Sol. Given u = 2V 6 – 5V δu = ∂ δ= −δ ∂ 5 (12 5) u VV V V 14 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES ∂ ×100 u u =  − δ×  − 5 6 12 5 100 25 V V VV = − ××=−×=− − (12 5) 7 0.05 100 5 11.667% (2 5) 3 Hence maximum percentage error (E p ) max = 11.667%. Example 26. How accurately should the length and time of vibration of a pendulum should be measured in order that the computed value of g is correct to 0.01%. Sol. Period of vibration T is given by T = π2 l g , where l is the length of pendulum. Therefore, g = ∂ ππ ⇒= ∂ 22 22 44 g l l TT and () ∂ π =− ∂ 2 3 4 2 g l T T δl = and 22 gg T gg lT δδ δ= ∂∂     ∂∂   (1) But the percentage error in g is δ ×100 g g = 0.01 ⇒ 2 2 100 0.01 4 g l T δ ×= π (2) (a) Percentage Error in l = δ ×100 l l = 1 100 Because 2 2 gg l g g l l l δδ    ×δ=   ∂ ∂     ∂  ∂    = () () 22 2 2 11 100 100 2 24 4 gg l TlT  δδ  ×= ×  ππ  = ×= 1 0.01 0.005 2 (From 2) (b) Percentage Error in T= 100 T T × δ = 1 100 2 g TgT δ  ×  ∂∂  = 2 3 100 4 4 g l T δ ×  π   = ×= 1 100 0.0025 4 . (From 2) ERRORS AND FLOATING POINT 15 Example 27. Calculate the value of x – x cos θ correct to three significant figures if x = 10.2 cm, and θ = 5°. Find permissible errors also in x and θ. Sol. Given that θ = 5° = π = 511 radian 180 126 1 – cos θ =  θθ −− + −   24 1 1 2! 4! = θθ   −+ = − +     24 24 111 1 11 2! 4! 2 126 24 126 = 0.0038107 – 0.0000024 ≈ 0.0038083 Therefore X = x(1 – cos θ) = 10.2(0.0038083) = 0.0388446 ≈ 0.0388 Further, δx = δ =≈ ∂ ×    ∂ 0.0005 0.0656 2 0.0038083 2 X X x δθ = δ == ∂ θ× ×    ∂θ 0.0005 0.0005 2 sin 2 10.2 0.0871907 2 X X x where sin θ = θθ  θ−+− = − + =   3 35 11 1 11 0.0871907 3! 5! 126 6 126 Therefore δθ = ≈≈ × 0.0005 0.0002809 0.00028 20.4 0.0871907 . Example 28. The percentage error in R which is given by =+ 2 rh R 2h 2 , is not allowed to exceed 0.2%, find allowable error in r and h when r = 4.5 cm and h = 5.5 cm. Sol. The percentage error in R = δ ×=100 0.2 R R Therefore δR = () 2 4.5 0.2 0.2 5.5 100 100 2 5.5 2 R   ×= +  ×  Because R = + 2 22 rh h = × ×= 0.2 50.50 0.002 50.50 100 11 11 (1) . 0. 033 33xx 8 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES When approximate value x′ is 0 .33 the Absolute Error is given by: E a = ′ −= − =0 .33 333 0 .33 0.0 033 3xx When approximate value x′ is 0 .34 the Absolute. 1 3 , then find its absolute, relative and percentage errors. Sol. Given that True value () 1 3 x = , and its Approximate value (x′) = 0 .33 3 Therefore, Absolute Error, 1 0 .33 3 0 .33 333 3 0 .33 3. has least absolute error, gives the best approximation. True value x = 1 0 .33 333 3 = When approximate value x′ is 0 .30 the Absolute Error is given by: E a = −= − = ′ 0 .33 333 0 .30 0. 033 33xx 8 COMPUTER

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