numerical metods chapter 1 & 2

35
A Text Book for S.Y.B.Sc./S.Y.B.A. Mathematics (2013 Pattern), Savitribai Phule Pune University, Pune. T-222(B): NUMERICAL METHODS AND ITS APPLICATIONS Panel of Authors P.G.Jadhav(Convenor) Hon.Balasaheb Jadhav Arts, Commerce and Science College, Ale, Tal.: Junnar, Dist: Pune. (Email:[email protected]) B. B.Divate G.E.Society’s HPT Arts and RYK Science College, Nashik. (Email:[email protected]) B. S. Darekar Arts, Commerce and Science College, Narayangaon,Dist: Pune. (Email:bsdarekar@rediffmail.com, [email protected]) Editors Dr. P. M. Avhad Dr. S. A. Katre Conceptualized by Board of Studies(BOS) in Mathematics, Savitribai Phule Pune University, Pune.

Upload: naren-sundararajan

Post on 26-Sep-2015

39 views

Category:

Documents


6 download

DESCRIPTION

Pune University text for numerical analysis

TRANSCRIPT

  • A Text Book for S.Y.B.Sc./S.Y.B.A. Mathematics (2013 Pattern),

    Savitribai Phule Pune University, Pune.

    T-222(B): NUMERICAL METHODS AND ITS APPLICATIONS

    Panel of Authors

    P.G.Jadhav(Convenor)

    Hon.Balasaheb Jadhav Arts, Commerce and

    Science College, Ale, Tal.: Junnar, Dist: Pune.

    (Email:[email protected])

    B. B.Divate

    G.E.Society's

    HPT Arts and RYK Science College, Nashik.

    (Email:[email protected])

    B. S. Darekar

    Arts, Commerce and Science College,

    Narayangaon,Dist: Pune.

    (Email:[email protected], [email protected])

    Editors

    Dr. P. M. Avhad Dr. S. A. Katre

    Conceptualized by Board of Studies(BOS) in Mathematics, Savitribai Phule Pune

    University, Pune.

  • Preface

    We are glad to present this book to S.Y.B.Sc. Mathematics students of Pune Uni-

    versity. This book is strictly written according to the revised syllabus of second

    semester of S.Y.B.Sc. Mathematics, implemented by University of Pune, since June

    2014. The book deals with errors, solution of algebraic and transcendental equa-

    tions, Interpolation, Least Square Curve tting procedure, Numerical dierentiation

    and integration and numerical solution of rst order ODE.

    This book is based on our teaching experience of last 16 17 years. Simple andlucid language is used to explain the fundamental concept in each chapter. Book

    contains large number of examples with all types. We request the students to solve

    these problems on their own.

    We are thankful to Prof. P.M.Avhad (chairman) and all other BOS members in

    Mathematics, University of Pune for their continuous co-operation, encouragement,

    and motivation to write this book. We are also thankful to University authorities

    and press for publishing this book.

    Suggestions and comments for further development of this book are welcome and

    will be acknowledge.

    In case of queries/suggestions, send an email to: [email protected]

    -Authors

  • Acknowledgment

    We sincerely thank the following University authorities (Savitribai Phule Pune Uni-

    versity, Pune) for their constant motivation and valuable guidance in the preparation

    of this book.

    Dr. W. N. Gade, Hon. Vice Chancellor, Savitribai Phule Pune University,Pune.

    Dr. V. B. Gaikwad, Director BCUD, Savitribai Phule Pune University, Pune. Dr. K. C. Mohite, Dean, Faculty of Science, Savitribai Phule Pune University,Pune.

    Dr. B. N. Waphare, Professor, Department of Mathematics, Savitribai PhulePune University, Pune.

    Dr. M. M. Shikare, Professor, Department of Mathematics, Savitribai PhulePune University, Pune.

    Dr. V. S. Kharat, Professor, Department of Mathematics, Savitribai PhulePune University, Pune.

    Dr. V. V. Joshi, Professor, Department of Mathematics, Savitribai Phule PuneUniversity, Pune.

    Mr. Dattatraya Kute, Senate Member, Savitribai Phule Pune University; Man-ager, Savitribai Phule Pune University Press.

    All the sta of Savitribai Phule Pune University press.

  • iSyllabus: PAPER-II:MT-222(B): NUMERICAL METHODS AND ITS

    APPLICATIONS

    1. Errors: [4 ]

    1.1 Errors and Their Computations

    1.2 Rounding o numbers to n signicant digits, to n decimal places.

    1.3 Absolute, relative and percentage errors.

    1.4 A general error formula.

    2. Solution of Algebraic and Transcendental Equations: [10]

    2.1 Bisection method.

    2.2 The method of False position.

    2.3 The iteration method, Aitkens 42 process2.4 Newton- Raphson Method.

    3. Interpolation: [16]

    3.1 Finite Dierence Operators and their relations.

    3.2 Detection of Errors using dierence table.

    3.3 Dierences of a polynomial

    3.4 Newtons Interpolation Formulae (Forward and Backward )

    3.5 Lagranges Interpolation Formula

    3.6 Divided dierences and Newtons General Interpolation formula.

    4. Least Squares Curve Fitting Procedures [4]

    4.1 Fitting a Straight Line

    4.2 Nonlinear curve tting: Power function y = axc,polynomials of degree 2 and

    3,Exponential function y = cedx

    5. Numerical Dierentiation and Integration: [8 ]

    5.1Numerical Dierentiation

    5.2Numerical Integration,General quadrature formula.

    5.3 Trapezoidal rule.

    5.4 Simpsonss 13 rule.

    5.5 Simpsonss 13 rule.

  • ii

    6. Numerical solution of rst order ordinary dierential equations: [6]

    6.1 Taylor Series method

    6.2 Eulers method.

    6.3 Modied Eulers methods.

    6.4Runge - Kutta Methods 2nd and4th order.

    Text Books : Prepared by the BOS Mathematics, University of Pune.

    Recommended Book:

    1. S.S. Sastry; Introductory Methods of Numerical Analysis, 3rdedition, Prentice

    Hall of India.

    Sections:1.3,1.4,2.1,2.2,2.3,2.4,2.5,3.3,3.4,3.5,3.6,3.9.1,3.10(3.10.1only), 4.2.1,4.2.2,5.2(ex-

    cluding5.2.1,5.2.2),5.4.1,5.4.2,5.4.3,7.2,7.4,7.4.1,7.4.2,7.5

    Reference Book:

    1. K.E. Atkinson; An Introduction to Numerical Analysis, Wiley Publications.

    2. H.C.Saxena; Finite dierences and Numerical Analysis, S.Chand

    and Company

  • Contents

    1 ERRORS 1

    1.1 Introduction: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.2 Errors and Their Computations: . . . . . . . . . . . . . . . . . . . . . 1

    1.3 Rounding o errors to n signicant digits,to n decimal places: . . . . 2

    1.3.1 Truncation Error: . . . . . . . . . . . . . . . . . . . . . . . . . 3

    1.4 Absolute, relative and percentage errors: . . . . . . . . . . . . . . . . 3

    1.5 A General Error formula: . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2 SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUA-

    TIONS 12

    2.1 Introduction: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    2.2 Mathematical Preliminaries: . . . . . . . . . . . . . . . . . . . . . . . 12

    2.3 The Bisection Method: . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    2.4 The Method of False Position: . . . . . . . . . . . . . . . . . . . . . . 16

    2.5 The Iteration Method : . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    2.5.1 The Aitken's 42-process : . . . . . . . . . . . . . . . . . . . . 232.6 Newton-Raphson Method: . . . . . . . . . . . . . . . . . . . . . . . . 25

    iii

  • Chapter 1

    ERRORS

    1.1 Introduction:

    Now a days we use digital computers to solve mathematical problems.In practical

    applications, an engineer also obtain nal results in numerical form with help of

    computers. As computers have a nite world length so only xed number of digits

    are used for computation. So, when we use any kind of computer or calculator to

    solve mathematical problems, we get solutions quickly with some errors. In this

    chapter we study various errors and their computations.

    1.2 Errors and Their Computations:

    There are two types of numbers viz, exact and approximate numbers. Any real

    number is exact number. e.g. 1; 2;5;12; 311000 ; 3151327 ;p7;10p7; ; e:::: are exact

    numbers. Approximate numbers are those that represent the rational or irrational

    numbers to a certain required accuracy.Approximate value of is 3:1416 or its better

    approximation is 3:14159265. But we can not write its exact value. Same is true for

    any irrational number.

    Denition 1.1. Signicant Digits : The digits which are used to express a num-

    ber are called signicant digits or signicant gures.

    The numbers 62:345; 0:32122; 0:10026; 0:99999 contain ve signicant digits each.

    23:4; 0:234; 0:0234; 0:000234 have three signicant gures.

    The number of signicant digits is uncertain in number which is represented

    by whole number like 32; 354; 1; 02; 34; 500 etc. The number 66400 has uncertain

    1

  • CHAPTER 1. ERRORS 2

    number of signicant digits, whereas the numbers 6:64104, 6:640104 and 6:6400104 have three, four and ve signicant gures, respectively.

    1.3 Rounding o errors to n signicant digits,to n decimal

    places:

    Denition 1.2. Rounding-o process: In numerical computations, we come

    across numbers numbers which have large number of digits and it will be necessary

    to cut them to a suitable and usable number of gures. This process is called as

    rounding-o.

    Rules to round-o the number:To round-o a number to n signicant digits,

    discards all digits to the right of the nth digit and if this (n+1)th discarded number

    is

    1. less than 5,then leave the nth unaltered.

    2. greater than 5, then add 1 in nth digit.

    3. is 5 then

    (a) keep nth digit as it is if (n+ 1)th digit is even.

    (b) add 1 in nth digit if (n+ 1)th digit is odd.

    Illustrative Examples

    Example 1.1. Round-o following numbers to two, three and four signicant g-

    ures.

    3:3465827; 15:23538753; 5:375829; 0:00457328; 54:2549757

    Solution: The table for round-o(R-o) numbers to 2; 3 and 4 signicant gures

    (SF) of given numbers is as follows:Sr. No. Given number R-o no.to 2-SF R-o no.to 3-SF R-o no.to 4-SF

    1 3.3465827 3.35 3.346 3.34662 15.23538753 15.24 15.235 15.23543 5.375829 5.38 5.376 5.37584 0.00457328 0.00 0.004 0.00465 54.2549757 54.25 54.255 54.2550

  • CHAPTER 1. ERRORS 3

    1.3.1 Truncation Error:

    There is another type of error which is known as truncation error which is computed

    by using approximate formula obtained by truncation of innite series given real

    function. This error is associated with the problem of convergence.

    Suppose Taylor's series of real function f(x) is

    f(x+ h) = f(x) + hf(x) +h2

    2!f 00(x) +

    h3

    3!f 000(x) + (1.1)

    If we neglect second and higher order derivatives in the above expansion (1:3:1)

    then the error which arises in computation due to the truncation in formula is a

    truncation error.

    Remark 1.1. The round-o error can be reduced by computing for more signicant

    gures. A useful rule is for each step retain at least one more gure than that given in

    the data, round-o after performing last operation. The computer allow a precision

    of 7 signicant gures in the range about 1038 to 1039. Arithmetic carried out withthis precision is called single precision. For more accuracy arithmetic carried out

    with 15 signicant gures with range about 10308 to 10308 (by MATLAB) is calleddouble precision.

    1.4 Absolute, relative and percentage errors:

    Denition 1.3. If xt is true value and xa is approximate value of a given quantity

    then

    Error e is dened as

    e = xt xa = x (1.2)

    Absolute error ea is dened as

    ea = jxt xaj (1.3)

    Relative error er is dened as

    er =eaxt

    =x

    xt(1.4)

  • CHAPTER 1. ERRORS 4

    Percentage error ep is dened as

    ep = 100er = 100xxt

    (1.5)

    Let U be number such that

    ea = jxt xaj 6 U (1.6)then U is an upper limit of the absolute error and is said to measure absolute accu-

    racy. Similarly the quantity

    U

    jxtj U

    jxaj (1.7)

    measures the relative accuracy.

    Result 1: If x is the number rounded to n decimal places then the upper limit

    of the absolute error is given by

    U =1

    2 10n (1.8)

    Theorem 1.1. Let x1 and x2 be true values of two quantities,x1a and x

    2a be their

    approximate values respectively.If e1,e2 and esum are errors in x1,x2 and x1 + x2respectively then

    esum = e1 + e2: (1.9)

    (i.e. Sum of errors of two numbers is error of their sum.)

    Proof:

    e1 = x1 x1a and e2 = x2 x2ae1 + e2 = (x1 x1a) + (x2 x2a)

    = (x1 + x2) (x1a + x2a)= esum

    Theorem 1.2. Let x1 and x2 be true values of two quantities,x1a and x

    2a be their

    approximate values respectively. If e1,e2 and ediff are errors in x1,x2 and x1 x2respectively then

    ediff = e1 e2: (1.10)

  • CHAPTER 1. ERRORS 5

    (i.e. Dierence of errors of two numbers is error of their dierences.)

    Proof:

    e1 = x1 x1a and e2 = x2 x2ae1 e2 = (x1 x1a) (x2 x2a)

    = (x1 x2) (x1a x2a)= ediff

    Theorem 1.3. Let x1 and x2 be true values of two quantities,x1a and x

    2a be their

    approximate values respectively. If e1,e2 and eprod are errors in x1,x2 and x1x2respectively then

    eprod = x1e2 + x2e1 (approximately): (1.11)

    Proof:

    eprod = (x1 + e1)(x2 + e2) x1x2= x1x2 + x1e2 + x2e1 + e1e2 x1x2= x1e2 + x2e1 + e1e2

    = x1e2 + x2e1 (approximately)

    Theorem 1.4. Let x1 and x2 be true values of two quantities,x1a and x

    2a be their

    approximate values respectively. If e1,e2 and eq are errors in x1,x2 andx1x2

    respectively

    then

    eq =x1x2

    e1x1 e2

    x2

    (approximately): (1.12)

    Proof:

    eq =(x1 + e1)

    (x2 + e2) x1

    x2

    =x2(x1 + e1) x1(x2 + e2)

    x2(x2 + e2)

    =x2e1 x1e2x22

    1 + e2x2

    =

    x2e1 x1e2x22

    (approximately by neglectinge2x2)

    =x1x2

    e1x1 e2

    x2

  • CHAPTER 1. ERRORS 6

    Result 2: If e1; e2; ::::; en are errors in n numbers x1; x2; ::::; xn respectively then

    the error in their sum is

    e = e1 + e2 + ::::+ en (1.13)

    Procedure to nd sum of numbers with dierent accuracies :

    1. Isolate the number with largest error.

    2. Round-o all other numbers retaining in them one digit more than in the iso-

    lated number.

    3. Add up them.

    4. Round-o the sum by discarding the one digit.

    Example 1.2. If x = 0:321 is correct to 3 decimal places, then nd upper limit of

    its absolute error and its relative accuracy.

    Solution:We know that if the number x is rounded to N decimal places, then

    upper limit of its absolute error is given by ,

    U = 12(10N) and absolute accuracy is given by Ujxj .

    The upper limit U is

    U =1

    2(103) = 0:0005;

    and the relative accuracy is ,

    U

    jxj =0:0005

    0:321= 0:0016

    Example 1.3. An approximate value of is given by x1 =227 and its true value is

    x = 3:141592654 Find the relative error.

    Solution: We have

    e = x x1 = 0:0030694er =

    0:00306943:141592654

    = 0:000977

    Example 1.4. Three approximate values of the number 19 are given by 0:10,0:11and

    0:12. Which of these three is the best approximation ?

  • CHAPTER 1. ERRORS 7

    Solution: We have 19 0:10 = 19019 0:11 = 190019 0:12 = 8900

    It follows that 0.11 is the best approximation for 19 .

    Example 1.5. Find the relative error of the number 11:64 if all of its digit are

    correct.

    Solution: Here error in the number x = 11:64 is,

    e =1

    2(102) = 0:005;

    Hence relative error is,

    er =e

    jxj =0:005

    j11:64j = 4:30 104:

    Example 1.6. Evaluate the sum S =p3+ 3p11+

    p5 to 4 signicant digits. Also,nd

    its error and relative error.

    Solution: We have,p3 = 1:732;

    3p11 = 2:234;

    p5 = 2:236

    correct to 4 signicant digits.Hence,

    S =p3 +

    3p11 +

    p5 = 1:732 + 2:234 + 2:236 = 6:602

    Now error in each number is 0:0005 hence error in S is,

    e = 3 0:0005 = 0:0015:This total error shows that the sum is correct to 3 signicant digits only. Hence we

    take S = 6:60 and then relative error in Sis,

    er =e

    jxj =0:0015

    j6:60j = 2:27 104 = 0:0002:

  • CHAPTER 1. ERRORS 8

    Example 1.7. Find the sum of the numbers:

    0:1234; 0:3453; 0:000045; 186:12; 15:42; 0:0265; 304:24; 0:7694; 23:6758

    Where in each number all given digits are correct.

    Solution: We have three numbers, 186:12; 15:42; 304:24 which have greatest error

    which is 0:005: Hence we round-o all the other number to three decimal digits.

    These are :

    0:123; 0:345; 0:000; 0:027; 0:769; and 23:676

    The sum is given by

    S = 186:12 + 15:42 + 304:24 + 0:123 + 0:345 + 0:000 + 0:027 + 0:769 + 23:676 = 530:72

    To determine the error, we note that the rst three numbers have each an error of

    0:005 and remaining have an error of 0:0005 each. Thus error in all the 9 numbers

    in the sum is given by

    e = 3(0:005) + 6(0:0005)

    = 0:015 + 0:003

    = 0:018

    Thus The sum is given by

    S = 530:72 0:018

    Example 1.8. Two numbers are given as 4:8 and 53:23, both of which being correct

    to the signicant gures given. Find their product.

    Solution: Here the number with greatest error is 4:8 Hence we round-o the

    second number to three signicant digits, i.e. 53:2 Their product is given by

    P = 4:8 53:2 = 255:36 = 2:6 102

    We have taken only two signicant digit since one of the given number, 4:8, contained

    only two signicant digits.

  • CHAPTER 1. ERRORS 9

    1.5 A General Error formula:

    In this we derive a general formula for the error committed in using a certain func-

    tional relation.Let

    u = f(x1; x2; :::; xn) (1.14)

    be a function of n variables x1; x2; :::; xn, and let the error in each xi be 4xi. Thenthe error 4u in u is given by

    u+4u = f(x1 +4x1; x24x2; :::; xn4xn) (1.15)

    Expanding the right-hand-side by Taylor"s series we obtain

    u+4u = f(x1; x2; :::; xn) +nXi=1

    @f

    @xi4xi + term involving(4xi)2 (1.16)

    Assuming that the errors in xi are small and that (4xi)xi 1, so that the squaresand higher powers of 4xi can be neglected, the above relation yields

    4u nXi=1

    @f

    @xi4xi = @f

    @x14x1 + @f

    @x24x2 + :::::+ @f

    @xn4xn (1.17)

    We observe that this formula has the same form as that for the total dierential of

    u. The formula for the relative error follows immediately:

    er =4uu

    =@u

    x1

    4x1u

    +@u

    x2

    4x2u

    + :::::+@u

    xn

    4xnu

    (1.18)

    Example 1.9. If u = 2yzx2. If the errors in x; y and z is taken as 0:001 andtaking x = y = z = 1 then nd the relative error.

    Solution:

    @u

    @x= 2yz

    x3;@u

    @y=

    2z

    x2;@u

    @z=

    2y

    x2

    and

    4u = 2yzx34x+ 2z

    x24y + 2y

    x24z

  • CHAPTER 1. ERRORS 10

    In general, the errors 4x;4y and 4z may be positive or negative, and hence wetake the absolute values of the term on the right side. This gives

    (4u)max 2yzx3 4x

    + 2zx24y+ 2yx24z

    Now, let 4x = 4y = 4z = 0:001 and x = y = z = 1 then, the relative maximumerror (er)max is given by

    (er)max =(4u)max

    u=

    0:006

    2= 0:003

    Exercise:

    1. Round-o the following numbers to 2; 3 and 4 signicant gures

    23:4523619826; 0:00154876; 235:69854756; 0:0000011455; 7:2564266

    2. Estimate the sum S =p3+

    p5+

    p7 to four signicant digits and nd its error

    and relative errors. (S = 6:614; e = 0:0015; er = 0:0002)

    3. Calculate the value ofp102p101 (0.04963)

    4. Find the sum of the numbers 105:5; 27:25; 6:56; 0:1568; 0:000256; 208:6;

    0:0235; 0:538 and 0:0571, where each number is correct to digits given. Esti-

    mate the error in the sum. (348:7 0:15)5. Find the sum of the numbers 0:1532; 15:45; 0:000354; 305:1; 8:12; 143:3;

    0:0212; 0:643 and 0:1734, where each number is correct to digits given. Esti-

    mate the error in the sum. (472:6 0:015)6. Find the product of two numbers 56:54 and 12:4 which are both correct to the

    signicant digits given. (701)

    7. Find the product of two numbers 48:3 and 2:5 which are both correct to the

    signicant digits given. (120)

    8. Find the quotient q = x=y, where x = 4:536 and y = 1:32, correct to the digits

    given. Find also the relative error in the result. (q = 3:44; er = 0:0039)

    9. Find the quotient q = x=y, where x = 5:647 and y = 2:52, correct to the digits

    given. Find also the relative error in the result. (q = 2:24; er = 0:002)

  • CHAPTER 1. ERRORS 11

    10. Three approximate values of the number 1=3 are given as 0:30, 0:33 and 0:34

    Which of this three is the best approximation. (0:33)

    11. Three approximate values of the number 2=3 are given as 0:65, 0:66 and 0:67

    Which of this three is the best approximation. (0:67)

    12. Three approximate values of the number 1=6 are given as 0:165, 0:166 and 0:167

    Which of this three is the best approximation. (0:167)

  • Chapter 2

    SOLUTION OF ALGEBRAIC ANDTRANSCENDENTAL EQUATIONS

    2.1 Introduction:

    In scientic and engineering studies we come across roots of equations of the form

    f(x) = 0: (2.1)

    If f(x) is linear, quadratic, cubic or a biquadratic expression, then algebraic formulae

    are available for expressing the roots in terms of the coecients. On the other hand

    if f(x) is polynomial of higher degree or an expression involving transcendental

    functions then algebraic methods are not available to nd roots of such equations.

    In this chapter we study several numerical methods like bisection method, the

    method of false position, iteration method, Aitken's 42 process and Newton Raph-son method to nd solutions of algebraic and transcendental equation.

    2.2 Mathematical Preliminaries:

    In this section we state certain denitions and mathematical results which would be

    useful in the sequel.

    Denition 2.1. Algebraic function: An expression of form

    f(x) = a0 + a1x+ a2x2 + :::+ anx

    n (2.2)

    is called as algebraic function or polynomial function of degree n.

    12

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 13

    Denition 2.2. Transcendental function: A non algebraic function involving at

    least one of exponential, logarithmic, trigonometric, inverse trigonometric function

    is called as transcendental function.

    Theorem 2.1. Location of roots result: If function f(x) is continuous on closed

    and bounded interval [a; b] and if f(a):f(b) < 0 ( i.e.f(a) and f(b) have opposite

    signs) then f() = 0 for at least one 2 (a; b).Theorem 2.2. Mean value Theorem:If function f(x) is,

    1. continuous on closed and bounded interval [a; b]

    2. dierentiable on (a; b),

    then there exist for at least one 2 (a; b) such that

    f() =f(b) f(a)

    b a : (2.3)

    Theorem 2.3. Taylor's series:If f(x) possesses all ordered continuous derivatives

    in an interval containing a then in that interval f(x) is expressed as series containing

    powers of (x a) as follows:

    f(x) = f(a) + (x a)f 0(a) + (x a)2

    2!f 00(a) + + (x a)

    n

    n!f (n)(a) + (2.4)

    (This series is called as Taylor's series of f(x) about a.)

    2.3 The Bisection Method:

    This method depends on repeated application of the location of root result.

    Let f(x) = 0 be equation such that such that f(x) is the continuous real function

    on some interval I.We use following steps to nd a approximate root of f(x) = 0.

    1. Choose real numbers a and b satisfying a < b in I such that f(a)f(b) < 0.

    2. The rth approximate root of the equation is given by,

    xr =(a+ b)

    2; r = 0; 1; 2; : (2.5)

    3. If f(xr) = 0 then xr is a root/solution of the equation f(x) = 0.Stop the

    process.

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 14

    4. If f(xr) 6= 0 then(a) If f(a)f(xr) < 0 then root lies in the interval (a; xr).Then take b = xr and

    go to step 2 above.

    (b) If f(xr)f(b) < 0 then root lies in the interval (xr; b).Then take a = xr and

    go to step 2 above.

    5. Repeat steps 2 , 3 and 4 till we get root correct to required accuracy or till

    getting required number of iterations.

    Note: In bisection method in each iteration width of interval is reduced by a

    factor one half and hence at the end of nth step width of interval containing root

    will be jbaj2n . Now,

    jb aj2n

    , n loge(jb aj )loge2

    (2.6)

    This inequality is useful to nd number of iterations n required to obtain a root

    with accuracy .

    Example 2.1. Find the root of the equation x2 5x+3 = 0using bisection method.Solution:

    Since f(4) is negative and f(5) is positive, a root lies between 4 and 5 and therefore

    we take x0 = 4:5. Then f(x0) = 0:75 which is positive.

    Hence the root lies between 4 and 4:5 and we obtain

    x1 =4 + 4:5

    2= 4:25

    we nd f(x1) = 0:2656 which is negative. We therefore conclude that the root liesbetween 4:25 and 4:5.

    Proceeding this way, the following table is obtained

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 15

    n. a b x f(x)

    1 4 5 4.5 0.752 4 4.5 4.25 -0.18753 4.25 4.5 4.375 0.26564 4.25 4.375 4.3125 0.03525 4.25 4.3125 4.2812 -0.07716 4.2813 4.3125 4.2969 -0.02127 4.2969 4.3125 4.3047 0.00698 4.2969 4.3047 4.3008 -0.00729 4.3008 4.3047 4.3027 -0.000110 4.3027 4.3047 4.3037 0.003311 4.3042 4.3047 4.3044 0.006012 4.3044 4.3047 4.3046 0.0065

    At n = 12, it is seen that the dierence between two successive iterates is 0.0005

    which is less than 0:001. Thus x = 4:3046 is the approximate root of the given

    equation.

    Example 2.2. Find the root of the equation ex = sinx using bisection method.

    Solution:

    We have f(x) = ex sinx = 0. Since f(0) is positive and f(1) is negative, a rootlies between 1 and 0 and therefore we take x0 = 0:5. Then f(x0) = 0:1271 which is

    positive.

    Hence the root lies between 1 and 0:1271 and we obtain

    Proceeding this way, the following table is obtained

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 16

    n a b x f(x)

    1 1 0 0.5 0.12712 1 0.5 0.75 -0.20933 0.75 0.5 0.625 -0.04984 0.625 0.5 0.5625 0.03655 0.625 0.5625 0.5937 -0.00726 0.5938 0.5625 0.5781 0.01457 0.5938 0.5781 0.5859 0.00368 0.5938 0.5859 0.5898 -0.00189 0.5898 0.5859 0.5879 0.000910 0.5898 0.5879 0.5889 -0.000411 0.5889 0.5879 0.5884 0.0002

    At n = 11, it is seen that the absolute dierence between two successive iterates

    is 0:0006 which is less than 0:001. Thus x = 0:5884 is the approximate root of the

    given equation.

    Exercise:

    Using Bisection method nd root (correct up to three decimal places) of the following

    equations.

    1. x3 + x2 + x+ 7 = 0 (2:105)2. x3 x 4 = 0 (1:79604)3. x3 x2 1 = 0 (1:466)4. x3 3x 5 = 0 (2:279)5. x3 5x+ 3 = 0 (0:657)

    2.4 The Method of False Position:

    This is the oldest method for nding the real root of a nonlinear equation y = f(x) =

    0. In this method rstly we choose two points a and b such that f(a) and f(b) have

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 17

    opposite signs. Hence,a root must lies between these points. Now, the equation of

    the chord joining the two points A(a; f(a) and B(b; f(b)) is given by

    y f(a)x a =

    f(b) f(a)b a (2.7)

    Suppose chord represented by above equation intersectsX axis at x0 and assumex0to be root of f(x) = 0. Therefore,y = 0 when x = x0.Substituting x = x0 and y = 0

    in (2.3.1) and simplifying we get,

    x0 = a f(a)f(b) f(a) =

    af(b) bf(a)f(b) f(a) (2.8)

    This formula gives rst approximate root of f(x) = 0.

    We use following steps to nd a approximate root of f(x) = 0 by False position

    (Regula falsi) method:

    1. Choose real numbers a and b satisfying a < b in I such that f(a)f(b) < 0.

    2. The rth approximate root of the equation is given by,

    xr = a f(a)f(b) f(a) =

    af(b) bf(a)f(b) f(a) ; r = 0; 1; 2; : (2.9)

    3. If f(xr) = 0 then xr is a root/solution of the equation f(x) = 0.Stop the

    process.

    4. If f(xr) 6= 0 then(a) If f(a)f(xr) < 0 then root lies in the interval (a; xr).Then take b = xr and

    go to step 2 above.

    (b) If f(xr)f(b) < 0 then root lies in the interval (xr; b).Then take a = xr and

    go to step 2 above.

    5. Repeat steps 2 , 3 and 4 till we get root correct to required accuracy or till

    getting required number of iterations.

    Example 2.3. Find the root of the equation x3 x2 1 = 0 using False positionmethod.

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 18

    Solution:

    Since f(1) is negative and f(2) is positive, a root lies between 1 and 2 and therefore

    we take x0 = 1 and x1 = 2. Now by the formula

    x2 = x0 f(x0)f(x1) f(x0)(x1 x0)

    x2 = 1 f(1)3 (1)(2 1)

    x2 = 1:25

    Now f(x2) = 0:6094 which is negative so root lies between1:25 and 2 Thereforenow we take x0 = 1:25 and x1 = 2 and using the formula again we get

    x3 = x0 f(x0)f(x1) f(x0)(x1 x0)

    x3 = 1:25 f(1:25)3 (0:6094)(2 1:25)

    x3 = 1:3766

    Now f(x3) = 0:2863 which is negative so root lies between1:3766 and 2 Thereforenow we take x0 = 1:25 and x1 = 2 and continuing this process we get following

    table.

    n x0 x1 xn f(xn)

    1 1 2 1.25 -0.60942 1.25 2 1.3766 -0.28633 1.3766 2 1.4309 -0.11774 1.4309 2 1.4524 -0.04575 1.4524 2 1.4606 -0.01736 1.4606 2 1.4637 -0.00657 1.4637 2 1.4649 -0.002458 1.4649 2 1.4653 -0.00099 1.4653 2 1.4655 -0.0003

    At n = 9, it is seen that the absolute dierence between two successive iterates

    is 0:0001 which is less than 0:001. Thus x = 0:4655 is the approximate root of the

    given equation.

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 19

    Exercise:

    1. Using False position method nd root, correct to three decimal places of the

    following equations.

    (a) x3 x 4 = 0 (1:796)(b) x3 x 1 = 0 (1:325)(c) x3 + x 1 = 0 (0:682)(d) x3 + x2 + x+ 7 = 0

    (e) x3 x 4 = 0(f) x3 x2 1 = 0

    2. Evaluate the following by using False position method.

    (a) 2p18 (3:1622)

    (b) 3p13 (4:2426)

    (c) 2p10 (2:3513)

    (d) 4p72 (2:9129)

    2.5 The Iteration Method :

    In previous root nding methods, we use end points of a interval containing a root

    to nd an approximate root of the given equation.In iteration method we take value

    in a interval containing a root as initial approximate root of the given equation and

    improve it to required accuracy.

    Let f(x) = 0 be given equation. In iteration method to nd a root of equation

    f(x) = 0,we use following steps:

    1. Using location of root result nd an interval I containing a root of the equa-

    tion.

    2. Rewrite equation f(x) = 0 as x = (x) where 0(x) < 1 for each x 2 I.

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 20

    3. Take x0 2 I as an initial approximate root and obtain sequence of approximateroots by using

    xn+1 = (xn); n = 0; 1; 2; (2.10)This sequence converges to the root of the equation.

    4. Stop the process of obtaining a sequence when we get approximate root correct

    to required accuracy.

    Theorem 2.4. Let be a root of the equation f(x) = 0 in an interval I, x0 2 I bean approximate root of the equation and x = (x) be an equivalent expression of the

    equation f(x) = 0 such that

    1. (x) and 0(x) are continuous on I.

    2. j0(x) < 1j for all x 2 I.Then, sequence obtained by relation

    xn+1 = (xn); n = 0; 1; 2; (2.11)converges to the root .

    Proof: Since is a root of the equation f(x) = 0 x = (x), therefore we have = () (2.12)

    From (2.4.2),

    x1 = (x0) (2.13)

    Subtracting (2.4.4) from (2.4.3) we get,

    x1 = () (x0) (2.14)Now without loss of generality assume x0 < then by hypothesis (x) satisfy both

    conditions of Lagrange's mean value theorem on the interval [x0; ] I. Thereforethere exist 0 2 (x0; ) such that

    0(0) =() (x0)

    x0 (2.15)) ( x0)0(0) = () (x0) (2.16)

  • CHAPTER 2. SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 21

    From (2.4.5) and (2.4.7) we get,

    x1 = ( x0)0(0); x0 < 0 < (2.17)

    Similarly we obtain

    x2 = ( x1)0(1); x1 < 1 < (2.18) x3 = ( x2)0(2); x2 < 2 < (2.19)

    ...

    xn+1 = ( xn)0(n); xn < n < (2.20)

    Now j0(x)j < 1 implies

    j0(i)j r < 1; 8i; for some r 2 (0; 1): (2.21)

    Using this relation in equations (2.4.8) to (2.4.12) we get

    j x0j j x1j j x2j j xnj j xn+1j: (2.22)

    This shows that all successive approximations lies in I.

    Now multiplying equations (2.4.8) to (2.4.12) we get

    xn+1 = ( x0)0(0)0(1)0(2) 0(n) (2.23)

    From (2.4.12) and (2.4.14) we get,

    j xn+1j rn+1j( x0)j ! 0 as n!1: (* r 2 (0; 1):) (2.24)

    Thus sequence of approximations x0; x1; x2; converges to the root . Example 2.4. Find the root of the equation 3x = cosx+ 1 using iteration method.

    Solution:

    3x = cosx+ 1

    (x) = x =1

    3(cosx+ 1)

    j0(x)j = jsinxj3