15mat301 O7
15mat301 O7
GBM
Introduction
GBM
Bisection Method
GBM
Bisection Method
Find two points a, b ∈ R such that f 0 (a) > 0 and f 0 (b) < 0.
Then choose the region as (a, b)
Algorithm:
Step:1 Choose two points a and b such that f 0 (a) > 0 and
f 0 (b) < 0. Also choose a small number . Set x1 = a and x2 = b.
Step:2 Calculate z = (x2 + x1 )/2 and evaluate f 0 (z).
Step:3 If |f 0 (z)| ≤ , Terminate;
Else if f 0 (z) < 0 set x1 = z and go to Step 2; Else if f 0 (z) > 0 set
x2 = z and go to Step 2.
Continue the process until |f 0 (z)| <
GBM
Bisection Method
GBM
Bisection Method
GBM
Newton Raphson Method
GBM
Newton Raphson Method
f 0 (x (k) )
x (k+1) = x (k) − . (1)
f 00 (x (k) )
2 Make a initial guess x (1) and choose a small value for . Set
k = 1. Compute f 0 (x (k) )
3 compute f 00 (x (k) )
f 0 (x (k) )
4 Calculate x (k+1) = x (k) − f 00 (x (k ) )
5 If |f 0 (x (k+1) )| < , Terminate;
Else set k = k + 1 and go to step 2
Convergence of algorithm depends mainly on the initial guess we
made and the nature of the objective function.
GBM
Newton Raphson Method
GBM
Newton Raphson Method
GBM
Example
Example
54
Find the minimum for the function f (x) = x 2 + x , where
x (1) = 1, = 10−3
Step:1
Let k = 1, Now, we are going to compute f 0 (x (k ) ) using equation 2
and the increment ∆x (k) as in equation4.
Here, x (1) = 1, ∆x (1) = 0.01 × 1 = 0.01
f (x (1) +∆x (1) )−f (x (1) −∆x (1) )
substitute everything in f 0 (x (1) ) = 2∆x (1)
, we get,
f (1.01) − f (0.99)
f 0 (x (1) ) =
2 × 0.01
54.48544 − 55.52554
=
0.02
= −52.005
GBM
Example
step:2
Using equation 3, calculate f 00 (x (1) ).
GBM
Example
step:3
Now, compute
f 0 (x (1) )
x (2) = x (1) − ,
f 00 (x (1) )
−52.005
=1−
110.011
= 1.473
GBM
Secant Method
f 0 (x2 )
z = x2 − (5)
f 0 (x2 ) − f 0 (x1 )/(x2 − x1 )
GBM
Secant Method
In this method, in one iteration more than half of the search space may
get eliminated or smaller than half of the search space may also be get
eliminated in some iteration.
Everything depends on the derivatives of the corresponding boundary
points.
The Algorithm for this method is same as Bisection method only the
difference is step:2, instead of choosing midpoint, new point is
calculated using equation 5
GBM
Secant Method
Find two points a, b ∈ R such that f 0 (a) > 0 and f 0 (b) < 0.
Then choose the region as (a, b)
Algorithm:
Step:1 Choose two points a and b such that f 0 (a) > 0 and
f 0 (b) < 0. Also choose a small number . Set x1 = a and x2 = b.
f 0 (x2 )
Step:2 Calculate z = x2 − 0 and evaluate
f (x2 ) − f 0 (x1 )/(x2 − x1 )
f 0 (z).
Step:3 If |f 0 (z)| ≤ , Terminate;
Else if f 0 (z) < 0 set x1 = z and go to Step 2; Else if f 0 (z) > 0 set
x2 = z and go to Step 2.
Continue the process until |f 0 (z)| <
GBM
Secant Method
GBM
Newton Raphson Method
GBM
Secant Method
GBM
THANK YOU
GBM