Secant Method - Derivation: A. Bracketing Methods
Secant Method - Derivation: A. Bracketing Methods
Secant Method - Derivation: A. Bracketing Methods
E D A
On rearranging, the secant method
X
xi+1 xi-1 xi is given as
f ( xi )( xi xi 1 )
Figure 2 Geometrical representation of xi 1 xi
the Secant method. f ( xi ) f ( xi 1 )
1 2
Step 1
Calculate the next estimate of the root from two initial guesses
f ( xi )( xi xi 1 )
xi 1 xi
f ( xi ) f ( xi 1 )
Algorithm for Secant Method
Find the absolute relative approximate error
xi 1- xi
a = 100
xi 1
Step 2 Example 1
You are making a bookshelf to carry books that range from 8 ½ ” to 11” in height
Find if the absolute relative approximate error is greater than and would take 29”of space along length. The material is wood having Young’s
the prespecified relative error tolerance. Modulus 3.667 Msi, thickness 3/8 ” and width 12”. You want to find the maximum
vertical deflection of the bookshelf. The vertical deflection of the shelf is given by
1
9/27/2016
Books 0
f ( x) 0
0.01
Bookshelf
above equation.
Figure 3 Graph of the function f(x).
Find the absolute relative approximate error at the end of each iteration f( x) 0.67665 x 10-8 x 4 0.26689 x 10-5 x3 0.12748 x 10-3 x 2 0.018507 0
7 8
f ( x)
0.01
x1 x0 secant( x)
f x0 0.67665 108 x04 2.6689 105 x03 0.12748 103 x02 0.018507 0.02
0.67665 108 15 2.6689 105 15 0.12748 103 15 0.018507
4 3 2 0.027 0.03
0 5 10 15 20 25 30
0 x x 0 x 1' x x 1 29
8.2591104
f(x)
x'1, (first guess)
x0, (previous guess)
0.67665 108 10 2.6689 105 10 0.12748 103 10 0.018507
4 3 2
Figure 4 Graph of the estimated
3 root after Iteration 1.
8.4956 10 9 10
x2 15
2.9870 10 14.557 15 5
14.572
12
2
9/27/2016
x2 14.572
6.0676 10 14.572 14.557
9
14.572
13 14
Advantages
Example 1 Cont.
The absolute relative approximate error a at the end of Iteration 3 is
15
3
9/27/2016
f(x1)
Find the real root of the equation using Newton- Find the real root of the equation using Newton-
Raphson’s Method Raphson’s Method
f(x)= x3 + 4x2 – 1= 0 f(x)= x3 + 4x2 – 1= 0, f′(x) = 3x2 + 4*2x - 0
x 4x 1
3 2
f ( xn )
xn1 xn xn n 2 n
f ( xn ) 3xn 8 x
x0 0.5
x1 0.473684211
x2 0.472834787
x3 0.472833909
x4 0.472833909
4
9/27/2016
The flow rate in a pipe system connecting two reservoirs Newton-Raphson Method: Example
(at different surface elevations) depends on the
characteristics of the pump, the roughness of the pipe,
Class work
the length and diameter of the pipe and the specific
1. Use Newton-Raphson’s Method to find a root of the
gravity of the fluid. For an 800 ft section of 6 in. pipe
equation correct to 2 decimal places.(=0.01)
connecting two reservoirs (with a 5 ft differential in
elevation) containing oil of specific gravity 0.8, with a 6 x3 – 2x – 5 = 0
hp pump, the equation for the flow rate Q is
2. UseNewton-Raphson’s Method to find a root of
the equation correct to 2 decimal places.(=0.01)
12Q3+5Q-40=0 x sin x = - cos x
Approximate the real root of the equation in the interval
0≤Q ≤ 2