0% found this document useful (0 votes)
4 views27 pages

Chap2com

Chapter Two discusses numerical methods for solving nonlinear equations, focusing on root-finding techniques such as the Bisection method, Newton-Raphson method, and Secant method. It outlines the assumptions, algorithms, and convergence analysis for these methods, along with examples and exercises for practical application. The chapter also addresses challenges related to multiple roots and the use of Horner's method for polynomial roots.

Uploaded by

Dawit Gizachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views27 pages

Chap2com

Chapter Two discusses numerical methods for solving nonlinear equations, focusing on root-finding techniques such as the Bisection method, Newton-Raphson method, and Secant method. It outlines the assumptions, algorithms, and convergence analysis for these methods, along with examples and exercises for practical application. The chapter also addresses challenges related to multiple roots and the use of Horner's method for polynomial roots.

Uploaded by

Dawit Gizachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

CHAPTER TWO

SOLUTION OF NONLINEAR EQUATIONS


Introduction
Numerical methods:-represent systematic techniques for solving
mathematical problems.
Types of Mathematical Problem
Roots of equations.
Systems of simultaneous linear algebraic equations.
Optimization.
Curve fitting.
Numerical integration.
Ordinary differential equations.
Partial differential equations.
Introduction
One has to consider the following while selecting algorithms to solve
mathematical problems
• Type, Availability, Precision, Cost, and Speed of Computer Special Requirements.
• Program Development Cost versus Software Cost versus Run-Time Cost. Programming Effort Required.
• Characteristics of the Numerical Method Maintenance.
• Number of Initial Guesses or Starting Points. Stability
Accuracy and Precision.
• Mathematical Behavior of the Function, Equation, or Data. Breadth of
Application.
• Ease of Application (User-Friendly?). Rate of
convergence
Methods of root finding
1. Bracket Method:- needs two initial guesses
 Graphical method
 The bisection method
 False-Position method
2. Open Method: -needs one initial guess
 Simple fixed point iteration
 The Newton-Raphson method
 The Secant method
 Brent’s method
 Multiple roots
 Roots of polynomials
Methods of root finding
• Graphical Method :-A simple method used to approximate the
solution of non linear equations by plotting the graph of f(x).
Methods of root finding
The bisection method
• The Bisection method is one of the simplest methods to find a zero of
a nonlinear function.
• It is also called interval halving method.
• To use the Bisection method, one needs an initial interval that is
known to contain a zero of the function.
• The method systematically reduces the interval. It does this by
dividing the interval into two equal parts, performs a simple test and
based on the result of the test, half of the interval is thrown away.
• The procedure is repeated until the desired interval size is obtained
Methods of root finding
• Let f(x) be defined on the interval [a,b].
Assumptions:
• f(x) is continuous on [a,b]
• f(a) f(b) < 0
Algorithm:
Loop
1. Compute the mid point c=(a+b)/2
2. Evaluate f(c )
3. If f(a) f(c) < 0 then new interval [a, c]
If f(a) f( c) > 0 then new interval [c, b]
End loop
• Intermediate value theorem:
if a function is continuous and f(a) and f(b) have different signs then the function has at least
one zero in the interval [a,b].
Methods of root finding
Example:-
Can you use Bisection method to find a zero of
f ( x)  x 3  3 x  1 in the interval [0,1]?

• Example 2:-Use Bisection method to find a root of the equation x =


cos (x) . (assume the initial interval [0.5,0.9])

Question 1: What is f (x) ?


Question 2: Are the assumptions satisfied ?
Methods of root finding
False-Position method:-A shortcoming of the bisection method is that, in dividing the
interval from xl to xu into equal halves, no account is taken of the magnitudes of f(xl)
and f(xu).
Methods of root finding

Exercise:-solve the problems given in bisection method using false


position method.
Methods of root finding
Newton Raphson Method:-
Given : xi an initial guess of the root of f ( x) 0
Question : How do we obtain a better estimate xi 1?
____________________________________
Taylor Therorem : f ( x  h)  f ( x)  f ' ( x)h
Find h such that f ( x  h) 0.
f ( x)
 h 
f ' ( x)
f ( xi )
A new guess of the root : xi 1  xi  Newton  Raphson Formula
f ' ( xi )
Methods of root finding
Example:-
Find a zero of the function f(x)  x 3  2 x 2  x  3 , x0 4
f ' (x) 3 x 2  4 x  1
f ( x0 ) 33
Iteration 1 : x1  x0  4  3
f ' ( x0 ) 33
f ( x1 ) 9
Iteration 2 : x2  x1  3  2.4375
f ' ( x1 ) 16
f ( x2 ) 2.0369
Iteration 3 : x3  x2  2.4375  2.2130
f ' ( x2 ) 9.0742
Methods of root finding
Example
Methods of root finding
Convergence Analysis
Theorem :
Let f(x), f ' (x) and f ' ' (x) be continuous at x r
where f(r) 0. If f ' (r) 0 then there exists   0
xk 1-r
such that x0 -r   2
C
xk -r
max f ' ' ( x)
1 x0 -r 
C 
2 min f ' ( x)
x0 -r 
Methods of root finding
Secant method:-sometimes it may be difficult to obtain the derivative of
functions during newtons method.
f ( x  h)  f ( x )
f ' ( x) 
h
if xi and xi  1 are two initial points :
f ( xi )  f ( xi  1 )
f ' ( xi ) 
( xi  xi  1 )

f ( xi ) ( xi  xi  1 )
xi 1  xi   xi  f ( xi )
f ( xi )  f ( xi  1 ) f ( xi )  f ( xi  1 )
( xi  xi  1 )
Methods of root finding
Example f ( x)  x  2 x  0.5
2

x0 0
x1 1
( xi  xi  1 )
xi 1  xi  f ( xi )
f ( xi )  f ( xi  1 )
Read about modified secant method…
Methods of root finding
Exercises
Use Secant method to find the root of :
6
f ( x)  x  x  1
Two initial points x0 1 and x1 1.5

( xi  xi  1 )
xi 1  xi  f ( xi )
f ( xi )  f ( xi  1 )
Methods of root finding
• Exercises
Use Newton' s Method to find a root of :
f ( x)  x 3  x  1
Use the initial point : x0 1.
Stop after three iterations , or
if xk 1  xk  0.001, or
if f ( xk )  0.0001.
Methods of root finding
• Exercise
Use Newton' s Method to find a root of :
f ( x) e  x  x
Use the initial point : x0 1.
Stop after three iterations , or
if xk 1  xk  0.001, or
if f ( xk )  0.0001.
Methods of root finding
Exercise:-
In estimating the root of: x-cos(x)=0, to get more than 13 correct
digits:

• 4 iterations of Newton (x0=0.8)


• 43 iterations of Bisection method (initial
interval [0.6, 0.8])
• 5 iterations of Secant method
( x0=0.6, x1=0.8)
Methods of root finding
Simple fixed point iteration:-By rearranging the function f(x) = 0 so
that x is on the left-hand side of the equation: x = g(x)
Thus, given an initial guess at the root x i, x=g(x) can be used to compute
a new estimate xi+1 iteratively.
linear convergence:-
If |g’(x)|< 1, the errors decrease with each iteration.
For |g’(x)|> 1, the errors grow
Therefore:-we have to select g(x) such that |g’(x)|< 1.
Methods of root finding
Multiple roots:-A multiple root corresponds to a point where a function is
tangent to the x axis.
Odd multiple roots cross the axis, whereas even ones do not.
Multiple roots pose some difficulties for many of the numerical methods:
1) The fact that the function does not change sign at even multiple roots
precludes the use of the reliable bracketing methods.
2) Another possible problem is related to the fact that not only f (x) but
also f ‘(x) goes to zero at the root and causes problems for newtons and
secant methods.
Ralston and Rabinowitz (1978) proposed a method that alleviates the above
problems
Methods of root finding
Th function u(x) has the same root as f(x)

Substituting this function on newton Raphson formula it can be found


that where,

Therefore,

Newton-Raphson and secant methods are linearly, rather than


quadratically, convergent for multiple roots
Methods of root finding
Example: Use both the standard and modified Newton-Raphson
methods to evaluate the multiple root of f(x) = (x − 3)(x − 1)(x − 1),
with an initial guess of x0 = 0.
Methods of root finding
Roots of Polynomials:-A method of finding the root of a polynomial of degree n.
f (x) = an x n + an-1 xn-1 + ... + a1 x + a0 = 0 where an 0, n > 0.
Note:-
a. There are n (not necessarily distinct) real or complex roots.
b. If n is odd and all coefficients are real, there is at least one real root.
c. If all the coefficients are real and complex roots exist, they occur as
conjugate pairs.
d. If x0 is a root of Equ.1, then necessarily f(x) = (x-x0)g(x) where g (x) is a
polynomial of degree (n - 1).
Methods of root finding
Horner's method:- used for calculating f(x) and f’ (x)
f(x) = (x-x0)q(x) + R where q (x) = bn-1 xn-1 + bn-2 xn-2 + ... + b1 x + b0 and R is a
constant.
The Equations are compatible provided that
bn-1 = an
bn-2 = an-1 + x0 bn-1
………………….
………………….
b0 = a1 + x0 b 1
R = a0 + x0 b 0
Methods of root finding
Thus if (x – x0 ) is not a factor of f (x), then f(x0 ) = R = a0 + x0 b0.
Therefore, start successively compute bn-1 ,... , b0 .
 We can then determine f(x0).
To compute f' (x0), we first differentiate f(x) = (x-x 0)q(x) + R and
obtain f' (x) = q(x) + (x - x0) q' (x).
Thus f’(x0) = q(x0)
Finally, use newtons formula

Example:-Find the root of f(x) = (x − 3)(x − 1)(x − 1)=0, with an initial


guess of x0 = 4.

You might also like