Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0%
(1)
0% found this document useful (1 vote)
3K views
Book
Uploaded by
nauman khan
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
Download now
Download
Save Book For Later
Download
Save
Save Book For Later
0%
0% found this document useful, undefined
100%
, undefined
Embed
Share
Print
Report
0%
(1)
0% found this document useful (1 vote)
3K views
Book
Uploaded by
nauman khan
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
Download now
Download
Save Book For Later
Carousel Previous
Carousel Next
Save
Save Book For Later
0%
0% found this document useful, undefined
100%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 568
Search
Fullscreen
Cerra Simplified Numerical Analysis I Using C++ and MATLAB Ore Hamayun Farooq WC MO LaeOO EO I Asocdk ALi Khoi 6835 University dL Education, Laheve. ; . Coalkan Camps) Simplified Numerical Analysis I Using C++ and MATLAB Dr. Amjad Ali (Principal Author) oe BaD Hamayun Farooq Muhammad Umar * (Co-Authors) yp AS Pure and Applied Mathematics (CASPAM) ed Bahauddin Zakariya University (BZU) Multan, Pakistan Centre for Advanced Studies inSimplified Numerical Analysis 1 Dr. Amjad Ali (Principal Autbor) ©2018, TimeRender Publishers. ISBN: 978-969-7821-01-3 (for Special Edition) ISBN: 978-969-7821-00-6 (for Economical Edition) All rights reserved. No part of this publication may be reproduced, or transmitted, in any form or by any means- inclu f i ; + inclu but not limited to, electronic, mechanical, photocopying, recording, or, otherwise or used for oy commercial purpose what so ever without the prior written permission of the publisher and the principal author. Typeset: Mostly personally by Dr. Amjad Ali (Principal Author), also contributed by the co-authors, iziralmasqat@ gmail.com) Illustrations Composing: Nazir Ahmad (nai com) Title Design: Muhammad Rizwan Qadeer (mrizwangadeer@em Teer Publishers Distribution Point: 238-B (PRIDE), Near Girls Comprehensiv Cell Phone: 0348-6981925
[email protected]
e School, Gulgasht Colony, Multan, Pakistan. timerenderp! Scand ith Camsoannepreface «simplified Numerical Analysis 1” is an outcome of several years of relevant teaching and writing efforts. The main intension in writing this book is to make value-addition for our students through an easy approach. It has been authored with very specific objectives in mind, which are around the goal that our students should be uplifted and their learning of the subject should properly be aligned with the spirit of such a powerful and impactful subject of science and engineering, This text is designed to help the students to adopt such a style and approach of learning that can help them to achieve the true understanding. The relevant challenges have been addressed through a number of strategic portrayals. The question sentences have been inserted under the section/subsection headings (before the topical discussion) to emphasize what specific points or concerns a particular topic focuses. This approach might also be very useful in satisfying the concern of our students to be specific and definite about the exam questions and getting impression of being secure about exam performance. The topics of the book are relevant to the different courses with different objectives (being relevant for a variety of undergraduate programmers). Therefore, almost each of the chapters is made to comprise three parts: Discusses about the basic concepts MoTIF: Corridor! BASICS and methods of the chapter and is | needed by everyone Let’s plan it Discusses about some analysis and | further insight into the topics and is | | supposed to be focused by the mone: | Corridor I ANALYSIS | students of Numerical Analysis, | perhaps not by the students of Let’s think deep | Numerical Methods or Numerical Computing like courses | / PROGRAMMING | {ais about viewing the numerical MOTE: Corridor tl ercape. | methods as workable recipes and : programming them for the computers Let’s do it The readers can pin-point the topics/questions from the three portions/corridors accordiny to the course requirements or according to the personal need. Scand ith CamsoanneJuctance in getting benefits of the numerical frequently feel a serious rel ret ae tee hr progiaimalog these for the computers and hence face difficulty in sees ie eaesiparang needs of the subject. The Corridor II! purposefully focuses on essin eliminating the misconceptions, and bridging the gap of understanding through training. The patterns of the topical descriptions and working out of the numeric Problems in this text are designed to facilitate the instructor to focus most of the time on explaining the soit and concept of the topics rather than reproducing the material on the board or performing the numeric calculations during the lecture. It may also be noted that the description or working- out under any question or problem is made to be self-complete so that whatever assumption is needed to be made or whatever equation is needed to be referred is already present there as a part of the discussion. Further, the equation numbering under any question or problem has been made to start from “1” to give a feel to the students as their own self-study notes. 'highly acknowledge the guidance and encouragement of my teacher and PhD supervisor Dr. Khalid Saifullah Syed about the relevant topics. | am also thankful to Mr. Ahmad Hassan (BZU, Multan), Dr. Zaheer Abbas (IUB, Bahawalpur), Dr. Muhammad Ishaq (coMsaTs University, Vehari Campus), Dr. Fiza Zafar (BZU, Multan), and Ms. Saima Rana (B2U, Multan) for time to time discussions on the relevant topics. | congratulate and thank my students Aniga Faizan, Amna Waheed, Sanam Shehzadi and Muhammad Sajawal Naeem for supporting me in typing some part of the manuscript. | say thanks to the classes of BS Mathematics (Session: 2015-2019, Evening), MSc Mathematics (Session: 2017-2019, team lead: Syeda Amna Batool) at CASPAM, BZU for helping me out in detecting typing/numeric mistakes. | cannot forget to say thanks to my NA course teacher Prof. Dr. Azad Akhter Siddqui (during my MS, back in 2002) at NUST whose style made me to believe that Mathematics can be spoken fluently in the form of simple ideas, rather than just written symbolically. | am also thankful to all of my colleagues at CASPAM, BZU for their scholastic companionship. My gratitude is due for my lovely Father and my friend Engr. Afzal Ahmad Khan for persistent encouragement and pushing me forward. Engr Afzal Ahmad Khan not only played a role as a mentor, but also arranged assistance for the publication Process. Thanks to all my near-and-dear ones for their Prayers, support, encouragement and compromises due to my involvement in the write-up. | also acknowledge and appreciate the efforts of the following contributions by our National authors: * Saeed Akhter Bhatti, Naeem Akhtar Bhatti, “A First Course in Numerical Analysis with C+”, A-ONE Publishers, Lahore. Scand ith Camsoanneil « Faiz Anmad, Muhammad Afzal Rana, “Element: Foundation, Islamabad. s of Numerical Analysis”, National Book « Muhammad Iqbal, “An Introduction to Numerical Analysis”, limi Kitab khana, Lahore « Amjad Pervez, “An Introduction to Numerical Analysis”, A.H. Publishers, Urdu Bazar, Lahore. | have not only been benefitted by these contributions but these books also set benchmarks for me to start with. 1 would like to develop a liaison with the community of Numerical Analysis so that | can better understand the contemporary needs of the community and try to address those in my text. The errata and the softcopies of C++ or MATLAB programs can be asked through the email (although soon they will be uploaded on the webpage of the book). Finally, it’s my humble request to all the relevant readers to assist me through guidance and suggestions for improving this text so as to make it a national monumental contribution in the field. | pose the following pertinent question in this regard to the course instructors and request that a comprehensive reply may kindly be sent. Question: “What short-comings are there, which prohibit this book to be declared as the recommended book of Numerical Analysis/Methods | in the universities”? Dr. Amjad Ali (Principal Author)
[email protected]
15-Apr-2018 Scand ith CamsoanneTable of Contents Chapter 1: Preliminary Concepts in Numerical Analysis 1.1 Introduction. 1.2 Number ‘Systems ar 1.3 Round-off Error 14 Truncation Error.. Chapter Summary Chapter Excercises Representations... Chapter 2: Solution of a Nonlinear Equation in One Variable 2.1 Introduction 2.2 Bracketing Method . 2.2.1 The Bisection Method (or Bolzano Method)... 2.2.2 | The False-Position Method (or Regula-Falsi Method). 2.3 Open Methods : 2.3.1 The Fixed-Point Iteration Method... 2.3.2 The Newton-Raphson Method 2.3.3. The Secant Method 2.4 Stopping Criteria and Convergence Rate .. Genes. Corridor I: ANALYSIS 2.5 Convergence Analysis The Bisection Method The Regula-Falsi Method The Secant Method .... The Newton-Raphson Method. The Fixed-Point Iteration Method. 2.6 Further Discussions... Bears Corridor Ill: PROGRAMMING ARCADE 2.7. Algorithms and Implementations .. The Newton-Raphson Method. The Fixed-Point Iteration Method.. The Secant Method The Bisection Metho« The Regula-Falsi Method Built-in MATLAB Commands Chapter Summary .. Chapter Excercises .. Scand ith CamsoanneChapter 3: Polynomial Interpolation I 3.1 _ Introduction. 3.2. Newton's Divided erence Interpoation 3.3. Lagrange Interpolation 3.4 Error of Interpolation... 3.5 Deriving the Lagrange Interpolation Formula from the Newton's Divided- Difference Formula.211 3.6 _ Interpolation Formulas for Equally Spaced Nodes 24 E Corridor Ill: PROGRAMMING ARCADE 3.7 Algorithms and implementations.... Built-in MATLAB Commands... Chapter Summary .. Chapter Excercises .. Chapter 4: Numerical Integration I a Corridor: 4.1 Introduction 4.2. The Trapezoidal Rule . 43. The Simpson's 1/3 Rule 4.4 Generalized Closed Newton-Cotes Quadrature .. Corridor I: ANALYSIS 4.5 Truncation Error of the Trapezoidal Rule .... 4.6 Truncation Error of the Simpson's 1/3 Rule 4.7 Further Discussions .. I: BASICS Corridor Il; PROGRAMMING ARCADE. 4,8 Algorithms and implementations... . The Composite Trapezoidal Rule.. The Composite Simpson’s 1/3 Rule The Composite Simpson’s 3/8 Rule Built-in MATLAB Commands Chapter Summary ... Chapter Excercises .. Chapter 5: Numerical Differentiation I 5.1 _ Introductiot 5.2 Finite Difference Approximations of Derivatives using the Taylor Series.. 5.2.1 First Order Derivatives .. 5.2.2 Second Order Derivatives 5,3 _ Listing of the Derivative Formulas Scand ith CamsoanneChapter 6: Direct Linear Solvers I 6.1 _ Introduction to Linear System: 6.2 Solution of Linear Systems 6.3 Pivoting Strategies 6.4 The Gauss-Jordan Method. 6.5 Solution of Linear Systems using the LU Factorization Method . 6.5.1 The Doolittle’s Method....... 65.2 The Crout’s Method... 6.5.3 The Cholesky’s Method acs 66 Operation Count Analysis 6.7 Matrix Inversion. ans 7 68 Algorithms and Implementations .. The Guassian Elimination Method with Partial ivoting Solving AX = B using the Do-little's Method Solving AX = B using the Crout's Method .. Solving AX = B using the Cholesky's Method Performing Operation Count Analysis Built-in MATLAB Commands Chapter Summary ... Chapter Excercises .. the Gaussian Elimination Chapter 7: Iterative Linear Solvers I Corridor I: BASICS 7.1 Basic Method! 7.1.1 The Jacobi Method 7.1.2 The Gauss-Seidel Method 7.1.3 The SOR Method... 7.2. Vector Norms and Distance: 7.3. Convergence Criteria .. Corridor I: ANALYSIS. 7.4 Matrix Norms and Conditioning 7.5 Iteration Matrix and Matrix Form of a Solver Corridor I: PROGRAMMING ARCADE 7.6 Algorithms and Implementations. Chapter Summary Chapter Excercises Scand ith CamsoanneChapter 8: Eigenvalues and Eigenvectors I 8.1 Basic Definitions and Concepts. 8.2. General Approach of Finding 83 Power Method of Finding the Largest Eigenvalue. 8.4 Discussion on the Power Method 8.5 Algorithm and Implementation Chapter Summary Chapter Excercises Bibliography .. Scanned by Asad Ali Scand ith CamsoanneChapter 1 Preliminary Concepts in Numerical Analysis 1.1 Introduction Question 01: What is the spirit of numerical analysis? The methods to solve the mathematical problems can be categorized in two board approaches. One category has the analytic or exact methods, which obtain the exact solution of the problem. The second category has the so-called numerical methods which produce numbers that approximately represent the solution of the problem. In simple words, the numerical methods obtain some approximate solution of the problems, usually in the numeric form. The category of the exact methods is very limited in regard to the real-world problems. Therefore, the numerical methods have to play major role in providing the some reasonable solution of the problems of practical interest in all branches of science and engineering. Numerical Analysis is the field of deriving/devising, analyzing and implementing the numerical methods. The most common approach followed by the numerical methods is the iterative approach. According to which, choose an initial approximation or guess to the solution and apply a set of simple computational steps to obtain a better approximation. Repeatedly apply the same set of steps to the better approximations, ultimately obtaining a sufficiently accurate solution and then stop the repetition. Each course of repetition of the set of computational steps is called iteration. The specialty of this approach is that the set of computational steps to be applied repeatedly can easily be programmed for execution on the computers. Therefore, even if a large number of iterations are required to refine the solution to achieve a sufficient level of accuracy, the computers are there to perform the labour work efficiently. As the solution obtained by a numerical method is an approximation to the exact solution, hence ithas some error. The error can be defined as the gap between the approximate solution and the exact solution. Scand ith CamsoannePreliminary Concepts in Numerical Analysis 2 ean ‘Question’ 02: Whats the scientific computing? ef eee inputitig? And how the jndinleHeal analysis iSrelated to the problems in scence ud coghering according to this approzc; the cesl werldprotem is Ba , proach, the real world problem is first converted to a suitable mathematical form, which is then numerically solved on computer (possibly using high performance or parallel computing on a supercomputing/parallel machine), ‘The solution is then interpreted (usually through the use of graphing software) and implemented in the relevant field. Scientific computing enables to reduce the need of physical experiments, thus saving costs and expanding insights. Note that a scientific computing activity involves roles on (@ field of application, (éi) numerical mathematics, and (iii) computer. Thus, the rumertcal analysis may be regarded as the “mathematics of scientific computing”. ‘The scientific computing is playing role for research and development in every filed of science and engineering, The main factors for the ever increasing role of scientific computing include: * continuous development of advanced computing infrastructures (hardware and software), * steep decline in computing cost, and continuous development of efficient numerical algorithms. Question 03: What are the approaches for quantification ofthe error in approximations? Let xq represent an approximation to a certain quantity whose true (or exact) value is x,. The gap between these two quantities is the error. error is the absolute error. It is absolute value of the The very first approach to quantify the ximate values. If E, denotes the absolute error then, difference between the true and the appro» [True value ~ Approximate value| Absolute Error or E, = (|x7*al lative error. It is ratio of absolute error to the ach to quantify the error is the re ‘Another appro If E, denotes the relative error then, magnitude of the true value. apsolute error _ [True value — Approximate value| ; _ absolute error _ Relative Error = “True valuel True valuel or Scand ith Camsoanne3 : Simplified Numerical Analysis 1 bee = Ey Ixel The relative error shows how much is the absolute error in the approximation, relative to the true value, It can also be represented as how much percent the absolute error is there relative to the true value. That is, Percentage Relative ror = 2bSoluteerror ag [True value] or xt — x g = Ml x 100% xel . Remarks: 1) The absolute error measures the error in terms of the same unit as the unit of quantities. For example, if the units of the exact and approximate values are meters, centimeter, or kilogram, etc, the unit of the absolute error will be meter, centimeter, or kilogram, etc. The relative error is defined in the form of ratio and is independent of the units of measurement. It is useful in making comparison of the error of two different quantities. 2) The relative error is undefined in case when the exact value is zero; that is, the term E is undefined when x; = 3) In case, when the exact value is unknown and the some iterative approach is use to generates a sequence {x}, of approximations to the exact value, the error is often estimated as the difference between the previous and current approximations. The current approximation is considered as the true value and the previous approximation is considered as the approximate value. Thus, the absolute and relative errors at (k + 1)th iteration is defined as follows: Absolute Error [current Approximation — Previous Approximate] ie B= [atte x Rel |Current Approximation ~ Previous Approximate| lative Error = [Current Approximation] ie, xt) — x®| B= ce Scand ith CamsoannePreliminary Concepts in Numerical Analysis 4) The relative error might sometime be more meaningful than the absolute error in quantifying the error. For example, consider a true value of 100 is approximated by 90 and therefore the absolute error is 10. Consider, another true value of 1000 is approximated by 999 ang therefor the absolute error is 10. It appears that the absolute errors in both the situations are i jg 100790 the same. However, note that the relative error is [> -1 = 10% in the first case ang 1000-990 Joo = 0-01 = 1% in the second case. Thus, it is the relative error which elaborated that the error in the first case is much severe as compared to the error in the second case, Problem 0: ‘uppose that you have the task of measuring the lengths of a bridge and a'rivebad come up with 9999 cm and 9 cm, respectively. If the true values are 10,000 cm and 10 em, respectively, then compute absolute error, relative error, and percent relative error, Solution: Absolue error in length ofabridge = |10,000cm-9999em| = 1cm Absolute error in length ofarivet = |10cm—9cm| = tem _. _ [10,000 em ~ 9999 cm| Relative error inlength of bridge = TET = o.oo 1 ink ian [tem —9em) 4 Relative error inlength of arivet = TTS . [10,000 cm ~ 9999 cm| i Soaaeem = 001% Percent error in length of a bridge To god emt % 100% [10 cm —9 em] Percent error in length ofarivet = POC 9CM ioo4, = 100% Ti0 emi . Question 04: What are sources/types of errors in approximations? 3 ‘The errors can be categorized in three major categories in regard to their sources: 4. Inherent Error (quite unrelated to the numerical methods) «* Human mistakes/blunders in measurements © Modeling errors due to simplification assumptions © Data uncertainty Scand ith CamsoanneSimplified Numerical Analysis 1 2. Round-off Error (undesired but have to be made) * Occurs due to approximation of numbers as a computer cannot represent certain numbers exactly due to its limitation of ability with respect to size and precision. * Occurs due to approximation of numbers to limit the level of precision (Le, not using the decimal digits after a certain place) * Occurs in certain mathematical manipulations that are highly sensitive to the round-off error. 3. Truncation Error (truly mathematical error, made intentionally to avoid insignificance) * Occurs due to approximation of an exact mathematical procedure, e.g. ignoring terms from the Taylor/infinite series expansions of trigonometric or exponential functions. . Remark: The truncation error is truly the mathematical error. However, it is common to formally study or analyze the round-off error and truncation error for the numerical methods. Remark: The round-off error performed for one instance of approximating a number is regarded as local round-off error. However, for all the numerical computations of a method/algorithm, the approximations of numbers are performed a very large number of times. The numerical scientists are often interesting in the collective effect of all the instances of number approximations. That is referred to as global rounding-off error. Similar description of local and global error might be made for the truncation error. Question 05: What are the scientific and normalized scientific notations of representing real number? %: A real number (in decimal form) has an integer part, a fractional part, and a decimal point between the integer and fractional parts. A scientific notation is a representation of a real number in a standard way. It can be obtained by shifting the decimal point to left or right such that it has only one non-zero digit to the left of decimal point and the figure is multiplied by 10 with an appropriate integer value of the exponent. For example, each of the real numbers 0.0001057, 65.46473, and 3,100,000 has an alternative representation in scientific notation as 0.000157 = 1.057 x 10-* 65.46473 = 6.546473 x 10 3,100,000 = 3.1 10° ‘Scand ith CamSoannePreliminary Concepts in Numerical Analysis Another standard form called normalized scientific notation, which is more relevant in the context of computer representation, is obtained by shifting the decimal point in such a way that the integer part is zero, the leading digit in the fractional part is nonzero, and the exponent of 19 is set accordingly. Thus, each of the preceding example numbers has an alternative representation in normalized scientific notation as 0.000157 = 0.1057 x 10° 65.46473 0.6546473 x 107 3,100,000 = 0.31x 107 Question 06: What are the significant figures (or significant digits) of an approximate number? Significant figures of a real number (which is an approximation of a true value) are the digits that are used to express the number meaningfully. The significant digits begin with the leftmost nonzero digit and ends with the rightmost correct digit. The right most zeros which are exact are also significant. Note that all the non-zero digits (1,2,3,--.9) are considered significant. Zeroes appearing anywhere between two non-zero digits are significant eg,, in 3005.00102 there are 9 significant digits. Leading zeros (left to the first non-zero digit) are not significant, e.g,, the number 0.000081 has two significant digits only, namely 8 and 1. The leading zeros are used just to fix the decimal place. Trailing zeroes are significant if they are exact with regard to some true value. The significant figures of a number can easily be pursued by using its normalized floating-point form. The digits in the mantissa are regarded as significant figures. For example, the number 42.134, 6.0013, and 0.0015784 all have five significant figures, It can be obtained by converting these numbers in normalized floating-point form as: 42.134 = 0.42134 x 10? 6.0013 = 0.60013 x 10 0.0015784 = 0.15784 x 10-3 ) . Remark: An approximation x* to a number x is called accurate to ¢ significant figures if there are exactly t digits in the mantissa of x° that agreed with the first ¢ digits of the mantissa of x having the same exponent or characteristics. That is, if the number x is represented in the following form x = £0.dydgdy-dydeyy 10 ‘Then, the number x* is accurate to ¢ significant figures to the numb: following form x = £0.didedy ~~ dedigs +X 10° er x if it can be written in the Scand ith CamsoanneSimplified Numerical Analysis 1 ‘Question 07: Explain the difference between precision and accuracy. eRe Accuracy of an approximate value is a measure how much the approximate value agrees with the true value, If an approximate value is accurate to n decimal places then this means that n digits to the right of the decimal point are trustworthy. If an approximate value is accurate to n significant digits then this means that a total of n significant digits are trustworthy (definitely, the digits beginning with the leftmost non-zero digit). Precision on the other hand has nothing to do with how much the approximate value agrees with the true value. Precision is only concerned about the size of the number. A value of 7.81235 is more precise than the value 7.812. on 1.2 Number Systems and Representations Question 08: What are the commonly used number systems? ‘A number system offers a specific set of symbols to represent numbers or quantities. The number of symbols offered by a number system is called the base of the system. These symbols are sometimes referred to as digits. Usually the digits of a number system with base (say) f are 0,1,2,-,8 — 1. For example, the decimal system has the base 10 with ten digits 0,1,2,-,9 to represent the numbers. Ina positional number system with the base B, a number x can be represented as: Cp = andy do.d-1d-2 (p= bn XP" + dna X fh + om + dy x B° + dyxPt + dgxB? +o ~ + dinxpm™ where the symbol ff indicate the base in which the number x is written and each d; is a digit of the number system. ‘The following four are the commonly used number systems, even supported by the computer architectures. 1) Decimal number system 2) Binary number system 3) Octal number system 4) Hexadecimal number system Scand ith CamsoannePreliminary Concepts in Numerical Analysis 8 system is the most widely decimal system is repres: is the base-10 number system. In everyday life the decimal number 'y used system to represent the numbers or quantities. Any number in ented by the combination of some of the ten digits 0,1,2,3,4, 5,6,7,8,9 with appropriate power of 10 specifying the manganite. For instance, the successive Positions to the left of the decimal point represent units, tens, hundreds, thousands and so on. The decimal Integer number 6546 in positional notation is a polynomial in the base 10, given as follows: (6546)i9 = 6x10? +5x 10? +4x10' +6 x 10° Similarly, a fractional decimal number 0.4731 in positional notation is a polynomial in 10-* as follows: (0.4731), = 4x107°+7x10-% 43x 10-41% 107 Thus, the decimal number 6546.4731 has the following positional notation representation as a sum of the above two notations: (6546.4731), = 6x10°+5x10?+4x10'+6x 10° +4x 107° +7x 1077 +3x 10% +1x 10% In general, the decimal number x = dydy-1**do.d_,d_, "dm has the following positional notation representation in base-10 number system: Cro = dy X10" + dyy x10"? + = + dx 10° + dX? + dX? +o + dig X10 i umbs is the base-2 number system. The numbers at the lowest level in ina bi -2 number system. Any number in a binary system is are represented in a binary or base-2 num! n represented b the combination of two symbols: 0 and 1, called bits with appropriate power of 2 specifying the magnitude ‘A binary number 1011 in positional notation is a polynomial in the specit base-2 number system given as follows: (1011). = 1x 2340x227 41x2°41x2° 8 +0 +2 +1 Do + 1011 is equivalent to the decimal number 11, Similarly, tional notation is a polynomial in 2~* given as follows: a fractional i mbe Thus, the binary mu D binary number 0.1101 in posi - 4 ax 2b+1x27+0x2 341% 2 1 1.1 tater (0.1101)2 = " 13 _ (0.8125),0 16 W Scand ith Camsoanne9 Simplified Numerical Analysis Thus, the fractional binary number 0.1101 is equivalent to the decimal number 0.8125. As a consequence, the binary number (11011.1101), is equivalent to the decimal number (21.8125),0. /-m has the following positional In general, the binary number x = dydy-1 Lid notation representation in base-2 number system: G2 = dyX 2" + dyyX2™2 $m # dy X29 + dyx2? + dgx2? + - + dimx2™ and Hexadecimal r are base-8 and base-16 number systems, respectively. A number in an octal system is represented by the combination of eight symbols: 0, 1, 2, 3, 4, 5,6, 7. Anumber ina hexadecimal is presented by the combination of sixteen symbols: 0, 1, 2, 3,4, 5,67, 8,9,4, B,C, D, E, F. An octal number 151.714 in positional notation is given as follows: (151.714) 1X82 45x41 894 7XS +1 XSF 44x BE 64 + 40+1 + 0.875 + 0.015625 + 0.0078125 (105.8984375)10 ‘Thus, the octal number (151.714). is equivalent to the decimal number (105.8984375),0- umber from any number system can be converted to another number system. It is jon but its conversion to another system Remark: possible that a number in one system has a finite express has an infinite expression. Question 09! What are the fixed-point and floating-point representations of a real number? in general, has finite or infinite sequence of digits in the fractional part. In table only with a finite number of digits after the decimal umbers, called fixed-point and floating-point Every real number, practice, the numbers are represent point. There are two ways of representing real n representations. presentation, the numbers are given with a fixed number of digits after the decimal point. For example, 64.4647, 0.0143, and 2.0000 are some the numbers inthe fixed-point form with 4 digits after decimal point, Fixed-point representation is almost impractical due to its very limited range of possible representations within the given number of places to store the digits of the numbers. In the fixed-point re tions offer a much larger set of numbers that can be stored within the Floating-point representa In the floating-point representation, the numbers are given in the given number of places. Scand ith CamsoannePreliminary Concepts in Numerical Analysis 19 normalized scientific notation. For instance, any nonzero real decimal number x in floating-point form can be represented as x = £0.d,dyd3-- x 10° Here dj,i = 1,2,-- are digits from 0 to 9 with d, + 0, called most significant digit and e is an integer that might be positive, negative or zero, called an exponent or characteristic. The number 0.d;d,d3--, may be denoted by m, is called the finite normalized mantissa. For numbers in decimal system with base 10,4
5, so the floating-point form of the number x using four significant digit rounding is 0.1189 x 102, The absolute round-off error of rounding the number is |0.11888888 -~ ~ 0.1189] x 10? = 0.0012, Scand ith Camsoanne15 Simplified Numerical Analysis I The floating-point form of the number x using four significant digit chopping is 0.1188 x 10. The absolute round-off error of chopping the number is |0.11888888 --- — 0.1188] x 10? = 0.0088, (6) The normalized floating-point form of the number x = 3/142 is given as x = 002112676. = 0,2112676-- x 107? The fifth digit of the mantissa m = 0.2112676~- is 6 >, so the floating-point form of the number x using four significant digit rounding is 0.2113 x 10-1. The absolute round-off error of rounding the number is |0.2112676--. — 0.2113] x 10-? = 0.000003. The floating-point form of the number x using four significant digit chopping is 0.2112 x 10-*. The absolute round-off error of chopping the number is |0.2112676-- — 0.2112] x 10-* = 0.000006. (c) The normalized floating-point form of the number x = In(2) is given as x = 069314718. = 0.69314718-- x 10° The fifth digit of the mantissa m = 0,69314718-» is 4<5, so the floating-point form of the number x using four significant digit rounding is 0.6931 x 10°. The absolute round-off error of rounding the number is |0.69314718 --- — 0.6931| x 10° = 0.00004718. The floating-point form of the number x using four significant digit chopping is 0.6931 x 10°. The absolute round-off error of chopping the number is |0.69314718 -- — 0.6931] = 0.00004718. . Question 13! Explain the IEEE Binary Floating Point Arithmetic Standard 754-1985 for representing the real numbers in computers? ‘The IEEE (Institute for Electrical and Electronic Engineers) published Binary Floating Point Arithmetic Standard 754-1985 (later on updated in 2008) for representation of binary and decimal floating point numbers. IEEE 754 standard for single precision floating point representation: A binary real number x = £0.bybzb, ~» x 2° is assumed to be in the form: (1=2s) x 2-7 x (1+ f) 32 bits (one word of computer memory) are reserved for storing a real number. Out of the 32 bits, 1,8 and 23 bits are reserved from left to right for s, c and f, respectively. The symbol s is used for the sign of the number (s = 0 represents the + sign whereas s = 1 represents the — sign), The value c in the exponent is called the biased exponent. Therefore, 0
1, 1 3 24-0)/2=12, 0 3 2(L75-1)=15>1, 4 7 12-0)/2=6, 0 bs Z 5 6-0)/2=3, 1 5 6 %=G-D)/2=14 1 Thus (98):9 = (1100010), and (0.4375)y9 = (0.0111)2. Therefore, —(98.4375);9 = —(1100010.0111)2 —(1.1000100111)2 x 2° (@=2 1) x (11000100111), 2° For single precision case, soi c-(127)10 = @10 = c= (133)19 = (10000101), 1+f = 11000100111 = f =0.1000100111 The floating point representation obtained is as follows: [a 1}olojolajofjojajajijo 0 For double precision case, s=1 = (1023)0 = (610 = ¢ = (1029), = (10000000101), 1+f =1.1000100111 = f =0.1000100111 ‘Scand ith CamSoannePreliminary Concepts in Numerical Analysis 20 The floating point representation obtained is as follows: Question 14: Find a bound for the relative error when a nmsabihappecehnetes seeneeeneet to t significant figures, accurately. oe Let a number x* approximates a number x to the ¢ significant digits. Further suppose that the floating-point forms of x and x" are given as follows: " x £0. dydydy--dedegy X10 = tmx 10° x £0. djdydi didi, 10° = tm’ x 10° ‘The absolute error is given as follows: E, = |x-x'l (40. dydgdly dee yy % 10°) — (LO. dj day ~-didigs ~ % 10] lO. dydgdy = dydygy 10° — 0.dj yds didi 10°1 = [0.dydads-dedess . ddd dedzy | X10" Since x* approximate x accurately to ¢ significant digits, therefore, the first ¢ digits in m’ agree with the first ¢ digits of m. Thatis, wy di = de Thus, E, = |0-dd2ds dds ~~ de| x 10° 10.dega — O-diaa “1 10* x 10° | x 10° [O.degy-— O-dtes ce, the mantissa (0. dey — Oden) 1S bounded above by 1, that is, 10.des1°"— oer v-| € 1. Therefore, the bound for the absolute erroris: E, < 10°" ‘The relative error is given a5 follows: Ea E = il Scand ith Camsoanne21 Simplified Numerical Analysis 1 se [EO dydods + dedeys + X 10°] 10 TO. dydad3-+dedess | Since d, # 0, therefore, the minimal value of the denominator is 0.1. Thatis, l0.didadg-dedear| = 0.1 = — 1 —_ «4-0 J0.djd,dy- ede] ~ OL Thus, the bound for the relative error is: E, < 10** ‘This error bound is also referred to as a bound for the relative error when a number is chopping to the ¢ digits, In this case, the number x" has the following form: xt = £0.dydody~-d, x 10° Question 15: Find a bound for the relative error when a number is tounded to the nearest machine number. Consider a nonzero real number x in normalized floating point form: x = O.dydydy 10° Ifthe ¢ digits and rounding are used for the machine representation of x, then FUCK) = O.dydydy + de_z7 X 10° Thus, the floating-point representation f(x) of x has the relative round-off error as below: [x= fL@)I Ixl 10. dydads -- x 10° ~ 0.ddody -de_% X 10°| 10.didods + dedeyy ++ x 10°] [O.dydady = O.dydads ~~ dyed 10. dydad3 ~~ dedesy "| ‘Scand ith CamSoannePreliminary Concepts in Numerical Analysis 22 There arise two cases: Case I: Ifdiy, 25, then r;=d,+1 and the difference [m,.0 —dy-deyi | is bounded in interval (0.0.5). Case Il: Ifdey;<5, then 7; =d, and the difference |7.0—de.dey1-“| is bounded in interval (0, 0.5). In both the cases, the difference |r,.0 — dy.de41-~*| is bounded above by 0.5. As a consequence, the numerator is bounded above by 0.5 x 107!. Thats, 10.dedeys =—O.rel 1O.r¢ —O.dedeya +1 = IO — dy. des | X10 < 05x10 Also, it is given that d, # 0, therefore, the minimal value of the denominator is 0.1. That is, lO.dydzdyededeyy | 2 0.1 1 au 7 dear | ‘Thus, a bound for relative error when using ¢ digits rounding arithmetic is p= Woden tie agree 10.d,dod3 ~~ dedess < 05x 107? x 10 x 10? = 05x10" = & < 5x10 Remarks: (1) If a number x is accurate to ¢ significant figures in approximating a number x then the relative error is bounded above by 5 x 10~*, Thats, k=*"l < sx10+ lel Scand ith Camsoanne23 Simplified Numerical Analysis 1 (2) Ifan iterative process is to be stopped when the successive approximations becomes accurate to t significant figures, the relative error bound might be set as 5 x 10~*. Thus, the relative error is computed after every iteration using the result of the current iteration and that of the previous iteration, If the relative error is smaller than the bound of 5 x 10", then it ensures that the approximation the accurate to ¢ significant digits. Question 46: How the computer makes round-off error in representing the real numbers in 32- bits (single precision)? Consider a positive real number x in normalized floating point form: x=mx2*, where 5
Sm <1 ‘The numbers that are representable precisely ina computer are called machine numbers. The real numbers with non-terminating fractional part (such as 1/3) cannot be represented, precisely. So many “other numbers (for example, 0.01) also has not a precise representation in computer (1, a machine number). Ifthe number lies within the allowable range of the possible numbers according to the precision level of the computer, then itis rounded to a nearby machine number (incurring the round-off error) for storing it The rounding options involve correct rounding (round to nearest machine number), rounding up, rounding down or towards zero etc. ‘There are commonly two way’ to terminate the mantissa of a number to obtain its nearest machine number, namely, correct chopping and correct rounding. The chopping or rounding of the number to the nearest machine number (representable in a computer) for representation in computers (for storage or for using in computations) causes the error in number called round-off error. ‘The floating-point form of a number x representable in a computer can be regarded as consisting of the three parts: x = tmxpt = sign mantissa x (base)"m"t Scand th CamsoannePreliminary Concepts in Numerical Analysis 32 ‘The sign is either positive (+) or negative (~), the finite normalized mantissa is from the interval E 1), and the integer exponent either positive, negative, or zero as a power of the base. ‘An account on the IEEE Binary Floating Point Arithmetic Standard 754-1985 for representing the real numbers in computers can be found under Question 13 in this chapter. fa number x" is accurate tot significant figures in approximating a number x then the relative error is bounded above by 5 x 10~*. Thatis, Ie=z'l Ixl < 5x10 If an iterative process is to be stopped when the successive approximations becomes accurate to t significant figures, the relative error bound might be set as 5 x 10-f. Thus, the relative error is computed after every iteration using the result of the current iteration and that of the previous eration. If the relative error is smaller than the bound of Sx 10~t, then it ensures that the approximation the accurate to ¢ significant digits. ted, some loss of significance might occur. The risk of Whenever two nearly equal numbers are subtract Joss of significance can be eliminated by avoiding the subtraction through some mathematical manipulation. Scand ith Camsoanne33. Simplified Numerical Analysis I Exercise 01: Compute the absolute error £, and relative error E, in approximation of x by x* (a) x= 17/6,x" = 2.8333 0.36787 (@ x= logy 2,x* = 0.301 Wi) x= Vmx" = 1.77245 (wv) x Exercise 02: If the number x" approximate the number x with absolute error not greater than 10~*, find the largest interval, for each value of x, in which x* must lie to approximate x. @ x=In2 @) x=7 (i) x =tan(? (iv) x2 @ x5 Exercise 03: If the number x" approximate the number x with relative error not greater than 10°, find the largest interval, for each value of x, in which x* must lie to approximate x. 1 2 wo @ «x (i) x= 199 Exercise 04: Write the following numbers in floating-point form and identify their mantissa and exponent: @ x= —23.500128 (ii) x = 658.000012 (iit) x = 0.010023 () x= —0.0000782 © xg (wi) x= 541000 Exercise 05: Simplify the following expression by performing the computations (@) Exactly (b) Using four-digit chopping arithmetic Scand ith CamsoannePreliminary Concepts in Numerical Analysis 34 ()_ Using four-digit rounding arithmetic (@) Compute the relative errors o 1-4 « wo 7 (iv) 10-20 +1 3 o Ca) w (-G) Exercise 06: Calculate the round off error if chopping and rounding is used to write the following numbers accurate to four decimal digits: @ 355/113 @ 37 Git) Vin Exercise 07: Find the absolute and relative errors involved in rounding 4.9997 to 5.000. Exercise 08: Suppose a real number x is represented approximately by 0.6032 with the relative error is at most 0.1%. What is x? Exercise 09: Suppose that a number is accurate to m significant figures and ay is the first significant figure than show that the relative error is bounded above by2 x 10!" Exercise 10: Show that if number is rounded off to n digits than the relative error is bounded by 2 x 10° 2 Scand ith CamsoanneOrdat. _ Cemetieme, Je.) = teat’ (Rate A convergence) ThA ib the Sendak Adabionshilp blu Huecesive ervor which Gives us the ordee Cawetjence 0.” s Net Chapter Solution of a Nonlinear Equation in One Variable Corridor I: BASICS 2.1 Introduction Question 01: What is the problem of solving a non-linear equation numerically? # Itis quite a basic problem, frequently encountered in engineering applications, to solve a non-linear equation of the form f(x) = 0. * This problem refers to find some appropriate value x =a in the domain of f such that f(a) = 0. Every such possible value a is called a root of the equation f(x) = 0. Thus the problem is also referred to as root finding problem. A root of f(x) = 0 is also called a zero of the function f. The zero of the function f(x) may also be called as the root of f(x). * Geometrically, a root of an equation f(x) = 0 is the point where the graph of f(x) intersects the x-axis. In Fig. (2.1), three different functions have been plotted, showing in each of the cases that the graph of the function f(x) intersects the x-axis at a point where root of the equation f(x) = Ois located. ‘© If (0) is a polynomial of degree up to 3, then formulas exist to find the exact solutions of F(x) = 0, otherwise no analytical method (or exact method) exists to find the exact solution. However, a variety of numerical methods have been developed to obtain approximate solution of f(x) = Oto an arbitrarily high accuracy. Scand ith Camsoanne36 ani Simplified Numerical Analysis Ser Fig. (2.1): Linear, quadratic and cubic polynomials having one, two and three roots, respectively at the | points of intersection with the x-axis. Question 02: What are the well-known types of the equations f(x) = 0? The type of an equation f(x) =0 corresponds to the generic type of the function f(x). A classification chart of the major types of f(x) is given in Fig. (2.2). Some specific examples of different types of function are: © f@)=4x43 (Polynomial of degree 1) © fe) =x? 4+5x-1 (Polynomial of degree 2) © f@)=x-4x-5 (Polynomial of degree 3) © fx) = 2x7 +5x6—2x4—x (Polynomial of degree 7) © fe)=xt+3x-1 (Algebraic Non-Polynomial - fraction power) (Algebraic Non-Polynomial - negative power) oe f@axttre © f(x) =cosx? (Transcendental function: Trigonometric) © f(x) = logx (Transcendental function: Logarithmic) of) =4e7* (Transcendental function: Exponential) © f(x) = cosh) (Transcendental function: Inverse hyperbolic) % (Transcendental function) © fx) =4x+sinx f(x) = cosx — x8" (Transcendental function) © fxy=in@) +x-4 (Transcendental function) Scand ith CamsoanneSolution of a Nonlinear Equation in One Variable Non Polynomials . [Hyperbolic and| : ‘Inve Fig, (2.2): Classification chart of some major types of the function (2). ct root only for the polynomials of degree Note that there exist analytical methods for finding exa nscendental functions, which are up to 3. There are no exact methods for other algebraic and tra ali non-linear functions. Thus the numerical methods come into play as the tools for solving the squation f(#) = 0, and are usually called as methods for solving non-linear equations or methods for finding roots of the equations. (iestiGin 037 What isthe philosophy of iterative methods to find the solution of f(x) = 0? ‘The numerical methods to approximate the root of /(x) = 0 are iterative in nature. To start the iterative process, some appropriate or reasonable estimation (also called inttial approximation or guess) of the exact solution is required. The iterative method processes on the provided guess of the root according to a specified finite set of ordered steps to obtain a better approximation of the root of f(x) = 0. This completes the first iteration. The iterative process is repeated with the new approximation ofthe root to obtain an even better approximation. This completes the second of the iterative numerical method. The process is repeated an appropriate number of iteration38 Simplified Numerical Analysis times with the most recent approximation ea ich time to obtain better Approximations successively. The iterative process is repeated until a desired level of accuracy is achieved, Let x9 denotes the initial approximation and %uXarXy~ denote successive iterative solutions tp an exact root « of the equation f(x) = 0. The sequence {Xn}%o of the successive approximations is sald to converge to the exact root a, if the successive approximations approach a. In this the iterative method is also said to converge. In other words, the iterative method is said to be Convergent for a given initial approximation if the Corresponding sequence of successive approximations is convergent to the exact solution. Under certain conditions, it is Possible for an iterative method that the Sequence of successive approximations might diverge from a desired exact root a. Fig. (2.3) depicts different Possible cases for the sequence of Successive approximations. An important feature of the iterative m execution on computers) because the co ethods is that they are usually easy to program (for putational steps remain the same for each of the from iteration to iteration. Xx axis ig. (2.3): The sequence (x,,} 9 of successive approximations 5 increasing sequence, (b) converging to the root converging to the root a as alternating sequence, and (d) (a) converging to the root a as decreasing sequence, (c) diverging from the root a. Question 04: What are some basic techniques to estimate (or guess) a root of f(x) = 0, Geometrically, a continuous function f(x) intersects the x-axis (a) = 0. Thus, any value x in the neighbourhood of the root a can be considered as the inital ; ition or guess of the root. Locating a neighbourhood that contains only one root is approximat lation of the root. Besides the physical considerations of the problem for getting veparied aoa of the root, following are the two of the well-known schematic approaches initial appr’ for isolation of the roots. where its root a exists, Le, a FSSolution of a Nonlinear Equation in One Variable 39 (1) Graphical Approach: The plot of the function f(x) is sketched (may be a rough one). i Spotting a point of intersection of f(x) with the x-axis would offers a reasonable guess or segment for isolation of the root. Fig. (2.4) shows how this could be done. Fig. (24) : Looking at the graph of f(x) = 4x + sinx — e* leads to assume that 0.1 or 0.2 could be @ reasonable guess of the root. (2) Evaluation Approach: The Intermediate Value theorem implies that if a continuous function f(x) has opposite signs at the end points of some interval a,b], that is, f(a) f(b) <0, then there is at least one real root of the equation f(x) = 0 in (a,b). Thus, such an interval [a, b] can be considered as a neighbourhood around the root from where any point could be considered as the initial approximation to the root. Fig. (2.5) shows some possible cases in this regard. Obviously, smaller the length of the interval [a, b], closer will be the initial approximation to the root and greater will be the chances of early convergence. © © Fig, (2.5): Opposite signs of any two values of a continuous function ensures existence of at least one zero of the function between the two values. D The intermediate Value Theorem: Suppose that f(x) is a continuous function on the interval [a,b]. Then, for each p between f(a) and f(b), there exists a point 7 in a,b] such that F(n) = B. Scand ith CamSoannesss———————— Simplified Numerical Analysis ‘0 mayest (Gestion 05: Whataresome well-known nlimerical methods for solving non-linear equations? ‘There is a fairly vast variety of methods of finding roots of the non-linear equations. In text-book literatures, the numerical methods for finding roots of the equations can be found under following categories of topics: 4 Methods for finding ONE root ofa given equation (those which find a desired root in some specific portion of the domain) Methods for finding a simple root (a root of multiplicity 1) 27 Bracketing methods (those which start with an interval containing a root and squeeze down the interval, iteratively) ©’ Methods that approximate f(x) by a linear polynomial near the root >. ; > Regula-Falsi (False-Position) method : * Open Methods (those which obtain successive single approximations irrespective of their location at any side of the root) © Methods that approximate f (x) by a linear polynomial near the root > Fixed-Point Iteration method » Newton-Raphson method (Newton's method) > — Secant © Methods that approximate f(x) by a quadratic polynomial near the root > Muller’s method > —— Chebyshev’s method * Hybrid methods (those which are a blend of open and bracketing methods) > Brent's method * Methods for finding a multiple root (a root of multiplicity greater than 1) > Generalized or Modified Newton's method > Generalized or Modified Secant method + Methods for finding ALL the roots of a polynomial > Bairstow’s method (an iterative method) > Graeffe's Root Squaring method (a direct method) 4 Methods for finding the COMPLEX roots > Any open method with complex arithmetic and often with complex initial app. 4 Methods for solving a system of non-linear equation Fixed-Point Iteration method for a non-linear system Newton’s and Quasi-Newton's methods for a non-linear system ‘Steepest Decent methods for a non-linear system Homotopy and Continuation methods for a non-linear system vvvv Note: The present chapter explains only the methods underlined above, Scand ith CamsoanneSolution of a Nonlinear Equation in One Variable Al 2.2 Bracketing Methods 2.2.1 The Bisection Method (or Bolzano Method) Question 06: Explain the Bisection miethod of finding a root of a non-linear equation. Bisection method (or Bolzano method) is quite a basic method for solving a non-linear equation. The method requires two function values with opposite signs around either side of the root so that the two points brackets the root. The method bisects the available interval having 2 root of the equation and then selects one of two subintervals in which @ root must lie. This process is repeated, squeezing down by half in each of the iterations, until a desired accuracy is achieved. Due to its strategy, several other ames are available in literature for the method: interval halving method, binary-search method and binary chopping method. ‘To solve the equation f(<) = 0, the function f(x is given to be continuous on an interval [a,b] such that f(a) and f(b) have opposite signs, Le, f(a)/(b) <0. Thus, the Intermediate Value theorem® ensures that there exists a root a of f(x) = 0 in (a,b), such that f(a) = 0. To get closer to the root a, firet the midpoint c = (a + b)/2 of the interval [a,b] is chosen, and then the decision for the choosing ‘one of the two halves of the interval is made as below: 1. If f(a) and f(c) have opposite signs, then a root lies in [a,c] 2. If f(c) and f(b) have opposite signs, then a root lies in [c, b] ‘The subinterval which brackets the root is chosen. Its length is exactly half of the length of the original interval To further squeeze down the new interval by its half, itis relabeled as [a, b] and the process is repeated. A depiction of this process is shown in Fig. (2.6). This way, the iterations are performed until 1 is small enough that its length is less than the permissible error so that each of proximation to the root. Note that, although the squeezed interval the points of the recent interval could be chosen as an apy theoretically possible, it is quite rare that f(c) = 0 in any iteration Fig. (2.6): Proceeding of the iterations of the Bisection method. @ The intermediate Value Theorem: Suppose that f(x) is a continuous function on the interval (a, b]. Then, for each between f(a) and f(b), there exists a point 7 in [a,b] such that f(m) = B. ‘ 8 Scand ith Camsoanne42 Remark: If f(x) is continuous on an interval [a,b] and the equation f(x) = in (a,b), then Here c, is the mid-point of the squeezed interval obtained after n iterations of the Bisection method (i.e, after n bisections). This relation also serves as the absolute error bound (maximum absolute error) for the Bisection method. The error for any point in the squeezed interval is not greater than the length of the interval: Remark: The formula to determine the maximum number of iterations n of the Bisection method after which the error associated with any point in the squeezed interval is not greater than a given permissible absolute error tT (b — a)/2". as below: log(b — a) — log(re) log(2) Simplified Numerical Analysis 1 Remark: The midpoint in any iteration may be found using the formula This is important to mitigate the adverse effect of round-off errors caused by the finite-digit computer arithmetic, which otherwise might result in disaster. c=at b- Problem 01: Find areal root of the equation, x° +b instead of | ¢= "7" 4x —5 = 0,using the Bisection method. has a real root ¢ Solution: For the given function f(x) = x3 4x ~ 5, x -3 -2 -1 0 2 3 4 Sign of f(z) | -ve | -ve | -ve ve | +ve | +ve As f(x) has opposite signs at x = 2, and x = approximations can be taken as: The itera where a=2 fla)
0 tive formula involved in the Bisection method is given by Scand ith Camsoanne 3, therefore it has at least one real root in [2,3]. Thus, the initial | |43 Solution of a Nonlinear Equation in One Variable fc) = f@5) = (25)?-4(25)-5 = 0.625 As f(a) and f(c) has opposite signs (ie, f(@)f(c) < 0), therefore f(x) has at least one real root in [2,2.5]- Thus, for the next iteration, a=2 f@ a+b _ 2425 = = 225 ~ 2 = -2.6094 FO = (2.25) (2.25)? - 4(2.25)-5 ‘As f(b) and f(c) has opposite signs (Ie, f(b)f(C) <0), therefore f(x) has at least one real root in (2.25, 2.5]. Thus, for the next iteration, a=225 b=25 f(a) = -2.6094 f(b) = 0.625 S+25 _ rang = (2.375)? - 4(2.375)-5 = 1.1035 fc) = f@2375) = ‘As f(b) and f(c) has opposite signs (ie, f(b)f(c) <0), therefore f(x) has at least one real root in (2.375, 2.5). Thus, for the next iteration, b=25 a=2375 fb) = f(a) = 1.1035 625 ‘This way the iterations might be progressed until the desired accuracy is achieved. Remark: A minimum number of iterations, n, that ensures the approximate solution of f(x) = 0 using the Bisection method in the interval [a, b] = [2,3] has an absolute error of at most 10~*, can be determined as: Scand ith Camsoanne
You might also like
Topology and Functional Analysis by DR Abdul Majeed PDF
PDF
80% (71)
Topology and Functional Analysis by DR Abdul Majeed PDF
461 pages
Object Oriented Programming OOP Book by Tasleem Mustafa and Other PDF
PDF
67% (3)
Object Oriented Programming OOP Book by Tasleem Mustafa and Other PDF
569 pages
Calculus Analytic Geometry S M Yusuf
PDF
88% (8)
Calculus Analytic Geometry S M Yusuf
43 pages
Mathematical Methods Solution Manual by SM Yousaf PDF
PDF
69% (13)
Mathematical Methods Solution Manual by SM Yousaf PDF
1,051 pages
Vector and Tensor Analysis by Dr. Nawazish Ali Shah
PDF
92% (12)
Vector and Tensor Analysis by Dr. Nawazish Ali Shah
725 pages
Mechanics by Q K GHORI
PDF
100% (4)
Mechanics by Q K GHORI
284 pages
Book Vector and Tensor Analysis
PDF
100% (4)
Book Vector and Tensor Analysis
725 pages
Calculus Solutions Manual 2
PDF
85% (116)
Calculus Solutions Manual 2
470 pages
Zill Complex Analysis Solutions
PDF
57% (7)
Zill Complex Analysis Solutions
14 pages
(Solution Manual) Numerical Methods by Vedamurthy
PDF
63% (41)
(Solution Manual) Numerical Methods by Vedamurthy
70 pages
Integral Equation ZR Bhatti
PDF
67% (3)
Integral Equation ZR Bhatti
236 pages
Amjad Ali SNA4 Lab Manual MATLAB4
PDF
No ratings yet
Amjad Ali SNA4 Lab Manual MATLAB4
180 pages
B.SC Mathematical Methods by S.M. Yusuf
PDF
100% (1)
B.SC Mathematical Methods by S.M. Yusuf
304 pages
Solutions MAnual For A First Course in Numerical Analysis With C++ by SA Bhatti - 2
PDF
86% (7)
Solutions MAnual For A First Course in Numerical Analysis With C++ by SA Bhatti - 2
517 pages
9th Math 1,2,3,4
PDF
100% (4)
9th Math 1,2,3,4
4 pages
Chapter 1
PDF
50% (2)
Chapter 1
47 pages
Group Theory by ZR Bhatti
PDF
100% (2)
Group Theory by ZR Bhatti
285 pages
Elements of Numerical Computing by Faiz Ahmed
PDF
78% (37)
Elements of Numerical Computing by Faiz Ahmed
66 pages
Equações Diferenciais Zill-3rd-Edition-Solutions-Manual PDF
PDF
50% (2)
Equações Diferenciais Zill-3rd-Edition-Solutions-Manual PDF
400 pages
Numerical Analysis M.SC PDF
PDF
100% (3)
Numerical Analysis M.SC PDF
83 pages
1st Year Statistics Chapter 2 Notes
PDF
No ratings yet
1st Year Statistics Chapter 2 Notes
39 pages
KPK 9th Maths ch03
PDF
80% (10)
KPK 9th Maths ch03
12 pages
Systems of Linear Equations and Matrices: Shirley Huang
PDF
No ratings yet
Systems of Linear Equations and Matrices: Shirley Huang
51 pages
(MADHU MANGAL PAUL) Numerical Analysis For Scienti
PDF
77% (13)
(MADHU MANGAL PAUL) Numerical Analysis For Scienti
666 pages
Vector and Tensor Analysis by Nawazish Ali
PDF
57% (23)
Vector and Tensor Analysis by Nawazish Ali
38 pages
SOLUTIONS OF Ytha Yu Charles Marut-Assem PDF
PDF
No ratings yet
SOLUTIONS OF Ytha Yu Charles Marut-Assem PDF
129 pages
Books List
PDF
67% (3)
Books List
4 pages
Past papers of bs math 6th semester pdf
PDF
100% (1)
Past papers of bs math 6th semester pdf
8 pages
MSC Math Notes Punjab University
PDF
100% (1)
MSC Math Notes Punjab University
3 pages
MTH622 101 To 186
PDF
No ratings yet
MTH622 101 To 186
186 pages
Lecture Notes On Advance Group Theory: by Azhar Hussain
PDF
No ratings yet
Lecture Notes On Advance Group Theory: by Azhar Hussain
16 pages
Laplace Transformation Umer Asghar Method PDF
PDF
100% (3)
Laplace Transformation Umer Asghar Method PDF
36 pages
Shahbazbook
PDF
100% (2)
Shahbazbook
285 pages
1st Year Math 1st Test Series
PDF
No ratings yet
1st Year Math 1st Test Series
16 pages
Chap 01 Solutions Ex 1 3 Calculus
PDF
No ratings yet
Chap 01 Solutions Ex 1 3 Calculus
14 pages
ECO606 Handouts PDF
PDF
No ratings yet
ECO606 Handouts PDF
274 pages
SSC-II Mathematics (All Sets With Solutions) - Combined
PDF
No ratings yet
SSC-II Mathematics (All Sets With Solutions) - Combined
47 pages
Mth623 (59-110) SHABBIR HUSSAIN (Notes For Photocopy)
PDF
100% (1)
Mth623 (59-110) SHABBIR HUSSAIN (Notes For Photocopy)
111 pages
Ilmi Kitab Khana
PDF
43% (14)
Ilmi Kitab Khana
16 pages
SSC-II Physics (All Sets With Solutions) - Combined
PDF
No ratings yet
SSC-II Physics (All Sets With Solutions) - Combined
46 pages
1st Year Math Important Short Questions
PDF
100% (3)
1st Year Math Important Short Questions
15 pages
FX E X: Khwaja Fareed University of Engineering & Information Technology Rahim Yar Khan
PDF
No ratings yet
FX E X: Khwaja Fareed University of Engineering & Information Technology Rahim Yar Khan
2 pages
Statistics by Sher Muhammad Chaudhry Chap 3 and 4
PDF
100% (1)
Statistics by Sher Muhammad Chaudhry Chap 3 and 4
76 pages
Mth404 Notes
PDF
100% (1)
Mth404 Notes
20 pages
Test Mathematics FSC PART 1 FULL BOOK
PDF
No ratings yet
Test Mathematics FSC PART 1 FULL BOOK
3 pages
Solution Manual Introduction To Statistical Theory (Part I) Sher M (PDFDrive)
PDF
No ratings yet
Solution Manual Introduction To Statistical Theory (Part I) Sher M (PDFDrive)
230 pages
Bs Mathematics Outlines PDF
PDF
No ratings yet
Bs Mathematics Outlines PDF
72 pages
CHAPTER 1 10th Short Numericals
PDF
100% (1)
CHAPTER 1 10th Short Numericals
6 pages
10th Pak Studies Chapter 7 Long Q Urdu Medium
PDF
100% (1)
10th Pak Studies Chapter 7 Long Q Urdu Medium
24 pages
Vector and Tensor Analysis by DR Nawazish Ali PDF Download 1 PDF
PDF
40% (5)
Vector and Tensor Analysis by DR Nawazish Ali PDF Download 1 PDF
4 pages
Computer Organization Practicals
PDF
33% (3)
Computer Organization Practicals
45 pages
Numerical Analysis.
PDF
No ratings yet
Numerical Analysis.
136 pages
Amjad Ali SNA4 Lab Manual Cpp4
PDF
No ratings yet
Amjad Ali SNA4 Lab Manual Cpp4
188 pages
(Ebook) Numerical Methods by Dukkipati, R.V. ISBN 9788122428131instant download
PDF
100% (5)
(Ebook) Numerical Methods by Dukkipati, R.V. ISBN 9788122428131instant download
52 pages
Download full Numerical Analysis and Scientific Computation 2nd Edition Jeffery J. Leader ebook all chapters
PDF
100% (4)
Download full Numerical Analysis and Scientific Computation 2nd Edition Jeffery J. Leader ebook all chapters
37 pages
Table of Contents
PDF
No ratings yet
Table of Contents
4 pages
(MADHU MANGAL PAUL) Numerical Analysis For Scienti
PDF
100% (1)
(MADHU MANGAL PAUL) Numerical Analysis For Scienti
666 pages
Numerical Analysis With - Matlab
PDF
No ratings yet
Numerical Analysis With - Matlab
76 pages
NRP 23 Sep 2023 Amjad Ali
PDF
No ratings yet
NRP 23 Sep 2023 Amjad Ali
176 pages
Numerical Analysis
PDF
No ratings yet
Numerical Analysis
119 pages
Lecture#6
PDF
No ratings yet
Lecture#6
17 pages
Lecture#4
PDF
No ratings yet
Lecture#4
17 pages
Lecture#1
PDF
No ratings yet
Lecture#1
94 pages
Discrete Structures Lecture 10
PDF
No ratings yet
Discrete Structures Lecture 10
45 pages
Discrete Structures Lecture 7
PDF
No ratings yet
Discrete Structures Lecture 7
33 pages
Reading Skill
PDF
No ratings yet
Reading Skill
17 pages