0% found this document useful (0 votes)
1K views756 pages

888e8d63-ccc8-462c-88ad-f7854858e313

Uploaded by

Ali Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
1K views756 pages

888e8d63-ccc8-462c-88ad-f7854858e313

Uploaded by

Ali Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
MINUMERICAL’ ANALYSIS ~ , ¥ > 4 Y {yn a x (M4 ~~ N @ ? ww é po we a a y~¥ i , -— 4 » d 4 | we ~ } > - ye ~ > wo , Y a Laat < 4 pros ‘ { ‘al ~ oe i Be I } , a» SIVARAMAKRISHNA DAS C. VUAYAKUMARI Gk Scanned with CamScanner Numerica P. Sivaramakrishna Das Retired Professor and Heod, Department of Mathematics Ramakrishna Mission Vivekananda College Chennai Scane by Asad Ali Scanned with CamScanner WAH Associate Editor—Acquisitions, RP Mathivathani Editor—Production: M. Balakrishnan ISBN 978-81-317-7646.9 First Impression Published by Dorling Kindersley (india) Put Ltd, licensees of Pearson Education in South Asia Head Office: 7th Floor, Knowledge Boulevard, A-8(A), Sect for 62, Noida 201 309, UP, India Registered Office: 11 Cornmunity Centre, Panchshec! Park, , New Delhi 110 017, India. Compositor: Mukesh Technologies Pu, Ltd., Puducherry, Printer: Saurabh Printers Pvt. Ltd,, Noida Scanned with CamScanner Dedicated to Our beloved Parents Scanned with CamScanner Preface xvii About the Authors — xix CHAPTER 1 ERRORS IN NUMERICAL COMPUTATIONS 17 CHAPTER 2 SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS 13 CHAPTER 3 SOLUTION OF SYSTEM OF LINEAR ALGEBRAIC EQUATIONS 135 CHAPTER 4 POLYNOMIAL INTERPOLATION 225 CHAPTER 5 INVERSE INTERPOLATION 355. CHAPTER 6 NUMERICAL DIFFERENTIATION 377 CHAPTER 7 NUMERICAL INTEGRATION 407 CHAPTER 8 CURVE FITTING 513 (CHAPTER 9 INITIAL VALUE PROBLEMS. FOR ORDINARY DIFFERENTIAL EQUATIONS 559 ‘CHAPTER 10 BOUNDARY VALUE PROBLEMS IN ORDINARY AND PARTIAL DIFFERENTIAL EQUATION = 621 CHAPTER 11- DIFFERENCE EQUATIONS 687 Bibliography 743 Index 745 Scanned with CamScanner Preface xvii : About the Authors — xix : CHAPTER 1 ERRORS IN NUMERICAL COMPUTATIONS 1 1.0 Introduction 1 1.1 Accuracy of Numbers 1 1.1.1 Significant Figures 2 1.1.2 Rounding Off of Numbers 2 1.1.3 ASafe Rule 2 1.2 Errors and their Analysis 3 1.2.1 Classification of Errors 3 Worked Examples 4 1.3 A General Formula for Error 6 Worked Examples 7 1.4 Error in Series Approximation 9 1.4.1 Error in Some Important Series 10 Worked Examples 11 Exercises 1.1 12 Short Answer Questions 12 CHAPTER 2 SOLUTION OF ALGEBRAIC : AND TRANSCENDENTAL EQUATIONS 13 2.0 Introduction 13 2.1 Bisection Method or Bolzano Method 14 Worked Examples 15 2.2 Method of False Position or Regula-Falsi (in Latin) 20 Worked Examples 21 + 2.3 The Secant Method or the Chord Method 27 Worked Examples 28 2.4 The Method of lieration or Fixed Point Iteration: x = g(x) Method 31 Worked Examples 32 2.5 Newton-Raphson Method or Newton's Method of Finding a Rost of fix) =0 38 Worked Examples 40 Exercises 2.155 Scanned with CamScanner x CONTENTS 2.6 Generalised Newton-Raphson Worked Examples 5 2.7 Ramanujan's Method 59 Worked Examples 61 2.8 Muller's Method 66 Worked Examples 68 2.9 Chebyshev's Method 75 Worked Examples 77 Exercises 2.2 81 2.10 Convergence of Iteration Methods 81 Worked Examples 86 Method or Modified Newton's Method 57 7 2.11 Newton-Raphson Method for Non-Linear Equations in Two Variables 89 Exercises 2.395 2.12 Solution of Polynomial Equations 95 2.12.1 Homer's Method. 95 Worked Examples 98 Exercises 2.4 106 2.12.2 Graffe’s Root-Squaring Method Worked Examples 112 Exercises 2.5 120 2.12.3 Lin-Bairstow’s Method 121 Worked Examples 126 Exercises 2.6 132 Short Answer Questions 132 CHAPTER 3 SOLUTION OF SYSTEM OF LINEAR ALGEBRAIC EQUATIONS 3.0 Introduction 135 3.1 Direct Methods 136 3.1.1 Matrix Inverse Method 136 Worked Examples 137 Gauss Elimination Method Worked Examples 141 GaussJordan Method 145 Worked Examples. 145 3.1.2 3.13 3.14 Worked Examples 151 Exercises 3,1 157 3.2 Iterative Methods 160 3.2.1 Gauss-Jacobi Method Worked Examples 3.2.2 Gauss-Seidel Method Worked Examples Exercises 3.2 171 3.3 Eigen Value Problem 171 3.3.1 Power Method 171 Worked Examples Exercises 3.3 179 160 161 163 164 173 140 Matrix Inverse by Gauss-Jordan Method 106 135 150 Scanned with CamScanner 3.3.2 CONTENTS xi Jacob!’s Method to Find the Eigen Values of a Symmetric Matrix Worked Examples 182 Exercises 3.4 188 3.4 Method of Factorisation or Method of Triangularisation 188 3.4.1 3.4.2 3.4.3 Doolittle’s Method 189 Worked Examples 190 Crout’s Method 201 Worked Examples 202 Cholesky Decomposition 209 Worked Examples 210 Exercises 3.5 219 Short Answer Questions 222 CHAPTER 4 POLYNOMIAL INTERPOLATION 225 4.0 Introduction 225 4.1 Finite Difference Operators 226 4.11 4.1.2 4.1.3 414 5 4.1.6 Forward Difference Operator A 226 Backward Difference Operator V (Read as Del or Nebla) 227 Shift Operator or Displacement OperatorE 228 Relation Between the Operators E,A,V 229 Properties of AandE 230 Worked Examples 234 Exercises 4.1 248 Factorial Polynomial 250 4.2 Interpolation with Equally Spaced Arguments or Interpolation with Equal Intervals 252 421 42.2 Newton's Forward Formula for Interpolation 252 Newton's Backward Formula for Interpolation 254 Worked Examples 256 Exercises 4.2 268 ” 4.3 Central Difference Interpolation Formulae 270 43.1 43.2 43.3 43.4 43.5 Gauss’s Forward Formula for Interpolation 272 Worked Examples 273 Gauss’s Backward Formula for Interpolation 281 Worked Examples 283 Exercises 4.3 288 Stirling's Formula for Interpolation 289 Worked Examples 290 Bessel’s Formula for Interpolation 298 Worked Examples 300 Laplace-Everett Formula for Interpolation 306 Worked Examples 308 Exercises 4.4 311 4.4 Interpolation with Unequal Intervals 313 — 44.1 Lagrange’s Interpolation Formula (313~ Worked Examples 314 . Exercises 4.5 318 ; 180 IV pesy Aq aueos Scanned with CamScanner xii CONTENTS. 4.4.2 Divided Differences 320 Worked Examples 321 4.4.3 Newton's General Interpolation Formula or Newton's Divided Difference Formula for Interpolation 323 Worked Examples 324 Exercises 4.6 333 4.5 Errors in Interpolation Formulae 334 4.5.1 Remainder Term in Interpolation Formulae 334 Worked Examples 337 4.6 Interpolation with a Cubic Spline 340 4.6.0 Introduction 340 4.6.1 Cubic Spline Interpolation 340 Worked Examples 345 Exercises 4,7 352 Short Answer Questions 353 CHAPTERS INVERSE INTERPOLATION 355 5.0 Introduction 355 5.1 Lagrange’s Inverse Interpolation Formula 355 Worked Examples 356 Exercises 5.1 359 5.2 Successive Approximation Method or Iteration Method 360 Worked Examples 361 Exercises 5.2 368. 5.3 Reversion of Series Method 368 Worked Examples 370 Exercises 5.3 375 Short Answer Questions 375 CHAPTER 6 NUMERICAL DIFFERENTIATION 377 6.0 Introduction 377 6.1 Numerical Differentiation 378 6.1.1 Derivative Using Newton’s Forward Difference Interpolating Formula 378 6.1.2 Derivative Using Newton's Backward Difference Interpolating Formula 379 Worked Examples 380 Exercises 6.1 391 6.2 Maxima and Minima of Tabulated Function 393 Worked Examples 394 Exercises6.2 405 Short Answer Questions 406 Scanned with CamScanner CONTENTS CHAPTER 7 NUMERICAL INTEGRATION 407 7.0 Introduction 407 7.1 A General Quadrature Formula or Newton-Cotes Quadrature Formula 408 7.2 Trapezoidal Rule 409 7.2.1 Geometrical Meaning 410 Worked Examples 410 7.3 Simpson's Rule or Simpson's 4Rule 414 7.3.1 Geometrical Meaning ~ 415 Worked Examples 415 7.4 Simpson's $Rule 421 7.4.1 Geometrical Meaning 423 Worked Examples 423 7.5 Boole’s Rule 428 Worked Examples 430 7.6 Weddle’s Rule 433 Worked Examples 434 7.7 Error in Numerical Integration Formulae 439 7.7.1 Error in Trapezoidal Rule 439 7.7.2 Error in Simpson’s Rule 440 Exercises 7.1 442 ~ 7.8 Romberg’s Method for Integration 444 7.8.1 Romberg's Integration Formula Based on Trapezoidal Rule 444 Worked Examples 445 7.8.2 Romberg Integration Formula Besed on Simpson's Rule 453 Worked Examples 454 7.9 Two and Three Point Gaussian Quadrature Formulae 461 7.9.0 Introduction 461 7.9.1 Two Point Gaussian Quadrature Formula 462 7.9.2 Three Point Gaussian Quadrature Formula 463 Worked Examples 465 Exercises 7.2 474 7.10 Euler-Maclaurin Formula for Numerical Integration 475 Worked Examples 478 7.10.1 Application of Euler-Maclaurin Formula ~483 Worked Examples 485 Exercises 7.3 487 7.11 Double Integration 488 7.11.1 Trapezoidal Rule for Double Integral 489 Worked Examples 491 7.11.2 Simpson's Rule for Double Integral 498 Worked Examples 500 Exercises 7.4, 510 Short Answer Questions 511 Scanned with CamScanner xiv CONTENTS CHAPTER8 CURVEFITTING 513 8.0 Introduction 8 514 .1 Method of Least Squares 54 8.1.1 Fit a Straight Line by the Method of Least Squares 515 ~ Worked Examples 516 8.1.1 (a) Fitting Other Type of Equations Reducible to the Form y=ax+b 519 Worked Examples 520 8.1.1 (0) Fita Parabola y = ax? + bx +c by the Method of Least Squares 522 Worked Examples 523 Exercises 8.1 529 8.2 Method of Group Averages 531 Worked Examples 533 Exercises 8.2 541 8.3 Method of the Sum of Exponentidls 542 Worked Examples 544 Exercises 8.3 554 8.4 Method of Moments 554 Worked Examples 555 Exercises 8.4 557 Short Answer Questions 558 CHAPTER 9 INITIAL VALUE PROBLEMS. FOR ORDINARY DIFFERENTIAL EQUATIONS 559 9.0 Introduction 559 9.1 Taylor's Series Method 559 Worked Examples 560 | 9.2 Euler's Method and Modified Euler's Method 567 Worked Examples 569 Exercises 9.1 573 9.3 Runge-Kutta Method (R-K Method) 574 Worked Examples 575 9.4 Runge-Kutta Method for the Solution of Simultaneous Equations and Second Order Equations 581 9.4.1 Runge-Kutta Method for Simultaneous Equations 582 Worked Examples 582 9.4.2 Runge-Kutta Method for Second Order Equations 585 + Worked Examples 586 Exercises 9.2 590 9.5 Milne’s Predictor—Cortector Method 591 Worked Examples 593 9.6 Adam's Predictor and Corrector Method 602 Worked Examples 602 Exercises 9.3 611 Scanned with CamScanner CONTENTS 9.7 as Method 612 .7.1 Picard’s Method of Successive Approximati 612 Worked Examples 613 i Exercises 9.4 618 Short Answer Questions 619 CHAPTER 10 BOUNDARY VALUE PROBLEMS IN ORDINARY AND PARTIAL DIFFERENTIAL EQUATION 621 10.0 Introduction 621 10.1 Finite Difference Methods for Solution of Second Order Ordinary Differential Equations 622 Worked Examples 622 Exercises 10.1 627 10.2 Numerical Solution of Partial Differential Equations 627 10.2.1 Classifications of Second Order Partial Differential Equations 627 Worked Examples 628 10.2.2 Finite Difference Approximations to Partial Derivatives 630 10.2.3 Solution of Laplace Equation u,+u,-0 632 Worked Examples 635 a 10.2.4 Poisson Equation 643 Worked Examples 644 10.3 One Dimensional Heat Equation 649 10.3.1 Schmidt's Method [Explicit Method] 649 10.3.2 Crank-Nicolson Method [Implicit Method] 651 Worked Examples 652 10.4 One-Dimensional Wave Equation 670 Worked Examples 671 Exercises 10.2 680 Short Answer Questions 685 CHAPTER 11 DIFFERENCE EQUATIONS 687 11.0 Introduction 687 11.1 Linear Difference Equation 688 11.2 Solution of a Difference Equation 688 11.3 Formation of a Difference Equation 689 Worked Examples 689 Exercises11.1 693 11.4 Linear Homogeneous Difference Equation with Constant Coefficients 694 11.4.1 Working Rule 695 11.5 Some Basic Results of Difference Operator to Solve Difference Equations 695 Worked Examples 696 Exercises 11.2 702 Scanned with CamScanner xv - xvi CONTENTS. 11.6 Non-Homogeneous Linear Difference Equations with Constant Coefficients 11.6.1 Evaluation of Particular Integrals 703 Worked Examples 704 Exercises 11.3 735 11.7 First Order Linear Difference Equation with Variable Coefficients 11.7.1 First Order Linear Homogeneous Difference Equation with Coefficients 736 Worked Examples 737 11.7.2 First Order Linear Non-homogeneous Ditference Equation with Variabie Coefficients Worked Examples 739 Exercises 11 4 743i Short Answer Questions 74! 736 Variabie 738 Bibliography 743 Index 745 703 Scanned with CamScanner Applications of mathematics invariably boil down to numerical results. The aim of this book, Numerical Analysis, is to present the important principles, methods and processes used for obtaining these results in a systematic and simple way with accuracy and clarity. The book can cater to the needs of undergraduate and postgraduate students of science and engineering courses offered in Indian universities. Keeping the treatment simple, the procedures are illustrated with typical examples and problems taken from various university question papers. The topics of the book are presented in 11 chapters. Chapter 1 ives a brief discussion of errors in approximations. Chapter 2 deals with the direct and iterative methods of solving algebraic and transcendental equations. These methods include Ramanujan’s method, .Muller's method, Chebyshev's method, Graffe’s root square method and Lin-Bairstow’s method. Chapter 3 spells out the direct and iterative methods of solving simultaneous linear equations. It also expounds on eigen value problems and factorization methods. Chapter 4 elucidates the steps involved in polynomial interpolation when the arguments are spaced equally and unequally. The chapter also encompasses interpolation of cubic splines. Chapter 5 examines the different methods of inverse interpolation. Chapter 6 is devoted to numerical differentiation and maxima and minima. Chapter 7 elaborates on the concepts of numerical integration and double integration. Chapter 8 delves into the different methods of curve fitting, including the method of sum of exponentials, Chapter 9 focuses on the numerical solution of ordinary differential equations. Chapter 10 secks to determine numerical solutions of partial differential equations of the types, namely elliptic, parabolic and hyperbolic Chapter 11 the last chapter, sheds light on the solution of difference equations. Mathematics is a subject that can be mastered only through hard work and practice. The key word in the learning process of mathematics is practice. Remember the maxim: “Mathematics without practice is blind and practice without understanding is futile”. Scanned with CamScanner xviii PREFACE ACKNOWLEDGEMENTS We are grateful to the members of our family for lending us their support for the su completion of this book. Specal thanks are due to our daughter S. Sathiyapriya, our nia V. S. Anushanthi and our student J. Jayalakshmi for their help in proofreading the chapters We are obliged to Sojan Jose, R. P. Mathivathani, M. Balakrishnan and Badari Vishal ‘Adavikolanu of Pearson Education for their diligence in bringing this work out to fruition, W, thank King D. Charles Fenny for evincing keen interest in this book, ns P. Sivaramakrishna Das _ © Vijayakumari Scanned with CamScanner P. Sivaramakrishna Das started his career as Assistant Professor of Mathematics at Ramakrishna Mission Vivekananda College, Chennai, his alma mater, and retired as Professor and Head of the Department of Mathematics from the same college after an illustrious career spanning 36 years. Currently, he is Professor of Mathematics and Head of the Department of Science and Humanities, K.C.G. College of Technology, Chennai (a unit of Hindustan group of colleges). Professor Das has done pioneering research work in the field of “Fuzzy Algebra”. His paper on fuzzy groups and level sub-groups was a fundamental paper on the subject. It was the second paper published on this topic at the international level and the first paper from India in this subject. With @ teaching experience spanning over 45 years at various arts and science and ‘engineering colleges, Prof. Das is an accomplished teacher of Mathematics at undergraduate and postgraduate levels and has guided several students in their research leading to the M.Phil. degree. He has also coached students in their preparation for IIT-JEE examinations and was a visiting professor at a few leading IIT-JEE training centres in Andhra Pradesh. Along with his wife, C. Vijayakumari, retired Professor of Mathematics, he has written 10 books covering various aspecis of Engineering Mathematics catering to the syllabus of Anna University, Chennai. C. Vijayakumari began her career as Assistant Professor of Mathematics at Government Arts College for Women, Thanjavur, and has taught at various government arts and science colleges across Tamil Nadu before retiring as Professor of Mathematics, Queen Mary's College, Chennai, with 40 years of teaching experience behind her. As Visiting Professor of Mathematics, Prof. Vijayakumari has taught the students at two engineering colleges in Chennai. An accomplished teacher of Mathematics and Statistics at both undergraduate and postgraduate levels, she has also guided several students in their M.Phil. degree courses. Along with her husband, Prof. P. Sivaramakrishna Das, she has written several books on Engineering Mathematics. Scanned with CamScanner In practice, the applications of Mathematics ultimately results in numerical form. These results may be from the evolution of formulae, solutions of equations or inferences drawn from tabulated data. Numerical analysis may be described as that branch of Mathematics which provides with convenient methods for obtaining numerical solutions to such problems. Suppose for a certain experiment the heights of a set of university students are measured. The numbers representing the heights are only approximations, true to two or three decimal places. In general the data represent approximations. Sometimes, the process used to deal with the data is approximate. So, the error in a computed result may be due to errors in the data or errors in the methods or both. Numerical analysis deals with methods of which errors in computation is reduced to a minimum. With the advent of computers the demand for numerical methods increased rapii in the applications to engineering and scientific fields. Today numerical methods have become an indispensable tool ACCURACY OF NUMBERS - [6 The numbers 1.2.3... gg rgeovand Bf Vit, e ete written in this form are exact numbers. If V3 is written as 1.732, then it is an approximate number. We can also write V3 as 1.73205, which is a better approximation. However, we cannot write the exact value of V3 by finite number of digits, because V3 has infinite number of decimals. Thus we deal with two types of numbers exact and approximate Scanned with CamScanner ry “9 NUMERICAL ANALYSIS Significant Figures are called significant figures or significang number meaningfully ie a wet oe aot 1,2,3,....9 are all significant digits in any number. But 0 may of Snel be a significant figure. If 0 is used to fix the decimal point or to fill places of unknown discarded digits, then 0 is not significant figure. ne Inthe — ‘of 0.000567, the significant figures are 5, 6, 7. The zeros are not significant, because they are used to fix the decimal point. But in the number 4.5037 all the five digits are icant. Here 0 is also @ ionlbcor ae. In 0.5000, 5 is the significant figure. _ 1n 0.5000, ont 028, 0.000035 contain only two significant Aigures 2, 8, and 3, 5 + respectively. Ean Rounding Off of Numbers We know V3 =1.732... is a never ending decimal. To use computation we must cut down to a usable form such as 1.7 or 1.73 or of cutting off the extra digits is called rounding off of numbers. Usually rounding off a number is done according to the following rules. “To round off a number to n significant figures, discard all the digits to the right of the nt digit, and if the (n + 1)* digit is () Jess than 5, then leave the n® digit unaltered (i) greater than 5, then increase the n* digit by 1 (ii) equal to 5, then the n® digits unaltered if tis even and increase the n* digit by 1 if its odd” ‘A number rounded off according to this rule is said to be correct to n significant places. For example, the following numbers are rounded off to five significant figures. such a number in a practical 1.732 ete. This process ) 23,876345 becomes 23.876 0.876345 becomes 0.87634 + 4.782250 becomes 4.7822 1.823156 ‘becomes 1.8232 76.69954 becomes 76.700 Bie A Safe Rule In numerical analysis, often, we have to perform a set i i ; we quence of arithmetical operations on ssiobers, Dang the semeuiation ra one more figure (or decimal place) than that given and round off after last operation has been performed. Whi i ice is followed, no attention is paid to rounding off rule, Peromeen ™ = Scanned with CamScanner CHAPTER 1 | ERRORS IN NUMERICAL COMPUTATIONS 3 BREGd ERRORS AND THEIR ANALYSIS. In numerical computations we always look for the accuracy of the result obtained. The size of the error in the computed value is usually expressed in two ways: (1) absolute error and (2) relative error Absolute error = |true value — approximate value| = |x -x, |, wherexis the true value and x, is the approximate value and it is denoted by E,. : - E=|x-%] Relative error = Sbsolute error 4 it ic denoted by E,. True valuel ° E, = ae “RT x Sometimes, we express as percentages which will enable us for comparison. as Percentage error = E, x 100 and it is denoted by E,. => E, = E,x100 Note: (1), Absolute error is in terms of the unit used, where as relative error and percentage error are ___ pure numbers independent of the unit of measurement. (2) It is obvious that the absolute error is related to the number of decimal places, whereas relative error is related to the number of significant figures. (3) Ifa number is correct to n decimal places, then absolute error is < plo. Ha number is correct to n significant figures, then the relative error is < pio. x -x, Inotherwords, a number x, is an approximation tox ton significant figures if El eee Classification of Errors In numerical analysis errors are classified into two major categories. Ligue $510 . (i) Inherent error (i) Truncation error : Inherent error: It is the error that is present in the statement of the problem before its analysis and solution. The inherent errors arise due to the simplication assumptions that are used in the mathematical formulation 6f the problem or due to the errors in measurements of the parameters of the problem. Scanned with CamScanner ry . YSIS 4 NUMERICAL ANAL vis oto those errors coud by te method, For example: Truncation error: ome ee _ x xe is approximated by the cut AeEte ma Ketaleita tg a 5 ve hoses +S due to truncating the series. ted then the error in the result is ng the ; aan er Rater the four tin the Maser see = is the truncation error, without proof. We shall state some theorems Eres If a number is correct to n Si is the first significant figure, then the gnificant figures and if a, 1, ae relative error is less then Soy te F< Toor Hh isa number having n decimal digs and if x, Js got by truncating to k dis, then the absolute error is =|x—x,|<10"". ‘Absolute error due to rounding off to k digits 1 1 If the relative error of any number is Spar 2 significant figures. Miele ee ent | Example 1 If the number 23.876 is correct to 5 significant figures, then find the relative lio o)e-m |< 510 107", then the number is correct to n | error. Solution Given the number is 23.876. | =. the first significant figure is 2 and the number of significant digits is 5, n = 5,a, = 2 1. 10 . «. the relative error E, < ; 10"" =} 10-* Example 2 Consider the number 52.43, which is correct to four significant figures. Find E, and E, Also find the percentage error. Solution Given the number is 52.43. The first significant number is 5 and the number of significant figures is 4 a,=5, n=4 i Scanned with CamScanner CHAPTER 1 | ERRORS IN NUMERICAL COMPUTATIONS, 5 vz bytheorem 1 the relative error gg @__ = 6.627x10 Faaesn ~ °-627% and E, =E,x100 = 6627x102 Scanned with CamScanner 6 NUMERICAL ANALYSIS fi) Gren x = 78 4625 Rounding off te 4 significant figures, we get x, = 78.4600 [78.4625 — 78.4600] = 2.5 5 -s a 10 ; Tene = 3-186 :, x100 = 3.186107 and Example 5 A person measured a length as 3450 cm, where as its actual length is 3445 om and another length as 145 cm where as its actual length is 140 cm Compare thei. absolute and relative errors. Solution @ Gvenx 3445 ~3450|=5 — 2 =0.00145 3445 @) Guen x = 140, x, = 145 absolute errors are same for both measurements, their relative errors differ more then 26 tmes. ™ HN A GENERAL FORMULA FOR ERROR ) be 2 function of several variables x,,x,,....x, and be differentiable. 2@ exrors in the variables so that the error in y is Ay. We have to find the error relation. We know that the total differential dy= "ax, + Bae + 2 ax Xe no . the error relation is Scanned with CamScanner CHAPTER 1 | ERRORS IN NUMERICAL COMPUTATIONS 7 Note: Suppose y= k.7=, then logy= u The differential relation is dapem Raven Lava ptaicg tee x 2 Py > ¢. the error relation is dy _ Ax, Az The relative error in y is Maximum relative error is WORKED EXAMPLES Example 6 = 3x1 “is | Find the maximum error and relative error in y if x, = = 75 ~ ad siege By COIOK: scane by Asad Ali Solution Given +: the error relation is +. the maximum error relation Ay Is = Scanned with CamScanner 8 NUMERICAL ANALYSIS But ay: Oxy By ax, At the point x, =1,x,=1,x, =1 ay ay oe Ya-i2 ax, ax, and given that Ax, = Ax, = Ax, = 0.01. When 4=1 x,=1, x,=1l y=3 “maximum error is = |6(0.01)]+[3(0.01)| +|-12(0.01)| = 0.06 + 0.34 0.12=0.21 Maximum relative error = MaxAy _ 0.21 _ 9 97 v 3 The general error formula can be used to find error in fundamental operations of arithmetic, Wou=u,+u,+...+u,, then Au= Au, + Au, +...+ Au, + E, = Suis the algebraic sum of absolute errors. . Example 7 Find the sum of the numbers 681.32, 521.7, 94.853, 5.9271, 0.0034, each being correct to its last digit. Also find the absolute error. Solution Here 52.7 has one decimal place The absolute error = p10” =0.05 This number is the one with greatest absolute So, we round off all the numbers to two decimals. -: the round off numbers are 681.32, 94.85, 5.93, 0.00 So, their sum § = 681.32 + 521.7 + 94.85 + 5.93 + 0.00 - 1303.8 E, = sum of absolute errors in each number =4107 +3107 +3107 +3107 = 0.005 +0.05 + 0.005 +0.005 = 0.065 = 0.07 to 2 places of decimal Scanned with CamScanner ee CHAPTER 1 | ERRORS IN NUMERICAL COMPUTATIONS 9 | Rounding off error is 0.01. total error in S is 0.07 + 0.01 = 0.08 S=1303.840.08 Example 8 | Evaluate the number /3+V5+6 correct to 4 significant digits and find its | absolute and relative error. 3 Solution Evaluate the numbers V3,/5,V6 to 4 significant digits using calculafor V3 =1.732, V5 =2.236, V6 =2.449 . their sum S=/3 +J5+J6 =6.417 We know that the absolute error in a number correct to 3 decimal places is $107 = 0.0005 «. the absolute error in the sum of the 3 numbers is E, = 0.0005 + 0.0005 + 0.0005 = 0.0015 =1.5x107 This shows that the sum S=J/3+V5+V6 is correct to 3 significant figures only, Then = 0.000234 = 2227 ERROR IN SERIES APPROXIMATION Power series expansion of a function is a very useful technique in theory and applications. ‘The general method for expanding functions into power series is by means of Taylor's formula. (@ Taylor's formula for f(x) about x =a, under valid conditions is (xa)? <= 9) 54 * F(x) = fla) + Tr F(a)+ 2 SF"la)+ + Fa? plas ate-ail O, then the series converges. If we approximate f(x) by the first n terms, then the maximum error committed in the truncation is R,. Conversely, if the accuracy required is given in advance, the, we can find the number of terms n to be taken. . . Hl Error in Some Important Series 1. Logarithmic series xt xt xt log, (L+x) =x 495-3 where |x|<1 or x=1; then the error committed in truncating is less than the first term neglected ole n+ (xy Lem OD ge 2. Binomial series where R= mim—IWm—2)...(m—n+1) "il x"(1+ ox)", O<@<1 If x>0, then Ix<0,n>m, then R, 0, maximum. relative error = Scanned with CamScanner CHAPTER 1 | ERRORS IN NUMERICAL COMPUTATIONS - il Example 9 Compute log.1.02 truncating after the third term. Find the error. Solution — log.(+x)=x-2 4% +R, e id where Rs <7 pie x= 0.02, 2 3 log, (1.02) = 0.02 — 10-02)" , (0.02)" | : 2 Ss 3 (0.02)* _where Bsa = 0.00000004 and Jog, (1.02) = 0.02 — 0.002 +0.0000026666 =0.01980266 _which fs correct to 7 decimal places, because in R,, the first significant value is 4 occurring in "the 8" place. Note: Using calculator log, 1.02 = 0.019802627 . Example 10 Find the number of terms n to be taken in the expansion of e* correct to 7 significant figures, when x =1. Solution ‘The Maclaurin’s series for x pata Gann Maximum relative error = 1 Maximum relative error, when x =1 is =. For 7 significant figure accuracy, we must have, by theorem 2 i. 1 ni < 2x10" an n|> 2x10’ = 20000000 Scanned with CamScanner aZ NUMERICAL ANALYSIS But 11! = 39916800 > 2x10” a 10! = 3628800 < 2x10” : E nail . | This means we have to take 11 terms of the series for 7 significant figure accuracy. ua Exercises 1.1 (1) Round of the following numbers correctly to four significant figure. 23.7642, 53266, 0.070037, 0.0052725. . (2) Find the sum of the number which are correct to the number of significant figure gj 142.6, 26.23, 0.23425, 220.44, 3.42. ° given - Answers 1.1 (1) 23.76, 53270 = 5327 x 10, 0.07004, 0.005272 (2) 392.92 THE sHortT ANSWER QUESTIONS 1. The value of 7 is 3.1416 correct to four decimal places, find the error. 2. Round off the numbers 34789 and 3.7256 to three significant figures. 3. Find the relative error if the number 852.43 is correct to five sianificant figure. \ 4. If the number 0.0700 is correct to 3 significant figures, find the relative errs,” | 5. Find the absolute error if the number 0.0033548 is truncated to three decimay 6. If the number 25.34217 is rounded off to four significant figures then fing = Places, 7. Find the absolute error in V6 +/7-+~/B correct to 4 significant digits: Ee Scane by Asad Ali Scanned with CamScanner Solution of Algebraic and Transcendental Equations INTRODUCTION Finding solutions of an equation of the form f(x)=0 is frequently encountered in science and —b=Vb? -dac 2a . © engineering. If f(x) is a quadratic ax? +bx+c, then f(x)=0 has solutions in terms of the coefficients. . If f(x) is cubic or biquadratic in x, then we have standard formulae to find solutions in terms of the coefficients of f(x). If the degree of f(x) is greater than or equal to 5, then there is no formula to solve f(x) =0, only approximate solutions can be found Equations involving trigonometric, logarithmic, exponential, inverse trigonometric functions ete. are called transcendental equations. For example, e* +2x = 0, logx+x* =10, x—cosx =0 are transcendental equations. ‘There is no general method to solve the transcendental equations. When the coefficients of the algebraic and the transcendental equations are pure numbers, approximate solutions can be found to any desired degree of accuracy by using numerical methods, | These methods are based on successive approximations or iterations starting with an initial approximation. For this initial approximation we locate an interval in which the root lies by | using the intermediate value theorem started below. | | Let #2) be a continuous function on {abl If fla) and f(b) have opposite signs, then f(x) = | has at least one root o between a and b. Definition 2.1: Rate of convergence of iteration method | | Let abe the actual root of an equation f(x) = 0. An iterative method is said to be of order p | or has the rate of convergence p, if p is the largest positive real number for which there Scanned with CamScanner 14 NUMERICAL ANALYSIS. exists a positive number k + 0 such that |e,,,|=k|e,|", where €,=,— 0 En.1= Xa —& and Xq%ner are the n® and (n + 1)* iterative roots of f(x) =0. ‘The constant k is called the asymptotic error constant and usually depends on derivatives of f(x) at x=a If p = 1, the convergence is said to be linear. If p= 2, the convergence is said to be quadratic. HE BISECTION METHOD OR BOLZANO METHOD Let j{x)=0 be the equation for which a root is required. Suppose fla) and f(b) have opposite signs or f(a) f(b) <0 and f(x) is continuous in [a,b], then there is a-root a between aand b. Bisect the interval [a,b] and take xq = 222 If flxp) =0, then xp Is the root a: If f(x9) #0, then the root lies in (4,9) or (x9,b). as the initial approximate value of the root a, y From the figure, the root lies in (a,x), since f(a)>0 and f(x9) <0. Bisect this interval and take the iitst approximation as 4 = —*®. Now the root is in (x;,X9) and bisect this interval |. tx and take the second approximation Xz = — 2 o. Proceed like this till two successive approximations coincide upto the desired degree of accuracy. Note: (2) This method is the simplest ofall successive approximation methods. At each stage only one functional value is computed. The convergence is linear with order or rate - Scanned with CamScanner ooo CHAPTER 2 | SOLUTION OF ALGEBRAIC 15 (2) In this method the sequence of approximations {x9)%j,X21.--.%,) always converge to the root a, But the convergence is very slow, which is the draw back of this method, (3) After n bisections, the root will lie in an interval of length as. which is small for large n. b—al a (4) Inall the successive approximations or the iteration methods, the starting point xo should be chosen close to the root for quick convergence. Perse Example 1 Find a root of the equation x* ~ 4x—9 = correct to three decimal places. So, the error after n iterations is less than Solution Let f(x)=x?-4x-9 We have f(0)=-9 < 0,f(l)=1-4-9=-12<0 (2) -9<0 f(8)=27-12-9=6>0 So a root lies between 2 and 3 we chose a smaller interval. Now £25) (2.5)° — 4(2.5)-9 =15.625-10-9 12.7) = 3.375 <0 2.7)° — 4(2.7)-9 =19.683-10.8-9 =-0.117 <0 >. the root lies between 2.7 and 3. ¢. the initial approximation is 2.743 =2.85 Now F(2.85) = (2.85)° — 4(2,85)-9 =23.149-114-9=2.74930 and f2.7)<0° =. the root lies between 2.7 and 2.85 Lapproximation is x, = 27285 =2.775 Now £(2.775) = (2.77599 ~4(2.775)-9 = 21.3692-11.1-9=1.2692>0 and f(2.7)<0 So, the root lies between 2.7 and 2 775 atl Scanned with CamScanner nis x, =27+2775 _ 5.475 _ 97375 2 2 12.7378) = 2.73759 _ 4p. 7375)-9 =20.51456-10.95-9= 04 I2N0 ‘+ the root lies between 2.7047 and 2.7094 Wl jon is gos 20ST. 7094 _ 5.4141 _9 7971 2 ; 2 New S(2.707 1) = (2.7071)° — 4(2.7071)-9 : = 19.8387—10.8284-9=0.0103>0 and #2.7047)<0 - 4: heroot lies between 2.7047 and 2.7071 é j ‘ : i : Scanned with CamScanner CHAPTER 2 | SOLUTION Umapproninintion to. 2700s 2.7071 _ 54118 9 7059 Now $(2.7059) = (2.7059)° — 4(2.7059)-9 = 19.8123 -10.8236-9 =-0,0113<0 and (2.7071) >0 -. the root lies between 2.7059 and 2.7071 “VII approxi a xp = 2:2059 42.7074 _ 4130 =2.7065 Now © (2.7065) = (2.7065)° — 4(2.7065)-9 =19:8255 10.8269 =-0.0005<0 and £(2.7071) >0 ~~ s, the root lies between 2.7065 and 2.7071 2.7065+2.7071 _ 5.4136 2 2 < +) Since xg and x» colnetdle upto three dacimal plata tha woo is x= 2.706 ++ PX approximation is xo = Example 2 : Find a root of the transcendental equation ax sine a: =o. Solution Let fix) =3x+sinx—e%, f(0)=0+0-1=-1<0 f(l) = 3+sin] ~e =3+-0.8417—2.71828 =1.12319 > 0 #O.5) =1.5 +sin(0.5)—2°5 .5+0.4794~1.6487 = 0.3307 >0 So, the root lies between 0 and 0.5. Choose a still smaller interval. f(0.3) = 3(0.3) + sin(0.3)~ 2 a .9 + 0.2955 1.3498 =-0.1543<0 +. f.3)<0 and (0.5) >0 _ So, the root lies between 0.3 and 0.5 * 0.4) = 3(0.4) + sin(0.4)— 64 =1.2+0.3894-1.4918 = 0.0976 > Scanned with CamScanner ee 18 NUMERICAL ANALYSIS, and 40.3) <9 So, the root lies between 0.3 and 0.4 I approximation js = 2:3+0.4 _ 97 =0.35 Now F(0.35) = 3(0.35) 4 sin(o.38)-e*? =1.05 +0.3429-1.4191= and £0.4)>0 «: the root lies between 0.35 and 0.4 o -0,0262 = I approximation is x, = O85 0.4 _ 0.75 _ 9,375 Now F(0.375) 1.375 ,>0 (0.375) + sin(0.375)-°°"" 93637 =1.125 + 0.3663-1.4550= and £0.35) <0 «. the root lies between 0.35 and 0.375 5 625 ML approximation is x, = 9-35 =0si5 - O78 =08 0.3625 0 ‘Now 40.3625) = 310.3625) +sin(0.3625)— 6 0.00527 0895 + 0.3546 - 1.4369 = £0.35) <0 306? +. the root lies between 0.35 and 0.3625 6 625° oO. IV approximation is x, — 0.35 +9.3625 = 0732 20.3! 0.3563 Now 40.3563) = 3(0.3563) + sin(0.3563)-€ 09,0103 < ° = 1.0689 + 0.3488 -1.4280 = -0° and (0.3625) >0 +. the root lies between 0.3563 and 0.3625 Z 8 59 V approximation is x, = 0.3868 0.3625 _ 0.7386 =0.3! ‘ 1.3594 New 400.3594) = 3(0.3594) + sin(0,3594)- 2" 9026 <9 = 1.0782 +.0.3517-1.4325 =-0- and 4(0.3625) > 9 - +: the root lies between 0.3594 and 0.3625 1 VI approximation is x, = 98594 +0:3625 m 0.7218 = 0.36 “Toe 4(0.361) = 30.361) +sin(0.361) 2° apo . -083 + 0.3532 - 1.4348 = 0.001 “ and £(0.3594) <0 se Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC a “the root lies between 0.3594 and 0.361 Vil approximation is x, = 9.3594-+0.362 7 oreo = 0.3602 £(0,3602) = 3(0.3602) + sin(0.3602)- 29% = 1.0806 + 0.3525 ~1,4336 = -0.0005<0 and (0.361) >0 +) the root lies between 0.3602 and 0,361, VIII approximation is Xp 0.3602+0.361 _ 0.7212 03606 0 Now 2 2 and £(0.3606) = K0.3606)+sinl0 3606-7" 4 -0818 +0,3528 -1.4342=0 and £(0.3602) <0 * 4, the root lies between 0.3602 and 0.3606. 8 Tapproximation is x, ~ 2:2802+0.9608 _ 0728 0 3% sh oye? Now 40.3604) = 3(0.3604) + sin(0,3604)-¢° = 1.812 +.0.3520 -1.4339=-' and £(0.3606) > 9 «+ the root lies between 0.3604 and 0.2606 05 X approximation is ,, 0.3604+0.3606_ Ot ost 2 OO Now (0.3605) = 3(0.3608) + sin(0.3605)-¢" co? = 1.0815 +0.3527-1.43407 and F(0.3604) <9 z+ the root lies between 0.3604 and 0.3695, IV pesy Aq aueos we? Xlapproximationis x, _ 0.3604 +0,3605_ on 20 2 XN So, Xo and a1 are equal upto four places of decimals. z. the root correct to four decimal Places is x = 0.3605 Note: (1) Wehave (0.3605) = 0.0009 So, the error is 2x10-4° << 24-03 _ a noot (2) Error after n iterations is < Scanned with CamScanner 20 NUMERICAL ANALYSIS HN METHOD OF FALSE POSITION OR REGULA-FALSI (IN LATIN) vef(e) _x-8 rord AB ¥ - f(e)-s(b) e-8 fy the x-axis put y= O in (1) f(@) x-@ 7le)—7(b) E = sifte) - HtbY) « Scanned with CamScanner CHAPTER 2 SOLUTION OF ALGEBRAIC 23 Note: (2) The ompliciny of this methed hes in the fart that we toplece the cure hemween A and & by che chord AB the cure benuwen A and Coby tue chem AC are an The pinta of intersection of these chords with the emis are the vatcesene sooronimations of the cont (2) The Regula Fast ae () The onder of convergence of Regula-Faist mother @ 1 That st hme linear cate of comuengence Coens Exomple 1 Find the positive root of x’ = 2x = 5 = 0 by false position method. Solution Given equation is x? - 26 od coquire the evaluation «fone Suretior ahwe zor teration, ° Let f(x) =x? -2 We have s(2)=8-4 -1<0 1(3) + 27-6-5 =16 > Oand // 5 So, the root is between 2 and 2.5 and it ie close to 2. Take a= 2.b=2.5 7 ) ~ bila) , f(b) ~ flay ~ ——= 5 625-25x(-1) 13.75 % = es, - = 207847 + 2 25 1-1) 6.625? . 4 * Now 1 (x,) = { (2.07547) = -0.21070 < Oar 412.5) 29 So, the root x, lies between 2.07547 and 25 Take o = 2.07547, b= 2.5 The second approxitation is 2075472 Scanned with CamScanner 22> NUMERICAL ANALYSIS | Jxp) = f (2.0908) = (2.0908)? ~ 22.0908 - 5 = -0.0418 <9 and 4(25)>0 So, the root lies between 2.0908 and 2.5 Take a = 2.0908 and b= 2.5 The third approximation Is _ aflb)=byia) _ 2.0908/(2.5)- 2.5f (2.0908) Xe fla) 7(2.5) - 12.0908) _ 2:0908x5 625 -25(-0.0418) 5,625 - (0.0418) _11.86525 _» 938 5 6668 Now los) = #(2.0938) = (2.0938)? -2%2.0938-5 = -0.008384 <0 and 4(2.5)>0 =. the root lies between 2.0938 and 2.5 Take a = 2.0938 and b= 2.5 ‘The fourth approximation is 2.0938x f(2.5) -2.5x f(2.0938) Nw nftizbito . e f(b) - f(a) £(2.5)- f (2. 0938) / 2.0938x5.625 - 2.5x(-0.008384 ) v . 5.625 — (-0.008384) 11.7986 _ = 56334 = 2.0944 Now f (xq) = J (2.0944) = (2.0944)? - 2x2.0944-5 = -0,00169 <0 and £(2.5)>0 1, the root lies between 2.0944 and 2.5 Take a = 2.0944, b=2.5 The fifth approximation is _ _uftl=bfta) _ 2.0944%f(2.5) 2.5 (2.0944) ° f(b) = fla) £(2.5)- f(2,0944) __ 2.0944 5.625 ~2.5%(-0.00169) 5.625 -(-0.00169) 11.7852 = 5.6267 ~ 2.0945 x Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 23 Now 4 (xs) = £(2.0945) = -0.0005746 <0 and f(2.5)>0 =. the root lies between 2.0945 and 2.5 Take a= 2.0945 and b=2.5 The sixth approximation is 4, = aflb)—bfle) _ 2.0945 f (2.5) -2.5(2.0945) ftb)= fla) F(2.5)—F (2.0945) _ 2.0945 x5,625 ~ 2.5%(~0.0005746) 5.625 —(~0.0005746) = 11.7830 _ Saage 7220945 Since xs = xg upto 4 decimal places, the root is x = 2.0945 . Example 2 Find the real root of xlog,,x-—1.2=0 correct to 4 decimal places using false position method. Solution Given xlogy9 x-1.2=0 Let f(x) =xlogyg x-1.2 We have f(1)=-1.2<0, f(2)=-0.5979 <0 f(3)= 0.2814 > 0. Now + ¢(2.5)=-0.2052<0 +. the root lies between 2.5 and 3. Take a= 2.5, b=3 The first approximation is x, = aflb)=bfle) _ 2.5f(3)-3F(2.5) 1 Fe) fle) ~~ *F(3)-F(25) _ 2.5x0,2314-3x(-0.2052) “~~0.2314-(-0.2052) _ 1.1941 = paz = 27390 Now f (x1) = f (2.7350) = 2.7350 logo 2.7350-1.2 = 0.004922 <0 and #(3)>0 So, the root lies between 2.7350 and 3. Scanned with CamScanner 24 NUMERICAL ANALYSIS Take a= 2.7350 and b=3. The second approximation is xq = fbl=bile) _ 2.7350/(3)~3/ (2.7350) Fb) = Fla) F(3)-f(2.7350) _ 2.7350x0.2314~ 3x(~0,004922) ~ 0.2314 —(-0.004922) 0.6476 = egeg 72-7406 Now J (x2) = f (2.7406) = 2.7406 log2.7406 -1.2 = -0.0000402 <0 and_ £(3)>0 <: the root lies between 2.7406 and 3. Take a = 2.7406, b ‘The third approximation is af(t)—bfla) _ 2.7406f(3)-3f(2.7406) 3 7O= Fe) F(8)~F (2.7406) Since xp = x3, upto 4 decimal places, the root is x = 2.7406 Example 3 Solve for a position root of x—cosx = 0 by Regula-Falsi method. Solution . Given Let Then £(1)=1-cos1 =0.4597>0 + 2 root lies between 0 and 1. Take a=0, b=1 The first approximation is x, = oflb)=bfla) _9-1f(0) 1) 1 1 Fe)= Hal f= (0) ~ 0.4897 (a) * 1.4587 = 0.6851 Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 25 Now (x1) = (0.6851) = 0.6851 - cos(0.6351) = 0.6851-0.7744 = -0.0893 <0 and f(1)>0 So, the root lies between 0.6851 and 1. Take a= 0.6851, b= 1. The second approximation is a af(b) - bf(a) _ 0.6851f (1) — f (0.6851) 2° Flb)= fla) F(1)-F (0.6851) Now I (x2) = f (0.7363) = 0.7363 — cos (0.7363) = 0.0047 < 0 and f()>0. So, the root lies between 0.7363 and 1. Take a= 0.7363, b= The third approximation is ve, = aflb)=bfla) _ 0.73637 (1)- {(0.7363) 3 FB)= Fla) F(l)-F (0.7363) =——9.4597-(-0.0047) 0.4644 ~0-7990 Now (xg) = f (0.7390) = 0.7390 —cos(0.7390) =-0.0014 <0 and f()>0 So, the root lies between 0.7390 and 1. Take a= 0.7390, b=1 ‘The fourth approximation is xe, = oflb) bf lah _ .7390f (1) — f (0.7390) 4 'F(b)- F(a) 1(1)—7(0.7390) _0.7390x0.4597 ~(0.00014) _ 9 739; Now 4 (Xa) = {(0.7391) = 0.00003 > 0 Since f(0,7390)=-0.00014<0 and (0.7391) = 0.00003 >0, the root is between 0.7390 and 0.7391 and is nearer to 0.7391. So, correct to 4 decimal places, we take the root as x = 0.7391 . dh — rr Scanned with CamScanner 26 NUMERICAL ANALYSIS Example 4 Find a positive root of xe"= 2 by Regula-Falsi method. Solution Given equation is xe*-2=0 Let f(x) =xe"-2. Now f(0) =-20 Now f(0.7) =-0.59037=-0.5904.<0 Since f(0.7) and (1) have opposite signs, the root lies between 0.7 and 1. Take a= 0.7 and b=1 The first approximation is af (b)—bi(o) _ 0.7/(1)-1.4(0.7) 4 Fe)=Te) 7) fe, J (x)= £(0.8353) = 0.83532%8953 _ 9 =1,9258-2=-0.0742 a f(1)>0 ° x. the root bes between 0.8353 and 1. Take a = 0.8353, b= 1. Then the second approximation is of (b)=bf(@) _ 9-8353f(1) -1/(0.8353) 72 = F(b)= F(a) £(1)- 4(0.8353) 0.8353%0.7183—(_9,0749 = 0.0742) 0, 0.7183— (-0.0742y = oa = 0.8507 | A (x2) =4(0.8507) = 0.8597¢0.8507 0.0083 <0 ~0.0083 < aia £(1)>0. 4 the root lies between 0.8507 end 1. Take a= 0.8507, b=1 The third approximation is _ of(b)-bi(6) _ 08507F(1)~15(0 350 *3=F1b)= F(a) 40)-J(0.8507 2 = 9.8507«0.7183_( 0. ~0.0083 O7183-C 0083) RH 1266 Scanned with CamScanner Neen Ro CHAPTER 2 | SOLUTION OF ALGEBRAIC 27 Now F(x) = f (0.8525) = 0.8525e°*°?5 _2 =-0,000458 <0 and f(1)>0. «+ the root lies between 0.8525 and 1. Take a= 0.8525, b= 1 The fourth approximation is x, = f(b)-b (a *F(8)-F@) 0.8525 0.7183 -(~0.000458) _ 0.6128 _ 9 arom ~~ 0.7183=(-0.000458) «0.7188 Since x3 = xq, the root correct to 4 decimal places is x = 0.8525 . 9@fay THE SECANT METHOD OR THE CHORD METHOD 4 The secant method also replaces the curve in the neighbourhood of the root by a straight line. So it is same as Regula-Falsi method except for the omission of the condition f(a)f(b) < 0. xe, = afb) bila) 1 Fb) fle) For iteration purpose, we take, a= x5, b = x,, then and repeat it. se, — Bofles)—mflxo) 2° Flea)= Fo) _ ail fla)= Heol] flea —%0] Fo) = Feo) _g, _ fli, -Xol “a *1 Fla) — Flo) we, 4 2 =zalfba) 1 Flo) = Fea) More generally, ‘At any stage of the iteration, (Fa= ff nen this method fails. Scanned with CamScanner 28 NUMERICAL ANALYSIS So, the secant method does not converge always, where as Regular-falsi method will alvays converge. However, when the secant method converges, it converges faster than the Regular-felsi method. Note: The order of convergence of the secant method is 1.62 approximately Example 1 Find a real root of x*-2x-5=0 between 2 and 3, to three places of decimals. Solution Let * fx)=x8 -2x-5 f(2)=23 -2x2-5 =8-4-5=-1<0 #3) =3? -2x3-5=27-6-5=16>0~ Now $12.5) = (2.5)? -2(2.5)-5 5.625 > 0 5.625-5-: Let xp =2 end x, =2.5 be two approximate values. ++ the iteration formula is (a~X2l+Mna) yn 93,.4,5, x, =X, 7 TAT Fe) Fea) liferation: Put n = 2 in (1) xox, olf) Fee) fle) = 2.54 2-5-2725) fl2)— f(2.5) 5-0.4245 = 2.0755 UI Heration: Put n = 3 in (1) e-x)fleo) fle)- fl) Flxg) = (2.0755) -2(2.0755)=5 = 8.9406 ~4.151- y= xp + But Pe (a) Scanned with CamScanner A CHAPTER 2 | SOLUTION OF ALGEBRAIC 29 Xp = 2.0755 + (2.0755~2.5-0.2104) a 5.625+0.2104 7 .08931 = 2.0755 + == = 2.0755 +0,0153 = 2.0908 Ill Iteration: Put n = 4 in (1) kg ~xp)flxs) Flx2)~ fxg) But Hlxg) = f(2.0908) (2.0908)° - 2(2.0308)-5 9.139816 —4.1816-5 =-0.0418 1 xq = 2.0908 + (2.0908 ~2.0755)-0.0418) 0.2104 — (0.0418) 0.006395 = 2.0908 ~"Toese~ = 2.0908 + 0.00379 = 2.0946 Xq = Xy+- VI Hteration: Put n =5 in (1) 4p bea =xa)fbcg) Xs = x44 one Fles)— F3) 4 But '2.0946)° — 2(2.0946)—5 9.18974 4.18925 =0=-0.0005415, = (2.0946 ~2.0908)(-0.0005 ne +" 20.0418 —(-0.00054) 0.0000021 - . = + 220000021 _ 2.0946 + 0.000051 = 2.094651 2.0946 + Gaqag 2-02 5: 3 Since x4 = xg, upto 4 places of decimals, the root correct to three places of decimals is x = 2.095 . Example 2 4 Find the real root of x*-x-10=0 which lies between 1 and 2. Solution Let f(x)=x*-x-10 To find the real root between 1 and 2 : fl)=1-1-10=-10<0 ‘ f(2)=24-2-10=16-2-10=4>0 ee Scanned with CamScanner a NUMERICAY —_ oF oot ie MO g.s)e0.et-18-10 a0 g that tne © fa HUET LBD we fir! ‘i 1.8 and - oe 2 i i dX, = go, he OF yg an is qakce X08 Tule (es ~Feals) ii che iteratio Xp = Xd Tf ess)” 23, en=2in@) i sont But ly com ey 4 Pa First iterati TT a) . (2-18)4) ant 08 =P FapnH 2 OLE oy = 3 in(l) : Put n \d iteration: . Secon exp Mblle) ee fie) Fy) =0.849Y' -1 349) 19 How. =116307-1.8491 19.9 1564 .8491-24-4.1589 + %y=1.849] , SN 2-0.1584) . 401584) 1.49 002390056 =1849] ; 00256 TH =1.8491 0.005749 -1 3548 \ Now FOS) = (18549 aoa gus-10 =~0.01995 Third iteration: Put x _ 4 ing) 1 . srt bli) 8) *1.4g 8548-1 oon 04 54g “Cs [000) 1g, OO) Fis) Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 31 Now Slx4) = (1.8556) = (1.8556)* -1.8556 -10 = 11.85598 -1.8556-10 = 0.00038 Fourth iteration: Put n= 5 in (1) (xq — x3) Fle) Flx3)-Fle4) (1.8556 -1.8548)(0.00038) 0.01925 — 0.00038 = 1.8556 - 0.000015 = 1.8556 So xq =Xs upto four places of decimals. Xp Xt = 1.8556 + «. the root correct to four places of decimals is x = 1.8556 [233 THE METHOD OF ITERATION OR FIXED POINT ITERATION: x = ¢(x) METHOD The fixed-point iteration method is a very useful method of finding a real root of an equation fx) « 0. In this method the equation f(x) = 0 is rewritten as x = 9(x), suitably. First we find ‘an interval in which a root lies. Let x, be an approximate value of the root in this interval. A better approximation or the first approximation x, is given by x; = 6(xo) ‘The second approximation x, is given by x2 = ¢(x,) and so on. Thus, we get the iteration formula Xne —e TO ‘The sequence of approximations x5, x, x», ... approach the root @. The function ¢(x) is called an iteration function. The form x = (x) can be obtained in several ways. The convergence of the iteration process depends on the suitable choice of the function ¢(x) and the choice of x,. The condition for convergence of the iteration process is |g’(x)<1 in a neighbourhood of x. Some of the iteration methods (for example, Newton's method) depend on the fixed point method for convergence. So this method is also known as general iteration method or the iteration method. ‘The fixed point iteration is specially useful to find roots of an equation given in the form of an infinite series. i The rate of convergence of the fixed point method is ie. it has a linear rate of convergence. Scanned with CamScanner 32 NUMERICAL ANALYSIS Geometrical meaning of fixed point iteration ‘The successive approximations of the root are X9.%1»%2- where x, = lx) X_ = x) X3 = $(xg) and so on Draw the graph of y=x and y= #le) Since |f’(x)| <1 near the root, the inclination of the graph of #(x) should be less than 45° Draw the ordinate (xq), it meets the curve in Py and draw P,Q, parallel to the x-axis. Then Q is (cy, Glos Qp 18 Oep.06e,)--- we find Xp,X;,%9,--4 approach the root ot We shall state the theorem for convergence. . EE Let a bea root of f(x) = 0. Inaneighbourhood [of a, let the equation be written asx = o(x). If (x) is continuous in J and |” (x) <1vxe I, then the sequence of approximations x9,x1,3,--- given by x, = gix,) converges to a, where xp 0 So, the root is between 3 and 3.5 and is nearer to 3.5. waar Take x, = 3.5 ret ffx) = 0 can be rewritten as x? = 10x45 > x= (10x+5)/8 (1) Let (x) = (10x45) # $ (ox +s? 10 = Wiox+5y?* 10 /poy2/3_ 10 | =9'(3.5)=— = =0.285 and (x0) = 9°(3.5) 3 (40) a0 0.285<1 «: the process will converge in a neighbourhood of 3.5 , = (Xo) =9(8.5)=(10x3.5+5)? = (40)3 = 3.41995 X2 = (x) = 9(8.41995) = (10 x 3.41995 + 5)” = (39.1995)? = 3.39698 Xs = (x2) = ¢(8.39698) = (10x 3.39698 + 5)”* = (38.9698)? = 3.3903 x4 = o(xs) = 9(3.3903) = (10 x 3.3903+5)/2 = (@8.903)" % 3.3884 _ *s = (xs) = 9(3.3884) = (10x 3.3884+5)' = (38.884)”* = 3.3878 x6 = (Xs) =9(8.3878)= (10x3,3878+5)° =(38.878)* = 3.3877 x = 9(x6) = 6(3.3877) = (103.3877+5)”° = (38.877)? = 3.3876 Xs = 6(x;)= (8.3876) = (103.3876 +5)? = (38.876)* = 3.3876 Since x7 = xg, the root correct to 4 decimal places is x = 3.3876 Scanned with CamScanner 34 NUMERICAL ANALYSIS Note: (1) Suppose we rewrite the equation as x= ae 5). Hoax -5), then # a 2 ¢'@s)-2G5) - 3.6751 So in this form the process will not converge, (2) If x9 is chosen close to the root, in few approximations we can get the roct. In the above problem we could have chosen xp as 3.3. . \ Example 2 | Find a negative root of the equation x° - 2x + 5 = 0 to 4 decimal places. | | Solution a | Given equation is x3-2x+5=0 The negative root of (1) is the positive root of (x)? -2(-x) +5 =0 [Replace by x by] a8 42(x)+5=0 = 8 + 2(x) @) i xo -2x-5=0 Let f(x)=x9-2x-5 We find, f(2)=8-4-5=~1<0 and f(3)=27-6-5= + the root is between 2 and 3 and is nearer to 2. ~ Take x, = 2 ‘The equation (2) can be rewritten as x9 = 2x +5 = xa(2x45)? 16>0 Let Hs) =et5 eee Laxey 2 4 Bug Now #(2)=3(07 7 = a =0.1541<1 . ++ the process converges in a neighbourhood of 2 Boo 4 = O(X) =9(2) “Ot ss %2=#(x,) = 9(2.0801) =(416027°"/, | (9.1848) - = 6(%9) =9(2.0924) =(2.1848+5) “fo884) Xq = (xg) = 9(2.0942)= 4.188445) ie39! %5 = 9(x4) = 92.0945) = 4189045) | Scanned with CamScanner xe ‘35 CHAPTER 2 | SOLUTION OF ALGEBRAIC the root correct to 4 décimal places is 2.0945 «1. the negative root of the given equation is x =-2.0945. Example 3 Solve 2x —log,9x = 7 by the method of interation. Solution (et) Given equation is 2x—log,9 x-7=0 Let F(x) =2x—logyy x-7 We find f (8) =6—logy) 3-7 =-1.477 <0 and f(4) = 8—loayy 4-7 = -0.3979 > 0 Now § (8.5) =7 logy, 3.5-7 =-0.544 <0 So the root lies between 3.5 and 4 and it is nearer to 4. We shall take xp =3.7 Rewriting the equation (1), we get = Foa%0 x+7) 1 Let (x) = 5 (losiox+7) 2 We know = Then o'(x)= logyg x) = 4 Togyge] f.'logyo x = 109, x logo €] 1d togiod = letho 9'B.2)= Pylon 2.71828 = 0.05<1 :, the process converges in a neighbourhood of 3.7 Now x4 = 980) =Z(lome3 747) =3.7841 xy = 9(%1) = Fllome 3.784147) =3.78898 x3. = (62) = 3 (logy 3.78898 +7) = 3.78926 X4q = (x3) = =(logi.3.78926 +7) = 3.78927 x5 = (x4) = 3 (cao 3.78927 +7) = 3.78927. Since x, = x5, the root correct to five decimal places is x = 3.78927 . Scanned with CamScanner 36 NUMERICAL ANALYSIS Example 4 Solve e*-3x= 0 by the method of iteration, Solution Given equation is e* -3x=0 a Let f(x) = e% -3x Now #(0)=1>0 $(1)=e-3=2.7183-3 =-0.2817 <0 and (0.5) =e -1.5 = 0.1487 >0 «. the root lies between 0.5 and 1 and it is nearer to 0.5 Take x, = 0.6 The equation (1) can be rewritten as xede ea s0'Q)=5 and #'(0.6) = 5e°° =0.6074<1 “i the process converges in a neighbourhood 0.6 mj =0(:0)=0(06) | =ZerS =0.6074 xy =6(m)=9(0.6074) =e" = 0.6128 x3 9(%2) = 0(0.6119)= 5 5129 - 0.6146 to x4 = 9(%3)= 900 6146)=3e° 8146 - 0.6163 | Xs (<4) = 9(0.6163)= Se 6163 0.6174 x6 = (x5) = 9(0.6174) S174 = 0.6180 #4 = 6 (%6) =9(0.6180)= 320 = 0.6184 . = 6(%7) = 9(0.6184)= 30° = 0.6187 Xp = 6(xs)=9(0.6187) 06187 = 0.6188 xo = #(%9) = 9(0.6188)= a = 0.6190 _ 3 = $010) = 9(0-6190) = fet = 0.6190 Since xj9 = Xin the root correct tO 4 decimel places is x = 0.6190 in a IE Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 37 Example 5 2 44 Find an approximate value ofa root of the equation1-X_4—*___**_,. which is very close to 2.4. 2? 22.4? 2? 4? 6? Solution 2 1 x? 1 2¥ Given 1-5+—,/4] fx |2 2 ar) waar) Put yy yal+o-t ~ (2? 3g) so ma ue 0 OF BF Given x9 =2.4 ay 4 Yo =A a1. (1.44)? _(1.44)° ey iP +0.5184 0.08294, )=9(2.4355) a1, G4355)7" (0 assy (2 (3 a1 4-433). | (2.433) iF + 0.5134 -0.0817+.. (1.4317) (243177 (1.43179 + (2 ey =1+0.5124~0.0815+...=1.4309 Scanned with CamScanner 1.4317 =1 ¥s = (va) =9(1.4309) =14 (1.4309)? _ (1.4309)? Cy (ai? =1+0.5118 -1 0.0814 +. .- = 1.4305 sig ard ara vary cloco, wo call take the value of y as yi 1.4305, # oa 4305 = x? =4x1.4305 *=V4x1.4305 =2.392 ‘. the root is x = 21392 e a (ERB NEWTON-RAPHSON METHOD OR NEWTON'S METHOD OF FINDING A ROOT OF f(x) =0 ‘Let x, bea value close to the actual root @ of fix) = P Let x, = xp +h be the actual root of f(x)=0 Then, f(a)=0 Taylor's series expansion for f(x +h), “— (ve) +h G80) + Peo) =O) e x, is close to x, and his small, h®, h’, ... neglecting h?, h®, ..., we get - J (0) +hf (xo) = 0, approximately n= fa} f(x) #0 7%) Fe ru ia bin apes oct, which is ' = (%0) i =a 270" F(x) 2g ‘ and proceeding as above we will,get the second approximation root. = f(xo +h) =0. are very small. Scanned with CamScanner upto the desired degree of accuracy. Ce) Newtor-fiaphson metted s also known 2s method of tangents, (3) The rate of convergence of Newton’s method is 2. So, it is also referred as quadratic convergence. Geometrical meaning of Newton-Raphson method “\Let fle) =0 be the given equation. - Then the graph of the function is the curve y = fo). “» The intersection of the graph with x-axis is the root a. Let xp be the initial approximation. TS Let Py be the point on the curve corresponding to’ x= xp. e Then Pp is (xo, flxo)) Equation of the tangent at Pp is Y= Flee) = Oe gNx=%) = + Let this tangent meet the x-axis at T,. Scanned with CamScanner SS 2: 40 NUMERICAL ANALYSIS > & Oh=x Let P, be the point on the curve corresponding fo == Then P, is Ix. If the tangent at Fy menses Tp then OT = 2 =~ fy and s0 on. of the root. _ are the successive approximations %y, Xz Xr | we find the greph of the function is replaced by tangent at the point and ee enmuad rot bse) = 0er ss) =Onearihe root. Note: Neaton’s reyes aeue Example 1 Find a positive root of x°-5x+3=0- Solution _ Given eqaation is x° -5x+3=0 Let F(x) 25x43, then j'(x)=3x7-5 Now 4(0)=3>0 and f(1)=1-5+3=-1<0 So,2 root lies between O and 1 Further {(0.5) =0.125-2.5+3 = 0.625, which is closer 10 2270- So, the root is actually between 0.5 and 1 and it is nearer to 0.5. Take x, =0.5 Newtone's iteration formula is Sl) ~ (x,) .n=0,1,2,... OO Scanned with CamScanner ee CHAPTER 2 | SOLUTION OF ALGEBRAIC 41 imation is L approx! flo) S'(0) _I(0.5) £(0.5) 0.625 0.625 OFS e 08 Gpe 7 95+0.147 = 0.647 _ £1) 5 I approximation is *2= 1-7) xy =Xy- =0.5 =0.5- = 0.647 - Freez) § (0.647) = (0.647)° -5(0.647)+3 = 0.03534 (0.647) = 3(0.647) -5 =-3.7442 0.03584 (-3-7442) Xp = 0.647- = 0.647~ 0.009572 = 0.65657 I approximation is X3 =*2—FEey £ (0.65657) = 0.65657— F (0.65657) Buk 4 (0.65657) = (0.65657)° -5(0.65657)+3=0.00019 4 (0.65657) = 3(0.65657)° -5 =-3.7067 0.00019 3.70! _ f(x) (es) £ (0.6566) f (0.6566) X3 = 0.65657 - = 0.65659 + 0.000051 = 0.6566 IV approximation is xq =X3 = 0.6560- Since x, = x, upto four decimal places, the root is x= 0.6566 Scanned with CamScanner 42 NUMERICAL ANALYSIS i Example 2 Find by Newton-Raphson method a positive root of the equation 3x -cosx-1=0. * Solution Given equation is 3x—cosx—1=0 Let f(x)=3x-cosx-1 af (x)=3+sinx {(0)=-2<0 and f(1)=3-cos1-1=2~cos1 = 1.4597>0 2. a root lies between O and 1 Now f (0.5) = 3(0.5)—cos0.5—1 =-0.3776, which is closer to 0 So, the root Is indeed between 0.5 and 1 and is nearer to 0.5. ‘Take x, =0.6 ° . Newton's iteration formula is Xy4 wt). ae Fp MOA 1 approximation is x, = x9 4 ‘S ; Bat J (0.6) = 3(0.6)—cos(0.6)-1 = 1.8-0.8253356 -1 = ~0.0253356 f(0.6) = 3+sin(0.6) = 3+ 0.564642 = 3.564642 (-0.0253356) | 6 C0.0258558) =0. a 3Gtegs 7 0:5+0.0071 = 0.6071 Il approximation is Xp =x £(0.6071) ¥ (0.6071) | But f (0.6071) = 3(0.6071)—cos(0.6071)-1 : = 0.8213 -0.821306 = -0.000006 “7 J (0.6071) = 3+sin(0.6071) = 3.570488 (-0.000006) 3.570485 = 0.6071 +.0.00000168 = 0.60710168 — Since x, = x, upto 4 decimal places, the root is x= 0.6071 . =0.6071-. x2 =0.6071-. Scanned with CamScanner ——————— CHAPTER 2 | SOLUTION OF ALGEBRAIC 43 Example 3 ‘Using Newton’s method, find a real root of xlogyox = 1.2 correct to 4 decimals. Solution Given equation is xlogygx = 1.2 = xlogyg x-1.2=0 x Let #(x) = xloox—1.2 F(x) =x logs €+ogi9=leayg¢ tome * =0,43429 + logy x Now fQlj=-1.2<0 J(2) = 2logy92-1.2 = -0.59 <0 (3) = Blogy9 3-1.2 = 0.23 >0 So, the root is betweon 2 and 3, but nearer to 3. So, take x, = 2.7 Newton's iteration formula is Mn) 9 0/1,2ye 4 _L approximation is \ } = | But (2.7) = 2. Tod 2.7 -1.2 = 0.03532 | J'(2.7) = 0.43429 + logyo 2.7 = 0.86568 | 7 (-0.03532) | S 1 =2.7-"9 86566 122.740.0408 = 2.74 j fle) _ (2.74) A II approximation is xe F Fe) 2) 74-574) (2.74) But f(2.74) =2.7Al0930 2.74 -1.2 = =-0.0005635 2.74 = 0.872041 §' (2.74) = 0.43429 + losho _(-0.0005635) - Xx, =2.74-"9 372041 = 2.74 + 0.000646 = 2.74064 Scanned with CamScanner 44 NUMERICAL ANALYSIS fe f (2.7406) Il approximation is xa" 2 FGn)" 2.7406 ~F@7408) But § (2.7406) = sD 2.7406 - 1.2 = -0,00004 J (2.7406) = 0.43429 + logy 2.7406 = 0.872136 os (0.0004) _ p= 2.7406 - aaag 2.7406 Since xq = xs, upto four decimal places, the root is x= 2.7406 . Example 4 Find a solution of 3x +sinx—e* = 0 correct to four decimal places by Newton's | method. Solution” Given Bx+sinx-e =0 Let f(x) =3x+sinx-e%, f’(x)=3+cosx—e* - f(0)=-e° =-1<0 | f()=3+sinl-e | =3+0.841-2.718=1.123 >0 | So, the root lies between 0 and 1. Now {(0.5)=3(0.5)+sin(.5)—e° =1.5+0.479 -1.649 = 0.33 which is nearer to 0. «+ the root lies between 0 and 0.5 and it is nearer to 0.5, Take x, = 0.5 Newton's iteration formula is (x) te.) 1 imation i: xy - 200) 9. 5_ 110-5) epproximation is x =) —F y= 05-Fee) J'(0.5) =34+c0s0.5-e°5 = 3.87758-1.64872 = 2.2288 Xana =X 0.1,2,... _ Mapproximation is But J (0.352) = 3(0.352) + sin(0.352)- e**? =-0.02113 J'(0.352) = 3+ 0,93869- 1.42191 = 2.51678 =0.352- (-0.02113) ~~ 2.51678 = 0.352 +.0.00839 = 0.3604 Scanned with CamScanner a CHAPTER 2 | SOLUTION OF ALGEBRAIC 45 Ill approximation is x3 = xp ~f2)- 0.3604 - 1(03604) 2) F (0.3604) But £(0.3604) = 3(0. 3604)-+sin(0. 3604) — 2° = 1.4338 - 1.4339 = -0.0001 But F (0.3604) = 3+ 0.93576 - 1.4339 = 2.50186 -0.0001) =0.3604—£0-0001) " a 2.50186 = 0.3604 + 0.0000399 = 0.360439 Since x, = x, upto four decimal places, the root is x= 0.3604 7 Example 5 ° Find the negative root of x*—2x+5=0 by Newton-Raphson method correct to 8 places of decimals. Solution Given equation is x*-2x+5=0 The negative root of x*—2x+5 =Ois the positive root of (-x)* -2(-x)+5=0 = —x342x4+5=0 4 = x3 -2x-5=0 Let (x)=x8-2x-5 f(x) = 3x? -2 {(Q)=1-2-5=-6<0 and -4-5=-1<0, £(3 -6-5=16>0 So, the root lies between 2 and 3 and it is nearer to 2. Take x, =2 Newton's iteration formula is ~ Now Xana = | Iapproximationis x, =~ - Wapproximationis x2 =%;-7—y Scanned with CamScanner 46 NUMERICAL ANALYSIS But § (2.1) =(2.1)° -2(2.1)-5 =9,261-9.2- 0.061 j J'(2.1)=3(2.1)' -2=11.23 0.061 =2,1-2061 94 _0.0054=2, 2 Tygg ~2-1- 0.0054 = 2.0946 £ (2.0946) MI approximation is x3 = x2 - $(x2) f(y 0946) But f (2.0946) = (2.0946) -2(2.0946)-5 = 9.18974 —4.1892—5 = 0.00054 f'(2.0946) = 3(2.0946)” 2 = 11.16205 0.00054 x3 = 2.0946 - = 2.0946 ~0.000048 = 2.09455 :. the root correct to 3 decimal places is 2.095 v» the negative root of the given equation is x=-2.095 . Example 6 Find an iterative formula to find JN, where Nis a positive integer, using Newton's method and hence find VT1. Solution Let xeVN. | Tet (x)=? -N oP (x)=2x _ $a) Newton's iteration formula is Xq =Xq_— FE", n= 041,23... F'&n) To find value of VII : Here N=11 We know x = 11 lies between 3 and 4 [+9 =3, 16 =4 and 3 < Vil < /16] Now (3.5) =(3.5)° -11=1.25 > 0. : So, the root lies between 3 and 3.5. 3 Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 47 Take x, =3.3 1 % =3(23+ = 3) 3.31666 x =2(3.31666+ 2 3 isis zs)" 3.31662 x, =2(3.31662+ . 3 = ae } 3.31662 +. VII =3.3166 correct to 4 decimal places, . * Example 7 Find an iterative formula for YN , where N is a positive integer, using Newton's method and hence find 924, 9/41 to 6 places of decimals. Solution Let x=9N, then x?=N =3x3-N= Let F(x)=x8-N, 2K (x)= Newton’s iteration formula is xg ex, fC) ge net Fe ey 0,1,2,...- N a+} n=0,1,2,... which is the iteration formula - () To find 924: Here N= 24. We know x = 9/24 lies between 2 and 3. f(2)=8-24=-16<0 end f(3)=27-24=3>0 [::9S =2,987 = Sand 2.< 924 <3] Now #(2.5)=(2.5)° -24= 8.375 <0 So, the root is between 2.5 and 3 and it is closer to 3. Scanned with CamScanner - ne, 2 AEA NUMERICAL ANALYSIS, Take x, = 2.8 x =4)2(2.8)._24_ 3208 a | Loe = 5(5.6+3.06122) - 2.88707 1 x2 =| 2(2.88707 +4 ° if ) (2.88707) = 315.7414 +2.879364), = 2.88450 2 f(3)=27-41=-14 <0 and f(4)=64-51=23>0 1.87520 0, between 3 and 3.5 and closer to 3.5 Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 49 x= afee. vee | (3.4489)? 1 = 316.8978 + 3.24685) = 3.4482 = 23s as | 1 = gl6.8964 + 3.4482517| = 3.44821724 Similarly X4 = 3.448217 Yai =3.448217 upto 6 decimal places. . Example 8 Find the iterative formula w Newton’: fa formula for () 1 wy 1 * where Nis a positive integer. Hence find + and z Solution 1 1 @ Let x= =-N=0 La yiget i-, then f(x) --3 Newton’s formula is F(%) 2 id =0,1,2... aut Fly i-n Xn Xnet = Xn — 1 = ae a(2- n) Xn =x, +x,-Ne a Xp =2x,— Nx =x,(2-Nx,), = 0,12, : Here N=31, Cee ee mentees Scanned with CamScanner 50 NUMERICAL ANALYSIS Since 2 ince 7 0.03, take xp = 0.03, % = Xp (2-31%p) From(ty =0.03(2-31%0.03) = 0.0321 xp = (2-314) = 0.0321 (2~-31x0.0321) = 0.03226 xg = 0.03226 (2~31x0.03226 = 0.032258) +. the value of 4 is 0.03226 correct to 4 significant places. wd ated (i) Let == x? No oN Let s(a)=9? 3 then f'(x)=2x Newton’s formula 15 %nq3 = % Fl) | “Gn) Es =x, 2x, 1 O§ = 0,25819889 ExOae) ee s =3(2 25819 + 0.25819 correct to & places of decimals. { Jue of # is 2 the Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 51 Example 9 ‘The equation 2e* - _1 ‘te hae i i 2 i two roots greater than ~1. Calculate these two roots correct to five decimal places. Solution ‘The given equation is Let N 0-1 ak low F(0) 2 1 2” 0 F(l) =2e% -$-4=-0 09757 <0 So, there is a root between 0 and 1 and the root is nearer to 1. N f(-0.8)=2e° 1 ___1__ ow fC0.8) = 20! S523 oaai =ee08_ 1 1 2098 ~~ 55 =~ 1.38225 <0 4 +. another root lies between -0.8 and 0 and the root is close to zero, since f(0)=0.5. and F(0.8) =-1.38225, We shall find these roots by Newion-Raphson method. ~ (i) First we shall find the root between -0.8 and 0 Take x, =-0.6 Newton's iterative formule is Fxq) w=X— a, «n=0,1,2,3... Xpet nm C,) First approximation: Put n = 0 Fx) a =x-5 gs: 1% FG) 1 1 But fix)=2e*- 5-7 gee) ed ‘| dy =i dx (x +a)" Fea 20" — OF eae ie 1 («+2P “(ap | -2e*+ Scanned with CamScanner 52 NUMERICAL ANALYsis Now FO. = 2006 0.642 0641 = 2296 _ a 1 = 20s s2rii5)° 714286 - 2. 04289" 5 6 = 3.644238 0.714286 - 2 med _—_ (0.6427 (-0.6+1) 2(1.822119) 4 xy=~0,5 0.429952 3.11597 =~0.6-0.13798 =-0.73798 Second approximation is: Put n= 1 Ly) feo. 1385 jx,) 7 0-73798-F 9.73798) Xp axy- Now (-0.73798)=2¢0737m%0 ee 707375842 0.737? epee 1.26202 0.26202 pA =4.183412~0,75238-381650--0 1-0.73798)=-220738, 1, La “prae20gF * (0.260027 035? 4.183412 + 0,62787+14.56569 => mp2-0.73798- (242640. 0.69934 ‘Third approximation: Put n = 2 =x, — %2) (-0.69934) 69934) xy =x, - fe) BTM pa} 0:69994- apa) Now fL-0,69934)= 20060994 1D 1.30066 ~ 0.30066 = 4.02485 0.76884 3.32602 =-0.07002 Scanned with CamScanner a 10.69 MAPTER 2 1 sox mon oF P88) x 200.69534 + 1 1 cul dg O3008F * 79,50066) 996? % 0.59112.4.11.06238= 7 = 89834 [0.07001 =. 7.62865 ~0.69934 four epproximation: Put pg +0.009177 - 0.69016 =~4.02485 , Xa =x, ~ Lbs) 6) a (0.6901 Fee} “0.69016 ~ oid) Now Hors)= 20080016 a "530984 ~ oa008t = 3.98807 _ 9730984 0.30984 ~ 0.76345 - =~0.00285 45-3.02747 Fxg) =~2¢069016 be 1- 1 ee ee oe (130984 * j0.30984)" 7 0.58286 +10.41658 =7.0819 =-3.98807 4 %4 = ~0.69016 ~ 0.00285) __9 e975 7.01137 ~~" { Plthapproximation: Put n= 4 if ssf cass fs Now $(-0.68975)= 2.096875 ___ 1. (1.31025) 0.31025 = 3.98643 0.76321 -3,22321 =-0.00001 J(-0.68975) = 26068975 1, -31025}? (0.31025) = 3.98643 + 0.58249 +10.38906 = 6.98512 00001) 98512 =-0.68975 + 0.0000014316 =-0.68975 Stee x, =:5, the root between —1 and O correct to four decimal places is x = 0.6897 S -§) The other root lies between O and 1 and it is nearer to 1. Take x, = 0.8 a a a a Scanned with CamScanner 54 NUMERICAL ANALYSIS , ox, fl) 9,3 108) approximation le x = %)- 77-0) 8- F083) 1 =2e08- 1 flxo) = f00.8)= 268 5-75 = 0.89866 - 0.35714 - 0.55556 = -0.0. 1404 HV a pttiahe 2g hy Leet Hvq)= f10.8)=-26°°9 + ae = -0,89866 + 0.12755 + 0.30864 =-0.46247 sn, = 0.89866 ~{-0:01404) _ 9 0866 - 0.03036 = 0.8683 (0.46247) ax, £08) - 9,g6¢g- 10-8689) Tl approximation is x, = x; Fe) 0.868: 710.8683) apes 2 How AD-SOBS) = 28 08683+2 086831 = a i= = 08398375553 [868341 = 0.83933 - 0.34864 —0.53525 = -0.04456 1 1 * 86837 * 8683" = 0.83933 +0.12155 + 0.28649 =-0.43129 (0.04456) (0.43129) F(0.8683) = —2e-°-8663 Xz = 0.8683- = 0.8683 — 0.10332 = 0.76498 Hixz) £(0.76498) mm tion is x3 =x; - 572 = 0, ~ ao ceaoR approximat fs x3 =x Fp) 0.76498 ¥0.76498) gs eh 0.76498+2 0.76498+1 = 0.93069 - 0.36167 - 0.56658 = 0.00244 Now £(0.76498) = 2e-76498 _ (0.76498) =-2er07698,__1__,__ 1 (2.76498)? © (1.76498) =-0.93069 + 0.1308 +0+0.32101 = -0.47888 ax, Od _ 0.00244 Ha Fa Fg) 0.76498 — To agagy = 0.76999 - = al Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 55 TV approximation is (xs) = 0.76999 — (0.76999) 1(0.76999) Xq = xy = (0.76999) = 2¢~0:76999 _ 1 1 0.76999+2 0,76999+1 = 2(0,4630) - 0.3610 - 0.56497 = 0.00003 (0.76999) =~2e-07609, 1 9, (0.76999+2) (0.769994 = ~2(0.4630)+ 0.1303 + 0.3192 =-0.4765 0.00003 -0.4765 +. the second root between 0 and 1, correct to 5 decimal places is x = 0.77005 . x4 = 0.76999 - = 0.76999 +0.000063 = 0.770053 Exercises 2.1 () Find a root by bi-section method. (1) x* x5 -2x? -6x=1=0, between 2 and 3 to four decimal place. (2) x4-2x-10=0, which lies between 1 and 2. (i) Find a root by Reqular-Falsi method. (3) x8-5x+1=0 (4) the smallest positive root of x? —log,x-12=0 (10) xe* -sinx =0 to 3 decimal places. ; (Il) Find a root of the following by the fixed point iteration method. (11) x? +x?-1=0 (12) x3+x?-100=0 (13) 2x-10logy9x-7=0 (14) x* 45x =1000 [Hint: x = (1000 -5x)/*, d(x (1000 - 5x)”*] Scanned with CamScanner . ™ 56. NUMERICAL ANALYSIS (15) Given that 0.44 is approximate root of the equation Pi yPl oP ee P-'5 +40" 42" 216 i300 Improve it by two iterations. (16) Find the smallest root of x ext (IV) By Newton's method find a root of the following equations. (17) 3x9-9x? +8 =0 (18) x?-6x+4=0 between 0 and 1 to 5 places of decimals. (19) x8-3x+1=0 between 1 and 2. (20) xe*-2=0 (21) 2x°-3x-6=0 between 1 and 2 te five places of decimals. (22) xlogyox =12.34 (23) e* =4x between 2 and 3. (24) x? +4sinx =0(x #0) (25) x3-2x-5=0 (26) x-2sinx =Onear 1.9 to 3 places of decimals. (27). e* -sinx =0 (28) logy x =cosx (29) x*-x-10=0 (30) Negative root of x°-5x+11=0 correct to 2 places of decimals. (81) 2x-logi9x=7 (32) Find Y10 by iteration. (V) By the secant method find a root of the following equations. (33) x3 4x2 —3x—3 = 0 between 1 and 2 correct to four decimal places. (34) 3x+sinx—e* = 0, correct to four decimal places. Answers 2.1 (1) 2.7321 (2) 1.9295 (3) 0.2016 (4) 3.646 (5) 1.050 (6) 0.517 (7) 2.279 (8) 0.5885 (9) 0.686 (10) -0.134 (11) 0.7549 (12)4.3311 (13)4.7892 (14) 4.5465 (15) 0.476 (16) 1.4453 (17)1.226 —(18)0.73205 (19) 1.5321 (20) 0.8526 (21) 1.78377 (22) 11.5949 (23) 2.1533 (24)-1.9338 (25) 2.0946 - (26) 1.896 (27)0.5885 (28) 1.3029 (29)1.856 (30) -2.95 (31) 3.7892 (82),2.15466 (33)1.7351 (34) 0.3604 ~ ei Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 57 EER GENERALISED NEWTON-RAPHSON METHOD OR MODIFIED NEWTON’S METHOD Suppose x= isa root of f(x) = 0 of multiplicity P, then flx) © (xa) 9(x), where (a) + 0, “Then the iteration formula is x,,. =x, -pJ%), n=0,1,2.... Note: i (1) When p = 1, we get Newton-Raphson formula. (2) Since @ ‘s a root of f(x)=0 of multiplicity p,a is a root of f'(x)=0 of multiplicity p-1, @ isaroot of f"(x)=0-of multiplicity p-2 and:so on. If the initial approximation xq is chosen closer to the root, then the expressions Stxo) ~ (pn fo) _ ny fbe0) Py *O-w Wage Fo~(P-PhzrpShone must have the same valu, Example 1 Find the double root of x — 7x? +16x—12 = 0 by general Newton's formula with xq =1.5. Solution Lat fx) = x? -7x? +16x—-12 Given x, = 1.5 F's) = 3x? -14x +16 " Since there is a double root neat xq = 1.5, the generalized Newton-Raphson iteration formula is n=0,1,2, Xt = Putting n = 0, the first approximation is 2 fle) _ 1 5 2/015) 9520) oF) Now F(%q) = f(.5) = (1.5)° -7(1.5)? +16(1.5)-12 = 3.375-15.75+ 24-12 =-0.375 and Feo) = #05) = 30.57 -1411.5)+16 =6.75-21416=1.75 = 45 2(-0.375) 515-95 0. =154 $2 =1.5+0.42857 = 1.9286 Scanned with CamScanner 58 NUMERICAL ANALYSIS ‘Second approximation is 2f lx) _ _2f(1.9286) 271 Fegy 71 9286- Fy oR) flx,) = f(1.9286) = (1.9286)* 711.9286)? + 16(1.9286)-12 = 7.173423 - 26.036485 + 30.8576 -12 = -0.005462 F(1.9286) = 3(1.9286)(1.9286)? - 14(1.9286) +16 =11.158494 -27.0004 +16 = 0.158094 = 0.1581 _ __2-0.005462) ¥2 = 1.9286-"T eg -= 1.9286 +0,069096 = 1.9977 Now Third approximation is = xq -2-£0%0) 1 9977 _ 2/1997) mee) 77 - Fa 9577) Now $(1.9977) = (1.9977) - 701.9977? +16(1.9977)-12 = 7.9724317 - 27.93563703 + 31.9632-12 =-0.0000053 £19977) = 3(1.9977) -14(1.9977) +16 = 11.97241587-27.9678 +16 = 0.004616 . _ 2(-0.0000053) _ = Xp = 1.9977 Sea g = 1.9977 + 0.002296 = 1.999996 «. the multiple root is x = 2 approximately . Example 2 Find the root of multiplicity 2 near 0.5 for the equation x* - x? —x+1=0. Solution Let fix)=x3 —x? x41 f(x) = 3x2 -2x-1 Since there is a double root near x) =0.5, the generalized Newton's Raphson iteration formula is, Kn ne 2ay n=0,1,2, Putting n =O, the first approximation is 2ilxo) 2f(0.5) ao = 0.5 0-5) F%) (05) (0.5) = (0.5)° - (0.5)? -0.5+1 =0.125-0.25-0.5+1=0.375 x =%)- Scanned with CamScanner CHAPTER 2 | SOLUTION OF ALGEBRAIC 59 410.5) = 310.5) -20,5)-1=0.75 -1-1=-1.25 =0.5-2(0-375) _ = x =0.5-2) = ps = 0-5+0.6=1.1 Putting n=1, the second approximation is - Six) 0.1) x, =x, -22°9) 214 2 ft) EPG) ray f0.D= (1.18 ~(1.1)?-1141 =1.331-1.21-1.14+1=0.021 £(1.1) = 3(1.1? - 20 1)-1=3.63-2.2-1=0.43 Xe =1.1-20.929) 211-0 09767 = 1.0023 Putting n = 2, the third approximation is 2flxp) Fx) 2x f(1.0023) 31.0023 OEE £(1.0023) = (1.0023)3 - (1.0023)? -1.0023+1 -006915882-1.00460529 - 1.0023 +1 = 0.00001059 = 0.00001 Xg = Xx_- 4 £/(1.0023) = 3(1.0023)? - 2(1.0023)—1 3.013815 -2,0046-1 = 0.00922 2(0.00001) = 1.0023 - 210.0001) iS $~"o.00922 = 1.0023 - 0.00217 = 1.00013 -. the double root is x= 1.0013 Note that 1 is the double root of the given equation and 1.00013 is very close to the actual root . . [BRRAmMaANusan’s METHOD The year 2012 was declared as ‘National Mathematical year by our Prime Minister Dr. Manmohan Singh in honour of our Mathematical prodigy, “Srinivasa Ramanujan” on his 125% birth day. So, we thought it is appropriate to include Ramanujan’s method in this text book. He has given an iterative method to find the smallest root of f(x) = 0, where f(xx) can be = written in the form I(x) =1-(ayx + 093? + 05%? +...) @ Scanned with CamScanner 60 NUMERICAL ANALYSIS yd Uxissmallthen [1 (x +0,x7 + 09x" + J can be expanded using binomial expansion a 2 series of the form by + byx + byx? + byx® +... (ax + ax? +ayx? +...) 4... hoax?! Lela sage? +ayx? 4.) + (axc%ax? +0yx? + =D, + byw + byx? + yx? + Bex! +. = L4a,x40,x? 4a,x" +0,x8 +... eafx? + 2aja,x3 + 08x! + 2a,a,x! + atx? + afayx' +... = By + bx + byx? + byx? + gx! +... Leyes (ay +f) x2 + (a5 + 20y09 +09)x? +(04 +08 + 20109 + Bafa )x* +... = by + byx + bgx? + byx? +bgx* +... Equating coefficients of like powers on both sides, we get b=l by =o, er by = 03 + 20,0, +09 bs = 04 +0 + 20,05 + 3afay +a# and so on. Now we shall rewrite the R.H.S interms of a’s and b's in a special way. b=1 \ by =a. 1=4b 7 ~ bg = a (af +02) -+ 09) +5. } by = aya +0y.1 = ayby + anh, fq = bo] bs =a, (a + 2a,» +09) + a2ay + 0,04 +03 +04 = 6,(¢f + 20,2) +05)+09(08 +a) +0405 +041 = Oybg + o,bg + a5by +a4b, and so on. From the above relations, we observe that the R.H.S is in terms of a's and b's. ‘The sum of the suffixes in each term on the R.H.S is the same suffix of b on the LHS. From this pattem, we can write by = yb,-1 + Apby 9 +a3b,_3 +...+4, 1b, n=23, Srinivasa Ramanujan was gifted with powerful intuition and computational skill. He has simply stated this method (without rigorous proof) the successive convergents, namely 12,3,4,... Scanned with CamScanner

You might also like