A textbook of Computer Based Numerical and Statiscal Techniques part 8 doc

10 764 0
A textbook of Computer Based Numerical and Statiscal Techniques part 8 doc

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

Thông tin tài liệu

56 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES First approximation: 10 20 0 1) 0 () (() xx xx fx fx fx − =− − = 1 – () 1.5 1 0.2817 3.7225 0.2817 − − + = 1 + 0.14085 1.0352 4.0042 = Now, f(x 2 )= f(1.0352) = 1.0352e 1.0352 – 3 = 2.9148 – 3 = – 0.0852. Thus, the root lies between 1.0352 and 1.5. Then taking x 0 = 1.0352, x 1 = 1.5, f(x 0 ) = – 0.0852 and f(x 1 ) = 3.7225. Second approximation: The next approximation to the root is x 3 = x 0 – 10 0 1) 0 () (() xx fx fx fx − − = 1.0352 – () 1.5 1.0352 0.0852 3.7225 0.0852 − − + = 1.0352 + 0.0396 3.8077 = 1.0456 Now, f(x 3 )= f(1.0456) = 1.0456e 1.0456 – 3 = 2.9748 – 3 = –0.0252. Thus, the root lies between 1.0456 and 1.5. Then taking x 0 = 1.0456, x 1 = 1.5, f(x 0 ) = –0.0252 and f(x 1 ) = 3.7225. Third approximation: The next approximation to the root is 10 40 0 1) 0 () (() xx xx fx fx fx − =− − = 1.0456 – () 1.5 1.0456 0.0252 3.7225 0.0252 − − + = 1.0456 + 0.0115 1.0487 3.7477 = Now, f(x 4 )= f(1.0487) = (1.0487)e 1.0487 – 3 = 2.9929 – 3 = – 0.0071 Thus, the root lies between 1.0487 and 1.5. Fourth approximation: Taking x 0 = 1.0487, x 1 = 1.5, f(x 0 ) = – 0.0071 and f(x 1 ) = 3.7225. Then the root becomes 10 50 0 1) 0 () (() xx xx fx fx fx − =− − ALGEBRAIC AND TRANSCENDENTAL EQUATION 57 = 1.0487 – () 1.5 1.0487 0.0071 3.7225 0.0071 − − + = 1.0487 + 0.0032 3.7296 = 1.0496 Now, f(x 5 )= f(1.0496) = (1.0496) e 1.0496 – 3 = 2.9982 – 3 = – 0.0018. Thus the root lies between 1.0496, and 1.5. Fifth approximation: Taking x 0 = 1.0496, x 1 = 1.5, f(x 0 ) = – 0.0018 and f(x 1 ) = 3.7225. Then the next approximation to the root is given by 10 60 0 1) 0 () (() xx xx fx fx fx − =− − = 1.0496 – () 1.5 1.0496 0. 0018 3.7225 0.0018 − − + = 1.0496 + 0.00018 1.0498 3.7243 = . Hence, the root is approximately 1.0498 correct to three decimal places. Example 6. Find a real root of the equation x 2 – log e x – 12 = 0 using Regula-Falsi method correct to three places of decimals. Sol. Let f(x)= x 2 – log e x – 12 = 0 So that f(3) = 3 2 – log e 3 – 12 = – 4.0986 and f(4) = 4 2 – log e 4 – 12 and 2.6137 Therefore, f(3) and f(4) are of opposite signs. Therefore, a real root lies between 3 and 4. For the approximation to the root, taking x 0 = 3, x 1 = 4, f(x 0 ) = – 4.0986 and f(x 1 ) = 2.6137. First approximation: By Regula-Falsi method, the root is () () () 10 20 0 10 xx xx fx fx fx − =− − () 43 3 4.0986 2.6137 4.0986 − =− − + = 3 + 4.0986 3.6106 6.7123 = Now, f(x 2 )= f(3.6106) = (3.6106) 2 – log e (3.6106) – 12 = 13.0364 – 13.2839 = – 0.2475. Second approximation: The root will lies between 3.6106 and 4. Therefore for next approximation, taking x 0 = 3.6106, x 1 = 4, f (x 0 ) = – 0.2475 and f(x 1 ) = 2.6137. Then the root is () () () 10 30 0 10 xx xx fx fx fx − =− − 58 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES = 3.6106 – () 4 3.6106 0.2475 2.6137 0.2475 − − + = 3.6106 + 0.0964 3.6443 2.8612 = Now, f(x 3 )= f(3.6443) = (3.6443) 2 – log e (3.6443) – 12 = 13.2809 – 13.2932 = – 0.0123 Third approximation: The root lies between 3.6443 and 4. Therefore, taking x 0 = 3.6443, x 1 = 4, f(x 0 ) = – 0.0123 and f(x 1 ) = 2.6137. Then the root is given by x 4 = x 0 – () () () 10 0 10 xx fx fx fx − − = 3.6443 – () 4 3.6443 0.0123 2.6137 0.0123 − − + = 3.6443 + 0.0044 2.626 = 3.6459 Now, f(x 4 )= f(3.6459) = (3.6459) 2 – log e (3.6459) – 12 = 13.2926 – 13.2936 = – 0.001 Fourth approximation: The root lies between 3.6459 and 4. Therefore, taking x 0 = 3.6459, x 1 = 4, f(x 0 ) = – 0.001 and f(x 1 ) = 2.6137. Then the root is () () () 10 50 0 10 xx xx fx fx fx − =− − = 3.6459 – () 4 3.6459 0.001 2.6137 0.001 − − + = 3. 6459 + 0.00035 3.6460 2.6147 = Now, f(x 5 )= f (3.6460) = (3.6460) 2 – log e (3.6460) – 12 = 13.2933 – 13.2936 = – 0.0003 Fifth approximation: The root lies between 3.6460 and 4. Then for next approximation, taking x 0 = 3.6460, x 1 = 4, f(x 0 ) = – 0.0003 and f(x 1 ) = 2.6137. Then the root is x 6 = 10 00 10 () () () xx xfx fx fx − − − = 3.6460 – () 43.6460 0.0003 2.6137 0.0003 − − + = 3.6460 + 0.00011 2.614 = 3.6461 Hence the root is approximated by 3.646 correct to three decimal places. ALGEBRAIC AND TRANSCENDENTAL EQUATION 59 Example 7. (1) Solve x 3 – 5x + 3 = 0 by using Regula-Falsi method. (2) Use the method of Falsi Position to solve x 3 – x – 4 = 0 Sol. (1) Let f(x)= x 3 – 5x + 3 Since f(0.65) = 0.024625 and f(0.66) = – 0.012504 Hence root lies between 0.65 and 0.66. Let x 0 = 0.65 and x 1 = 0.66 Using method of Falsi Position, () () () 10 20 0 10 xx xx fx fx fx − =− − = 0.65 – () 0.66 0.65 0.024625 0.012504 0.024625  −  −−  = 0.656632282 Now, f(x 2 ) = – 0.00004392 Hence root lies between 0.65 and 0.656632282. Using method of Falsi Position, () () () 10 30 0 10 xx xx fx fx fx − =− − = 0.65 – () 0.656632282 0.65 0.024625 0.00004392 0.024625  −  −−  = 0.656620474 Since x 2 and x 3 are same up to 4 decimal places hence the required root is 0.6566 correct up to four decimal places. Similarly the other roots of this equation are 1.8342 and –2.4909. (2) Let f(x)= x 3 – x – 4 Since f(1.79) = – 0.054661 and f(1.80) = 0.032 Hence root lies between 1.79 and 1.80. Let x 0 = 1.79 and x 1 = 1.80 Using method of Falsi Position, () () () 10 20 0 10 xx xx fx fx fx − =− − = 1.79 – () 1.80 1.79 0.054661 0.032 0.054661 − − + = 1.796307 60 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Now, f(x 2 ) = – 0.00012936 Hence root lies between 1.796307 and 1.80. Using method of Falsi Position, () () () 10 30 0 10 xx xx fx fx fx − =− − = 1.796307 – () 1.8 1.796307 0.00012936 0.032 0.00012936  − −  +  = 1.796321 Since x 2 and x 3 are same up to 4 decimal places hence the required root is 1.7963 correct up to four decimal places. Example 8. Find the root of the equation tan x + tan h x = 0 which lies in the interval (1.6, 3.0) correct to four significant digits using of Falsi Position. Sol. Let f(x) = tan x + tan h x = 0 Since f(2.35) = – 0.03 and f(2.37) = 0.009 Hence the root lies between 2.35 and 2.37. Let x 0 = 2.35 and x 1 = 2.37. Using method of Falsi Position, x 2 = () () () 10 00 10 xx xfx fx f x − − − = 2.35 – () 2.37 2.35 0.03 0.009 0.03 − − + = 2.35 + () 0.02 0.03 2.365 0.039 = Now, f(x 2 ) = – 0.00004 Hence the root lies between 2.365 and 2.37. Using method of Falsi Position, () () () 10 30 0 10 xx xx fx fx f x − =− − = 2.365 – () 2.37 2.365 0.00004 0.009 0.00004 − − + = 2.365 + () 0.005 0.00004 0.00904 = 2.365 Hence the required root is 2.365 correct to four significant digits. ALGEBRAIC AND TRANSCENDENTAL EQUATION 61 PROBLEM SET 2.2 1. Find the real root of the equation x 3 – 2x – 5 = 0 by the method of Falsi Position correct to three decimal places. [Ans. 2.094] 2. Find the real root of the equation x log 10 x = 1.2 by Regula-Falsi method correct to four decimal places. [Ans. 2.7406] 3. Find the positive root of xe x = 2 by the method of Falsi Position. [Ans. 0.852605] 4. Apply Falsi Position method to find smallest positive root of the equation x – e –x = 0 correct to three decimal places. [Ans. 0.567] 5. Find the real root of the equations: (a) x = tan x [Ans. 4.4934] (b) x 2 – log e x – 12 = 0 [Ans. 3.5425] (c)3x = cos x + 1 [Ans. 0.6071] 6. Find the rate of convergence of Regula-Falsi method. 7. Find real cube root of 18 by Regula-Falsi method. [Ans. 2.62074] 8. Discuss method of Falsi Position. 2.6 ITERATION METHOD (METHOD OF SUCCESSIVE APPROXIMATION) This method is also known as the direct substitution method or method of fixed iterations. To find the root of the equation f(x) = 0 by successive approximations, we rewrite the given equation in the form x = g(x) (1) Now, first we assume the approximate value of root (let x 0 ) , then substitute it in g(x) to have a first approximation x 1 given by x 1 = g(x 0 ) (2) Similarly, the second approximation x 2 is given by x 2 = g(x 1 ) (3) In general, x i + 1 = g(x i ) (4) 2.6.1 Procedure For Iteration Method To Find The Root of The Equation f(x) = 0 Step 1: Take an initial approximation as x 0. Step 2: Find the next (first) approximation x 1 by using x 1 = g(x 0 ) Step 3: Follow the above procedure to find the successive approximations x i+1 by using x i+1 = g(x i ), i = 1, 2, 3 . Step 4: Stop the evaluation where relative error ≤ε , where ε is the prescribed accuracy. Note 1: The iteration method x = g(x) is convergent if () 1 gx < 1. Note 2: When () () () 111 11or1, >⇒ > <− gx gx gx the iterative process is divergent. 62 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES 2.6.2 Rate of Convergence of Iteration Method Let f(x) = 0 be the equation which is being expressed as x = g(x). The iterative formula for solving the equation is x i +1 = g(x i ) If a is the root of the equation x = g(x) lying in the interval ]a,b[, α = g (α). The iterative formula may also be written as () 1ii xgxx + =+−α Then by mean value theorem x i + 1 = g(α) + (x 1 – α)g’ (c i ) Where α < c i < b But g(α)= α ⇒ x i+1 = α + (x i – α) g’ (c i ) ⇒ x i+1 – α = (x i – α) g’ (c i ) (1) Now, if e i+1 , e i are the error for the approximation x i + 1 and x i Therefore, e i+1 = x i+1 – α, e i = x i – α Using this in (1), we get e i +1 = e i g’ (c i ) Here g(x) is a continuous function, therefore, it is bounded ∴ () ' , i gc k ≤ where k ∈ ]a,b[ is a constant. ∴ e i+1 ≤ e i k or 1i i e e + ≤ k Hence, by definition, the rate of convergence of iteration method is 1. In other words, iteration method converges linearly. Example 1. Find a real root correct upto four decimal places of the equation 2x – log 10 x – 7 = 0 using iteration method. Sol. Here, we have f(x)= 2x – log 10 x – 7 = 0 Now, we find that f(3) = – 1.447 = – ve and f (4) = 0.398 = +ve Therefore, at least one real root of f(x) = 0 lies between x = 3 and x = 4. Now, the given equation can be re-written as x = 1 2 [log 10 x + 7] = g(x), say. Now, g’ (x)= 1 , 2x from which we clearly note that 1 () g x < 1 for all x ∈ (3, 4). Again since () () 4 3 ff < , therefore, root is nearer to x = 4. Let the initial approximation be x 0 = 3.6 because f(3.6) tends to zero. Then from the iterative formula x i+1 = g(x i ), we obtain x 1 = g (x 0 ) = 1 2 [log 10 x 0 + 7] = 1 2 [log 10 3.6 + 7] = 3.77815 x 2 = g (x 1 ) = g (3.77815) = 3.78863 ALGEBRAIC AND TRANSCENDENTAL EQUATION 63 x 3 = g (x 2 ) = g (3.78863) = 3.78924 x 4 = g (x 3 ) = g (3.78924) = 3.78927 Hence, the root of the equation correct to the four places of decimal is 3.7892. Example 2. Solve x = 0.21 sin (0.5 + x) by iteration method starting with x = 0.12. Sol. Here, x = 0.21 sin (0.05 + x) ⇒ f(x) = 0.21 sin (0.5 + x) (1) Here we observe that () fx < 1. ⇒ Method of iteration can be applied. Now, first approximation of x is given by x (1) = 0.21 sin (0.5 + 0.12) = 0.21 sin (0.62) = 0.21(0.58104) = 0.1220 The second approximation of x is given by x (2) = 0.21 sin (0.5 + 0.122) = 0.21 sin (0.622) = 0.21(0.58267) = 0.1224 The third approximation of x is given by x (3) = 0.21 sin (0.5+0.1224) = 0.21 sin (0.6224) = 0.21(0.58299) = 0.12243 The fourth approximation of x is given by x (4) = 0.21 sin (0.5 + 0.12243) = 0.21 sin (0.62243) = 0.21(0.58301) = 0.12243 Here, we observe that x (3) = x (4) . Hence, the required root is given by x = 0.12243. Example 3. The equation sin x = 5x – 2 can be put as x = sin –1 (5x – 2) and also as x = 1 5 (sin x + 2) suggesting two iterating procedures for its solution. Which of these, if any, would succeed and which would fall to give root in the neighbourhood of 0.5. Sol. In First case, φ(x) = sin –1 (5x – 2) ∴φ(x)= () 2 5 15 2 x−− Hence, ()x ′ φ > 1 for all x for which (5x – 2) 2 < 1 or x < 3/5 or x < 0.6 in neighbourhood of 0.5. Thus the method would not give convergent sequence. In Second case, φ(x)= 1 5 (sin x + 2) ∴φ’(x)= 1 5 cos x 64 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Hence, () ′ φ≤ 1 5 x for all x because cos 1 x ≤ ∴φ’(x) will succeed. Hence taking x = φ(x) = 1 5 (sin x + 2) and initial value x 0 = 0.5, we have the first approximation x 1 given by x 1 = 1 5 (sin 0.5 + 2) = 0.4017 x 2 = 1 5 (sin 0.4017 + 2) = 0.4014 x 3 = 1 5 (sin 0.4014 + 2) = 0.4014 Hence up to four places of decimal, the value of required root is 0.4014. Example 4. Find the real root of the equation cos x = 3x – 1 correct to three decimal places, using iteration method. Sol. Here, we have f(x) = cos x – 3x + 1 (1) We observe that f(0) = 2 = +ve and f(π/2) = – 3 (π/2) + 1 = –ve ⇒ Roots lies between 0 and 2 π . Now, the given equation can be re-written as x = 1 3 (cos x + 1) = g(x) (say) Then, we have () () ′′ =− = < sin 1 3 x gx gx in (0, π/2) Hence iteration method can be applied. Take the first approximation x 0 = 0 Then we can find the successive approximation as: x 1 = g(x 0 ) = 1 3 [cos 0 + 1] = 0.667 x 2 = g(x 1 ) = 1 3 [cos (0.667) + 1] = 0.5953 x 3 = g(x 2 ) = 1 3 [cos (0.5953) + 1] = 0.6093 x 4 = g(x 3 ) = 1 3 [cos (0.6093) + 1] = 0.6067 x 5 = g(x 4 ) = 1 3 [cos (0.6067) + 1] = 0.6072 x 6 = g(x 5 ) = 1 3 [cos (0.6072) + 1] = 0.6071 Now, x 5 and x 6 being almost same. Hence the required root is given by 0.607. ALGEBRAIC AND TRANSCENDENTAL EQUATION 65 Example 5. Find the real root of equation f(x) = x 3 + x 2 – 1 = 0 by using iteration method. Sol. Here, f(0)= – 1 and f(1) = 1 so a root lies between 0 and 1. Now, x = 1 1 x + so that, φ(x)= 1 1 x + ∴φ′ (x)= – () 3/ 2 1 21 x + We have, () ′ φ x < 1 for x < 1 Hence iterative method can be applied. Take, x 0 = 0.5, we get x 1 = φ (x 0 ) = 1 0.816 49 1.5 = x 2 = φ (x 1 ) = 1 0.741 96 1.81649 = . . . . . x 8 = 0.75487 Example 6. Find the cube root of 15 correct to four significant figures by iterative method. Sol. Let x = (15) 1/3 therefore x 3 – 15 = 0 Real root of the equation lies in (2,3). The equation may be written as x = 3 15 20 ( ) 20 xx x +− =φ Now, φ’(x) = 1 – 2 3 20 x therefore () ′ φ x < 1 (for x ~ 2.5) Iterative formula is x i + 1 = 3 15 20 20 i i x x +− (1) Put i = 0, x 0 = 2.5, we get x 1 = 2.47 Put i = 1 in (1), x 2 = 2.466 (where x 1 = 2.47) Similarly, x 3 = 2.4661 Therefore 3 20 correct to 3 decimal places is 2.466. Example 7. Find the reciprocal of 41 correct to 4 decimal places by iterative formula x i+1 = x i (2 – 41x i ). Sol. Iterative formula is x i+1 = x i (2 – 41x i ) (1) Putting i = 0, x 1 = x 0 (2 – 41x 0 ) Let x 0 = 0.02 then x 1 = (0.02) (2 – 0.82) = 0.024 Putting i = 1 in (1) x 2 = (0.024) {2 – (41 × 0.024)} = 0.0244 . = 3. 788 63 ALGEBRAIC AND TRANSCENDENTAL EQUATION 63 x 3 = g (x 2 ) = g (3. 788 63) = 3. 789 24 x 4 = g (x 3 ) = g (3. 789 24) = 3. 789 27 Hence, the root of the equation correct to the four places of decimal. x 64 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES Hence, () ′ φ≤ 1 5 x for all x because cos 1 x ≤ ∴φ’(x) will succeed. Hence taking x = φ(x) = 1 5 (sin x + 2) and initial value x 0 . is approximated by 3.646 correct to three decimal places. ALGEBRAIC AND TRANSCENDENTAL EQUATION 59 Example 7. (1) Solve x 3 – 5x + 3 = 0 by using Regula-Falsi method. (2) Use the method of Falsi

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