0% found this document useful (0 votes)
89 views

LA - Lecture Notes Numerical Analysis

The bisection method is an incremental search method for finding roots of equations where the interval is divided in half at each step. It begins with an initial interval where the function changes sign, takes the midpoint as the first estimate, and redefines the interval to be above or below the midpoint depending on where the sign changes. The process repeats until the interval size is within a specified tolerance. MATLAB code is provided to implement the bisection method to find roots of equations. The false position method is an alternative root-finding method based on a graphical insight that is more efficient than the brute force bisection method. Open methods like fixed-point iteration and Newton-Raphson method require only a single starting value and use rearrangement of

Uploaded by

Atalay Seçer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

LA - Lecture Notes Numerical Analysis

The bisection method is an incremental search method for finding roots of equations where the interval is divided in half at each step. It begins with an initial interval where the function changes sign, takes the midpoint as the first estimate, and redefines the interval to be above or below the midpoint depending on where the sign changes. The process repeats until the interval size is within a specified tolerance. MATLAB code is provided to implement the bisection method to find roots of equations. The false position method is an alternative root-finding method based on a graphical insight that is more efficient than the brute force bisection method. Open methods like fixed-point iteration and Newton-Raphson method require only a single starting value and use rearrangement of

Uploaded by

Atalay Seçer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

ROOTS OF EQUATIONS

Bisection Method: The bisection method, which is alternatively called binary chopping, interval halving,
or Bolzano’s method, is one type of incremental search method in which the interval is always
divided in half.

Example: Find the root of the equation

= 0
Step 1
we can see that the function changes sign between values of 12 and 16. Therefore, the initial
estimate of the root xr lies at the midpoint of the interval.
Step 2

Step 3

>0 case b) is valid

1
the root must be located between 14 and 16. Therefore, we create a new interval by redefining
the lower bound as 14 and determining a revised root estimate as

<0 case a) is valid

……….

Termination Criteria and Error Estimates

2
MATLAB CODE Bisection

a=input('Enter Function:','s');

f=inline(a);

xl=input('Enter lower guess:') ;

xu=input('Enter upper guess:');

tol=input('Enter tolerance(recommended 0.001):');

if f(xu)*f(xl)<0

else

    fprintf('Wrong Guess!Enter new guess\n');

    xl=input('Enter lower guess:\n') ;

    xu=input('Enter upper guess:\n');

end

for i=2:1000

xr=(xu+xl)/2;

if f(xu)*f(xr)<0

    xl=xr;

else

    xu=xr;

end

if f(xl)*f(xr)<0

    xu=xr;

else

    xl=xr;

end

xnew(1)=0;

xnew(i)=xr;

if abs((xnew(i)-xnew(i-1))/xnew(i))<tol,break,end

end

str = ['Root: ', num2str(xr), '']

THE FALSE-POSITION METHOD


Although bisection is a perfectly valid technique for determining roots, its “brute-force”
approach is relatively inefficient. False position is an alternative based on a graphical insight.
3
4
5
LECTURE 3
HW : Learn Modified False Position method and solve the equation problem 5.20 in page 141.

OPEN METHODS
Open methods are based on formulas that require only a single starting value of x or two
starting values that do not necessarily bracket the root.

Simple fixed-point iteration (or, as it is also called, one-point iteration or successive


substitution)

by rearranging the function f(x)= 0 to x = g(x)

Example

6
The Newton-Raphson method

7
8
Pitfalls of the Newton-Raphson Method
Although the Newton-Raphson method is often very efficient, there are situations where it
performs poorly

Secant Method

9
10
11
12
ENGINEERING APPLICATIONS OF ROOT FINDINGS
EX.1

EX.2

13
EX.3

EX.4

14
EX.5

EX.6-7

15
EX.8

EX.9

16
EX.10

Numerical Differentiation : numerical approximations of derivatives.


numerical differentiation describes algorithms for estimating the derivative of a mathematical
function or function subroutine using values of the function 

why do we need to approximate derivatives?

1. There are times in which exact formulas are available but they are very complicated
to the point that an exact computation of the derivative requires a lot of function
evaluations. It might be significantly simpler to approximate the derivative instead
of computing its exact value.,

2. There are some cases where it may not be obvious that an underlying function exists and all
that we have is a discrete data set. We may still be interested in studying changes in the data,
which are related, of course, to derivatives.

TAYLOR SERIES

17
18
19
Similar improved versions can be developed for the backward and centered formulas
as well as for the approximations of the higher derivatives. The formulas are
summarized.

20
Backward finite-divided difference formulas

21
Centered finite-divided difference formulas:

22
23
For the finite-divided-difference approximations of Sec. 23.1, the data had to be evenly
spaced. Such control of data spacing is usually available only in cases where we can use a
function to generate a table of values.
In contrast, empirically derived information—that is, data from experiments or field
studies—is often collected at unequal intervals. Such information cannot be analyzed with
the techniques discussed to this point.

24
25

You might also like