Você está na página 1de 89

SOLUTION OF SINGLE

NONLINEAR EQUATIONS
ES 204 – Numerical Methods in Engineering
2nd Semester AY 2017-2018

ES 204Prof.
Asst. – Numerical Methods
Kristian July R. Yapin Engineering 2ndthe
University of Semester AY 2017-2018
Philippines Diliman
OUTLINE
 Introduction
 Bracketing/Closed Methods
-- Bisection Method
-- Regula Falsi (Method of False Position)
 Open Methods
-- Fixed-Point Iteration
-- Newton-Raphson Method
-- Secant Method

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
 Many engineering analyses require the
determination of the value(s) of the
variable x that satisfies a nonlinear equation:

f x  0
 The values of x that satisfy the above equation
are known as the roots (or zeros of the function).

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
ROOTS
 May be finite or infinite in number
 May be further classified as:
-- Real and distinct
-- Real and repeating
-- Complex conjugate
-- Mixture of all of the above

*For illustration purposes,


consider a 4th order polynomial function.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
FUNCTION
 May or may not be available in explicit form
 May be further classified as:
-- Polynomial function
-- Transcendental function
• Exponential function
• Logarithmic function
• Trigonometric function
• Hyperbolic function

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
Polynomial Functions
 2nd-order Polynomial Functions
b  b2  4ac
f  x   ax  bx  c
2
 x
2a

 Higher-ordered Polynomial Functions


-- Direct methods
-- Numerical methods

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
Transcendental Functions
 Exponential Functions
 Logarithmic Functions
 Trigonometric Functions
 Hyperbolic Functions

>> Direct Methods


-- Usually limited, depending on the
form of the equation

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
Default Method: GRAPHICAL METHOD

-- Useful for obtaining rough estimates of roots


-- Limited because of lack of precision
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
INTRODUCTION
INCREMENTAL SEARCH METHOD
 The value of x is incremented from an initial
value x1, successively until a change in the
sign of the function f(x) is observed.
 If f(x) is real and continuous in the interval
from xl to xu, and f(xl) and f(xu) have opposite
signs, that is
f  xl  f  xu   0
then there is at least one real root between xl
and xu.
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
INTRODUCTION
PROBLEM:
 Choice of increment length
-- If too small, search can be time consuming
-- If too large, possibility of missing
closely spaced roots (multiple roots)

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


INTRODUCTION
NOTES:
 The method can only be used to find only
the real roots of a function f(x).
 If the graph of f(x) touches the x axis
tangentially, the function does not
undergo a sign change.
 The method may not be able to distinguish
between a root and a singular point.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


ROOT-FINDING METHODS
BRACKETING METHODS OPEN METHODS
 Based on two initial  Can involve one or
guesses that “bracket” more initial guesses,
the root – that is, are on but there is no need
either side of the root. for them to bracket
the root.
 May always work but  Do not always work
converge slowly. (i.e., they can diverge),
but when they do they
usually converge
quicker.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BRACKETING VS. OPEN

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BRACKETING VS. OPEN
 Bracketing Methods
-- Bisection Method
-- Regula Falsi (Method of False Position)

 Open Methods
-- Fixed-Point Iteration
-- Newton-Raphson Method
-- Secant Method

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
 Refinement of the Incremental Search Method
 Also known as interval halving
 Extremely simple, safe, and very robust

If f(x) is real and continuous in the interval


x l  x  x u and f(xl) and f(xu) have
opposite signs, i.e.,
f  xl  f  xu   0
then there is at least one real root
between xl and xu.
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
BISECTION METHOD

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
PROCEDURE:
 Choose xl and xu such that f  x l  f  x u   0

 Find midpoint, xm (current estimate of soln.)


xl  xu
xm 
2

 Calculate f(xm).

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
 If f  x l  f  x m   0 Set xu = xm.
Proceed to next step.
Else if f  x l  f  x m   0 Set xl = xm.
Proceed to next step.
Else
xm is the root. Stop!

 Check if f  x m   TOL OR x m  x mold  TOL

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
EXAMPLE:
Find the root of the equation

f x  e x
x 0

using the Bisection Method bounded by


the interval [0,1]. Let TOL  1  104.

ANSWER: x = 0.5671433

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
 In order to estimate the number of iterations
required in the bisection method, we note that
the initial size of the interval is  x u  x l 0

 After n iterations, the interval size becomes:


 x u  x l 0
2n

-- Maximum possible error when the root


is approximated by the nth midpoint

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


BISECTION METHOD
 Hence, if the tolerance for the error is given
by ε, the number of iterative steps required
is the smallest integer satisfying
 x u  x l 0
n

2

 Solving for n:
  x u  x l 0 
ln  
  
n
ln2

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 There are three roots in the interval

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 There are roots in [xl, xu] even though
f  xl  f  xu   0

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 Presence of double roots in an interval
f  xl  f  xu   0

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 Even number of roots in an interval
(single and double root) f  x l  f  x u   0

 Cannot find complex roots

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 Presence of singularity point in the interval
f  xl  f  xu   0

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PITFALLS OF BISECTION METH.
 Singularity point, and two roots in the interval.
f  xl  f  xu   0

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


REGULA FALSI METHOD
 Method of False Position
 Similar to Bisection Method, but instead
of continuously bisecting the interval, the
linear interpolation concept is used.

f  x u  x l  x u 
xr  xu 
f  xl   f  xu 

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


REGULA FALSI METHOD
 The success of the
method depends on
the initial guesses and
shape of the curve.

 Given f  x   x 10  1
in the interval [0,1.3],
compare Bisection
Method and Regula
Falsi Method.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


REGULA FALSI METHOD

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
 Method of Successive Substitution (MOSS)
 If the equation, f(x) = 0, is rearranged in the
(non-unique) form, x = g(x), then an iterative
method may be devised as
x n1  g  x n  n  0, 1, …

NOTE:
g  xn  iteration function
x n1  g  x n  iteration scheme

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
Consider
f  x   ex  x

Using Fixed Point


Iteration:
x  e x
x  g x 

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
Solve the following equation:

f x  x 3  02

The above equation can be rearranged as:


a) x  x 2  x  3 x n  1  x n2  x n  3
3 3
b) x  x n1 
x xn
1 3 1 3
c) x   x   x n1   xn  
2 x 2 xn 
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
FIXED POINT ITERATION
If x0 = 2.0
Iteration # xn
n Case (a) Case (b) Case (c)
0 2.0 2.0 2.0
1 3.0 1.5 1.75
2 9.0 2.0 1.732143
3 87.0 1.5 1.732051

⋮ ⋮ ⋮ ⋮
Remarks Diverging Oscillating Converging

The proposed iterative schemes do not always


converge with an arbitrarily chosen form of g(x).
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
FIXED POINT ITERATION
THEOREM:
If g(x) or g’(x) are continuous on an interval about
a root, α, of the equation x = g(x), and if |g’(x)| < 1
for all x in the interval, then
x n1  g  x n  n  0, 1, …

will converge to the root, α, provided that x0 is


chosen in the interval.
-- Only a sufficient condition

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


PRACTICE
Determine the trend of the solution at x = -0.50 if
the given equation
f  x   x  2x  3  0
2

is reformulated as follows:
x2  3
a) x  c) x  2 x  3
2
2x  3
b) x  d) x  x  0.2 x 2  2 x  3 
x

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
CONVERGENCE OF METHOD
The Fixed Point Iteration procedure gives:
x i 1  g  x i  1 
If x* denotes the true solution, then
x  g x
* *
 2
Subtracting (1) from (2) will give
x  x i 1  g  x
* *
  g x 
i

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
x  x i 1  g  x
* *
  g x 
i

Dividing both sides of the above equation by x *  x i


x  x i 1 g  x   g  x i 
* *


x  xi
*
x  xi
*

From the Mean Value Theorem,


g x *
  g x   g' 
  x    xi
i *

x  xi
*

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


FIXED POINT ITERATION
Let ei  x *  x i
x  x i 1 g  x   g  x i 
* *


x  xi
*
x  xi
*

ei  1
 g '  
ei
 ei 1  g '   ei
 Linear Convergence

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
 Most widely used method for finding the
roots of nonlinear algebraic equations

 Locates roots starting from initial estimates


-- Method is self-starting!

 Can also be used to find complex roots

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
DERIVATION 1:
Based on the slope of
the tangent of the plot
of f(x) at any xn

f  xn 
x n1  x n 
f ' x n 

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
DERIVATION 2:
Based on Taylor polynomials

The Taylor series expansion of the function, f(x) = 0,


around the point (initial estimate), x0, is given by:
 x  x0 
2

f  x   0  f  x0    x  x0  f ' x0   f ''  x 0  …
2!

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
DERIVATION 2:
Based on Taylor polynomials
 x  x0 
2

f  x   0  f  x0    x  x0  f ' x0   f ''  x 0  …
2!

By truncating the above expression only up to the


2nd term, it is now simplified as
f  xn 
x n1  x n 
f ' x n 
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
ALGORITHM:
1. Guess x0 and set tolerance.
Set iteration number k = 0.
2. Compute f(xk) and f’(xk).
3. If f  xk   0 Stop! xk is the root.
f ' xk   0 Stop! Guess new
initial value.
Else
f  xk 
Find xk+1 from x k 1  x k 
f ' x k 
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
ALGORITHM:
4. If x k 1  x k  tolerance Stop! xk+1 is the root.

f  x k   tolerance Stop! xk+1 is the root.

Else
Set k = k+1
xk = xk+1

Go to Step 2.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
NOTE:
The method may either…

-- Converge to a root different from the


expected one, or

-- Diverge if the starting guess value is


not close enough to the root.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 1
Using x0 = 0, obtain the Newton-Raphson iterates
for the function given below:

f  x   3 x  sin x   e  0 x

f  xk  3 x k  sin x k   e xk

x k 1  x k   xk 
f ' x k  3  cos  x k   e xk

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 1

k x f(x) f'(x)
0 0.000000000 -1.000000000 3.000000000
1 0.333333333 -0.068417728 2.549344521
2 0.360170714 -0.000627985 2.502262548
3 0.360421680 -0.000000056 2.501814244
4 0.360421703 0.000000000 2.501814204
5 0.360421703 0.000000000 2.501814204

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 1

f  x   3 x  sin x   e  0 x

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 2
Find the root of the equation
f  x   x  3x  2x  1  0
3 2

using the starting points x0 = 0 and x0 = 1, with


tolerance = 0.0000001.

f  xk  x k 3  3 xk 2  2xk  1
x k 1  xk   xk 
f ' x k  3x k  6xk  2
2

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 2
k x f(x) f'(x)
0 0.000000000 1.000000000 2.000000000
1 -0.500000000 -0.875000000 5.750000000
2 -0.347826087 -0.100682173 4.449905482
3 -0.325200399 -0.002058362 4.268468292
4 -0.324718174 -0.000000924 4.264634722
5 -0.324717957 0.000000000 4.264632999

-- Convergence achieved in 5 iterations


ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 2
k x f(x) f'(x)
0 1.000000000 1.000000000 -1.000000000
1 2.000000000 1.000000000 2.000000000
2 1.500000000 0.625000000 -0.250000000
3 4.000000000 25.000000000 26.000000000
4 3.038461538 7.432009558 11.465976331
5 2.390282147 2.296972595 4.798653347
6 1.911611898 0.845970637 1.493108756
7 1.345028497 0.696045305 -0.642866009
8 2.427750704 2.482679233 5.115416219
9 1.942417913 0.894591991 1.664454565
10 1.404949357 0.661455851 -0.508048054
11 2.706904645 4.266202096 7.740570403
12 2.155756361 1.388071510 3.007318298
13 1.694191813 0.640340800 0.445706821
14 0.257505701 1.333158837 0.653893351
15 -1.781295941 -17.733716712 22.206821329
16 -0.982725247 -4.811763065 10.793598216
17 -0.536927380 -1.093519130 6.086437312
18 -0.357262483 -0.143034139 4.526484345
19 -0.325663094 -0.004034214 4.272147920
20 -0.324718789 -0.000003545 4.264639607
21 -0.324717957 0.000000000 4.264632999

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 2

-- The success of the Newton-Raphson


method depends on the initial guess.
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 3
Find the root of the equation
f  x   tan 1
x  0
using the starting points x0 = 1.6 and x0 = 0.2.

f  xk  tan 1
 xk 
x k 1  x k   xk 
f ' x k  1
1  xk 2

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 3
k x f(x) f'(x)
0 1.600000000 1.012197011 0.280898876
1 -2.003421361 -1.107832055 0.199453611
2 3.550913053 1.296288153 0.073480874
3 -14.090251049 -1.499944070 0.005011648
4 285.20135080 1.567290046 0.000012294
5 -127199.44131 -1.570788465 0.000000000

-- Solution diverges at x0 = 1.6


ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 3

k x f(x) f'(x)
0 0.200000000 0.197395560 0.961538462
1 -0.005291382 -0.005291333 0.999972002
2 0.000000099 0.000000099 1.000000000

3 0.000000000 0.000000000 1.000000000

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 3

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 3
When f’’(α) = 0,
the method might
diverge, unless the
starting point is
sufficiently close
to the root.

α = root

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 4
Find the root of the equation
f  x   sin 2 x   0

using the starting point x0 = 0.75.

f  xk  sin 2 x k 
x k 1  x k   xk 
f ' xk  2cos  2 x k 

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 4

k x f(x) f'(x)
0 0.750000000 0.997494987 0.141474403

1 -6.300709974 -0.035042157 1.998771670

2 -6.283178128 0.000014359 2.000000000

3 -6.283185307 0.000000000 2.000000000

-- Root = -2π
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 4

 When f’(x0) is small [the tangent to f(x) is nearly


horizontal], the method might converge to a root
farther than the one closer to the starting point.
 It is a good practice to verify that the root given by
the method is the desired one.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
SAMPLE PROBLEM 4
Worst Case Scenario:

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
ADDITIONAL NOTES:
1. The method may converge slowly due to the
nature of the function.
-- The iteration that began at x0 progressively
diverged from the root.
-- The solution oscillates even though
there are no (real) roots present in the
interval. [illustration shown on next slide]

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
ADDITIONAL NOTES:

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
ADDITIONAL NOTES:
-- Oscillations may occur whenever
there is a local minima or maxima, if
the initial guess is selected near that
point.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
ADDITIONAL NOTES:
2. Oscillations may be encountered for a function
with a single real root.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
ADDITIONAL NOTES:
3. Similarly, oscillations may also be encountered
when f(x) has 2 real roots.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
CONVERGENCE OF METHOD
Using the Taylor Series expansion to find f(x) at xi+1:
f ''  x i 
f  x i 1   f  x i    x i 1  x i  f ' x i    x i 1  x i  x i    x i 1
2

If xi+1 = x* is the root of f(x) = 0,


f ''  
f x   0  f x  x  x i  f ' x i    x  x i 
2
*
i
* *
1
2

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


NEWTON-RAPHSON METHOD
Rewriting Newton’s iterative formula:
f  x i    x i 1  x i  f ' x i   0 2

Subtracting (2) from (1):


f ''  
x  xi 1  f ' x i    x  xi 
2
* *
0
2
Let ei  x  x i *

1 2
ei 1 f '  x i   ei f ''    0
2
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
NEWTON-RAPHSON METHOD
1 2
ei 1 f '  x i   ei f ''    0
2

As the method converges, both xi and ξ can be


replaced by the actual root x* so that the above
equation becomes:
f ''  x * 
ei  1   ei 2
2 f ' x * 
 Quadratic Convergence

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
 Solves the major weakness of the
Newton-Raphson method
-- Evaluation of f’(x) which is far more
difficult and needs more arithmetic
operations to calculate than f(x)

 To circumvent this problem, a slight variation


is introduced…

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
From Newton-Raphson f  xn 
x n1  x n  (1)
method’s definition: f ' x n 

Using finite difference f  x n 1   f  x n 


to approximate the f ' x n   (2)
x n1  x n
derivative:

Substituting (2) to (1):


x n1  x n 
 x n 1  x n  f  x n 
f  x n 1   f  x n 

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
Graphically:

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
x n1  x n 
 x n 1  x n  f  x n 
f  x n 1   f  x n 

 Requires two function evaluations at xn and


xn-1, to proceed from nth to the (n+1)th step.
 Performs only one function evaluation per
iteration.
 Needs two initial guesses of the unknown,
but it is not a bracketing method.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
SAMPLE PROBLEM
Find the root of the equation

f x  x  x 1  0
6

using the Secant Method, with initial guesses


of x0 = 2 and x0 = 1.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
SAMPLE PROBLEM

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
SAMPLE PROBLEM
n xn f(xn)
0 2.000000000 61.000000000
0 1.000000000 -1.000000000
1 1.016129032 -0.915367714
2 1.190577769 0.657465697
3 1.117655831 -0.168491168
4 1.132531550 -0.022437286
5 1.134816808 0.000953564
6 1.134723646 -0.000005066
7 1.134724138 -0.000000001
ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018
SECANT METHOD
COMMENTS:
 Computationally, the Secant Method is more
efficient than the Newton-Raphson Method.

 Secant Method may diverge if initial guesses


are not well selected.

 Secant Method is the variation of the Newton-


Raphson Method.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
COMMENTS:
 Newton-Raphson Method requires fewer
iterations to obtain desired accuracy than
Secant Method, but the latter needs only one
function evaluation per iteration compared to
two iterations in Newton-Raphson Method.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SECANT METHOD
CONVERGENCE OF METHOD
p
ei 1  c ei
f ''  x
 *

c
2 f ' x  *

p  1.618
 Order of Convergence  1.718

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


SAMPLE PROBLEM
The friction factor, f, for turbulent flow in a pipe is
given by the Colebrook correlation
1 e 9.35 
 1.14  2.0log   
f  D Re f 

where Re is the Reynolds number, e is the roughness of


the pipe surface, and D is the pipe diameter. Evaluate
the friction factor, f, for D = 0.1 m, e = 0.0001 m and
Re = 5 x 106 using Fixed-Point Iteration.

ES 204 – Numerical Methods in Engineering 2nd Semester AY 2017-2018


QUESTIONS???
ES 204Prof.
Asst. – Numerical Methods
Kristian July R. Yapin Engineering 2ndthe
University of Semester AY 2017-2018
Philippines Diliman

Você também pode gostar