2.3 FalsePosition+Secant
2.3 FalsePosition+Secant
Institute of Engineering,
Tribhuvan University, Nepal 1
Method of False Position
(Regula Falsi Method)
Method of False Position (Regula Falsi)
f(b)
a c
f(a) b
x 2
Method of False Position (Regula Falsi)
f(b)
a c
f(a) b
x 2
Method of False Position (Regula Falsi)
a c
f(a) b
x 2
Method of False Position (Regula Falsi)
• Despite of deciding the new sub-interval using the Intermediate Value Theorem, it
can be observed that one of the brackets might remain fixed mostly, resulting in
slow convergence.
6
Problem with False Position Method
• Despite of deciding the new sub-interval using the Intermediate Value Theorem, it
can be observed that one of the brackets might remain fixed mostly, resulting in
slow convergence.
• Convergence rate can be improved by taking the latest two x-values to compute
the next approximation, completely avoiding the intermediate value theorem - the
Secant method.
6
Problem with False Position Method
• Despite of deciding the new sub-interval using the Intermediate Value Theorem, it
can be observed that one of the brackets might remain fixed mostly, resulting in
slow convergence.
• Convergence rate can be improved by taking the latest two x-values to compute
the next approximation, completely avoiding the intermediate value theorem - the
Secant method.
• This improves the convergence rate, however, at the cost of reliability.
6
Secant Method
Secant Method
7
Secant Method
x2 x3
x0 x1
8
Secant Method
x2 x3
x4 x0 x1
9
Secant Method
x2 x3
x4 x0 x1
10
Secant Method
f(x1)
f(x0)
f(x)
x2
x0 x1
x
Given x0 , x1 ⇒ x2 = ?
11
Secant Method
f (x0 )
=
x0 − x2
f(x1) Also,
f (x1 )
f(x0) =
x1 − x2
f(x)
x2
x0 x1
x
Given x0 , x1 ⇒ x2 = ?
11
Secant Method
f (x0 )
=
x0 − x2
f(x1) Also,
f (x1 )
f(x0) =
x1 − x2
f(x)
x2 f (x0 ) f (x1 )
i.e., =
x0 x1 x0 − x2 x1 − x2
x
Given x0 , x1 ⇒ x2 = ?
11
Secant Method
f (x0 )
=
x0 − x2
f(x1) Also,
f (x1 )
f(x0) =
x1 − x2
f(x)
x2 f (x0 ) f (x1 )
i.e., =
x0 x1 x0 − x2 x1 − x2
f (x0 )
=
x0 − x2
f(x1) Also,
f (x1 )
f(x0) =
x1 − x2
f(x)
x2 f (x0 ) f (x1 )
i.e., =
x0 x1 x0 − x2 x1 − x2
Similarly,
x1 f (x2 ) − x2 f (x1 )
x3 =
f (x2 ) − f (x1 )
In General,
x2 x3
xi−1 f (xi ) − xi f (xi−1 )
x0 x1 xi+1 =
f (xi ) − f (xi−1 )
f(x2) or,
af (b) − bf (a)
c=
f (b) − f (a)
x where,
a = xi−1 b = xi c = xi+1
12
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
Let the initial interval be
(x0 , x1 ) = (a, b) = (1.5, 1.7)
Secant formula:
af (b) − bf (a)
c=
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
(x0 , x1 ) = (a, b) = (1.5, 1.7)
Secant formula:
af (b) − bf (a)
c=
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
2 1.7 1.200093 1.143058 0.046251
(x0 , x1 ) = (a, b) = (1.5, 1.7)
Secant formula:
af (b) − bf (a)
c=
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
2 1.7 1.200093 1.143058 0.046251
(x0 , x1 ) = (a, b) = (1.5, 1.7)
3 1.200093 1.143058 1.130268 0.001013
Secant formula:
af (b) − bf (a)
c=
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
2 1.7 1.200093 1.143058 0.046251
(x0 , x1 ) = (a, b) = (1.5, 1.7)
3 1.200093 1.143058 1.130268 0.001013
Secant formula:
4 1.143058 1.130268 1.129982 5 × 10−6
af (b) − bf (a)
c=
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
2 1.7 1.200093 1.143058 0.046251
(x0 , x1 ) = (a, b) = (1.5, 1.7)
3 1.200093 1.143058 1.130268 0.001013
Secant formula:
4 1.143058 1.130268 1.129982 5 × 10−6
af (b) − bf (a)
c= 5 1.130268 1.129982 1.12998 −2 × 10−6
f (b) − f (a)
13
Example
Find a real root of ex + sin(x) − 4 = 0 correct to 5 decimals using the Secant Method.
Here, Calculation Table:
f (x) = ex + sin(x) − 4
i a b c f (c)
f (1) = −0.4402 (-ve)
[xi−1 ] [xi ] [xi+1 ]
f (2) = 4.2984 (+ve)
1 1.5 1.7 1.200093 0.252498
Let the initial interval be
2 1.7 1.200093 1.143058 0.046251
(x0 , x1 ) = (a, b) = (1.5, 1.7)
3 1.200093 1.143058 1.130268 0.001013
Secant formula:
4 1.143058 1.130268 1.129982 5 × 10−6
af (b) − bf (a)
c= 5 1.130268 1.129982 1.12998 −2 × 10−6
f (b) − f (a)
∵ |f (1.12998)| < 0.000005
∴ a root of the required accuracy = 1.12998
13
Rate of Convergence
εn+1 ∝ εnk
where, √
1+ 5
k= = 1.618 (Golden Ratio)
2
• Super-linear convergence
• Much more faster than Bisection Method (linear convergence)
• Almost comparable to that of Newton-Raphson Method (quadratic convergence)
14
Assignments