Professional Documents
Culture Documents
Lesson 4-CHE 358 - 2014-15
Lesson 4-CHE 358 - 2014-15
CHE 358
Numerical Methods
for Engineers
2014-15.02
Prepared by:
Dr. K. Mensah - Darkwa
Lesson-04
Roots and Optimization
Roots
• “Roots” problems occur when some
function f can be written in terms of one or
more dependent variables x
• The value of x that makes f(x) = 0, is the
root of the equation
• These problems often occur when a design
problem presents an implicit equation for a
required parameter.
Methods
Roots
Graphical Methods
Graphical Methods
• A simple method for obtaining the estimate of
the root of the equation f(x)=0 is to make a plot
of the function and observe where it crosses
the x-axis.
• Illustration of a number of general ways that a
root may occur in an interval prescribed by a
lower bound xl and an upper bound xu
Graphical Methods
• Same sign, no roots
Graphical Methods
• Different sign, one root
Graphical Methods
• Same sign, two roots
Graphical Methods
• Different sign, three roots
10
11
Bracketing Method
Bracketing Method
• Bracketing methods are based on making two
initial guesses that “bracket” the root - that is,
are on either side of the root.
12
Bisection Method
Theorem
13
Bisection Method
14
Bisection Method
Approximate percent relative error
15
False Position
The false position method is another bracketing
method, also called linear interpolation
Theorem
False Position
False-position formula f (x u )(x l x u )
xr xu
f (x l ) f (x u )
17
f (x) x10 1
18
Example
Determine the roots of the equation below
(a)Bisection Method
(b)False Position Method
20
Open Method
Open Methods
• Open methods differ from bracketing
methods, in that open methods require
only a single starting value or two starting
values that do not necessarily bracket a
root.
Newton-Raphson Method
Based on forming the tangent line to the f(x) curve
at some guess x, then following the tangent line to
where it crosses the x-axis.
f (x i ) 0
f ' (x i )
x i x i1
f (x )
x i1 x i ' i
f (x i )
xi 1 xi
a 100%
xi 1 22
CHE 358_2014/15~Dr. K. Mensah-Darkwa 11
1/18/2015
• Con:
Some functions show slow
or poor convergence
23
Examples
24
25
f (x i1 ) f (x i )
f (x i )
'
x i1 x i 26
f (x i )x i1 x i
x i1 x i
f (x i1) f (x i )
• NB - this method requires two initial
estimates of x but does not require an
analytical expression of the derivative. 27
Modified Secant Methods
• Rather than using two arbitrary values to
estimate the derivative, an alternative
approach involves a fractional perturbation
of the independent variable to estimate f(x);
d xi f (xi )
xi+1 = xi -
f (xi + d xi ) - f (xi )
Examples
29