8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
1/92
Numerical Methods
N. B. Vyas
Department of Mathematics,Atmiya Institute of Tech. and Science,
Rajkot (Guj.)
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
2/92
Introduction
There are two types of functions: (i) Algebraic function and(ii) Transcendental function
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
3/92
Introduction
There are two types of functions: (i) Algebraic function and
(ii) Transcendental function
An algebraic function is informally a function thatsatisfies a polynomial equation
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
4/92
Introduction
There are two types of functions: (i) Algebraic function and
(ii) Transcendental function
An algebraic function is informally a function thatsatisfies a polynomial equation
A function which is not algebraic is called a transcendental
function.
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
5/92
Introduction
There are two types of functions: (i) Algebraic function and
(ii) Transcendental function
An algebraic function is informally a function thatsatisfies a polynomial equation
A function which is not algebraic is called a transcendental
function.The values of x which satisfy the equation f (x) = 0 arecalled roots of f (x).
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
6/92
Introduction
There are two types of functions: (i) Algebraic function and
(ii) Transcendental function
An algebraic function is informally a function thatsatisfies a polynomial equation
A function which is not algebraic is called a transcendental
function.The values of x which satisfy the equation f (x) = 0 arecalled roots of f (x).
If f (x) is quadratic, cubic or bi-quadratic expression, then
algebraic formulae are available for getting the solution.
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
7/92
Introduction
There are two types of functions: (i) Algebraic function and
(ii) Transcendental function
An algebraic function is informally a function thatsatisfies a polynomial equation
A function which is not algebraic is called a transcendental
function.The values of x which satisfy the equation f (x) = 0 arecalled roots of f (x).
If f (x) is quadratic, cubic or bi-quadratic expression, then
algebraic formulae are available for getting the solution.If f (x) is a higher degree polynomial or transcendentalfunction then algebraic methods are not available.
N.B.V yas−Department of M athematics, AIT S − Rajkot
E
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
8/92
Errors
It is never possible to measure anything exactly.
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
9/92
E
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
10/92
Errors
It is never possible to measure anything exactly.
So in order to make valid conclusions, it is good to make theerror as small as possible.
The result of any physical measurement has two essentialcomponents :
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
11/92
Errors
It is never possible to measure anything exactly.
So in order to make valid conclusions, it is good to make theerror as small as possible.
The result of any physical measurement has two essentialcomponents :
i) A numerical value
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
12/92
Errors
It is never possible to measure anything exactly.
So in order to make valid conclusions, it is good to make theerror as small as possible.
The result of any physical measurement has two essentialcomponents :
i) A numerical value
ii) A degree of uncertainty Or Errors.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
13/92
Errors
Exact Numbers: There are the numbers in which there isno uncertainty and no approximation.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
14/92
Errors
Exact Numbers: There are the numbers in which there isno uncertainty and no approximation.
Approximate Numbers: These are the numbers whichrepresent a certain degree of accuracy but not the exact
value.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
15/92
Errors
Exact Numbers: There are the numbers in which there isno uncertainty and no approximation.
Approximate Numbers: These are the numbers whichrepresent a certain degree of accuracy but not the exact
value.These numbers cannot be represented in terms of finitenumber of digits.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Errors
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
16/92
Errors
Exact Numbers: There are the numbers in which there isno uncertainty and no approximation.
Approximate Numbers: These are the numbers whichrepresent a certain degree of accuracy but not the exact
value.These numbers cannot be represented in terms of finitenumber of digits.
Significant Digits: It refers to the number of digits in a
number excluding leading zeros.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
17/92
Bisection Method
Consider a continuous function f (x).
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
18/92
Bisection Method
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
19/92
Bisection Method
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
20/92
Bisection Method
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
21/92
Bisection Method
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
Now according to Bisection method, bisect the interval [a, b],
x1 = a + b
2 (a < x1 < b).
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
22/92
Bisection Method
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
Now according to Bisection method, bisect the interval [a, b],
x1 = a + b
2 (a < x1 < b).
If f (x1) = 0 then x1 be the root of the given equation.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
23/92
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
Now according to Bisection method, bisect the interval [a, b],
x1 = a + b
2 (a < x1 < b).
If f (x1) = 0 then x1 be the root of the given equation.
Otherwise the root lies between x1 and b if f (x1)
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
24/92
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
Now according to Bisection method, bisect the interval [a, b],
x1 = a + b
2 (a < x1 < b).
If f (x1) = 0 then x1 be the root of the given equation.
Otherwise the root lies between x1 and b if f (x1) 0.Then again bisect this interval to get next point x2.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
25/92
Consider a continuous function f (x).
Numbers a < b such that f (a) and f (b) have opposite signs.
Let f (a) be negative and f (b) be positive for [a, b].
Then there exists at least one point(root), say x, a < x < bsuch that f (x) = 0.
Now according to Bisection method, bisect the interval [a, b],
x1 = a + b
2 (a < x1 < b).
If f (x1) = 0 then x1 be the root of the given equation.
Otherwise the root lies between x1 and b if f (x1) 0.Then again bisect this interval to get next point x2.
Repeat the above procedure to generate x1, x2, . . . till theroot upto desired accuracy is obtained.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
26/92
Characteristics:
1 This method always slowly converge to a root.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
27/92
Characteristics:
1 This method always slowly converge to a root.2 It gives only one root at a time on the the selection of small
interval near the root.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
28/92
Characteristics:
1 This method always slowly converge to a root.2 It gives only one root at a time on the the selection of small
interval near the root.3 In case of the multiple roots of an equation, other initial
interval can be chosen.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Bisection Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
29/92
Characteristics:
1 This method always slowly converge to a root.2 It gives only one root at a time on the the selection of small
interval near the root.3 In case of the multiple roots of an equation, other initial
interval can be chosen.4 Smallest interval must be selected to obtain immediate
convergence to the root, .
N.B.V yas−Department of M athematics, AIT S − Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
30/92
Bisection Method- Example
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
31/92
Sol. Let f (x) = x3 − x − 1 = 0
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Bisection Method- Example
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
32/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) =
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Bisection Method- Example
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
33/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
34/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
35/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
36/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
37/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
38/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
39/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
40/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
41/92
Sol. Let f (x) = x3 − x − 1 = 0
f (0) = −1
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
42/92
Ex. Find real root of x3 − 4x + 1 = 0 correct upto four
decimal places using Bisection method
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Bisection Method- Example
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
43/92
Ex. Find real root of x2 − lnx − 12 = 0 correct upto
three decimal places using Bisection method
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
44/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
G hi l d i i f h M h d
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
45/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
G hi l d i ti f th M th d
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
46/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
G hi l d i ti f th M th d
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
47/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
G hi l d i ti f th M th d
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
48/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
Now ∠ACB = α, tanα = AB
AC
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
Graphical derivation of the Method:
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
49/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
Now ∠ACB = α, tanα = AB
AC
∴ f (x0) = f (x0)
x0 − x1
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
Graphical derivation of the Method:
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
50/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
Now ∠ACB = α, tanα = AB
AC
∴ f (x0) = f (x0)
x0 − x1
∴ x0 − x1 = f (x0
f
(x0)
⇒ x0 − f (x0
f
(x0)
= x1
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)
Graphical derivation of the Method:
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
51/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
Now ∠ACB = α, tanα = AB
AC
∴ f (x0) = f (x0)
x0 − x1
∴ x0 − x1 = f (x0
f
(x0)
⇒ x0 − f (x0
f
(x0)
= x1
∴ x1 = x0 − f (x0)
f (x0)
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Newton-Raphson Method(N-R Method)Graphical derivation of the Method:
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
52/92
Graphical derivation of the Method:
Consider the portion of the graph y = f (x) which crossesX − axis at R corresponding to the equation f (x) = 0.
Let B be the point on the curve corresponding to the initialguess x0 at A.
The tangent at B cuts the X − axis at C which gives firstapproximation x1. Thus AB = f (x0) and AC = x0 − x1
Now ∠ACB = α, tanα = AB
AC
∴ f (x0) = f (x0)
x0 − x1
∴ x0 − x1 = f (x0
f
(x0)
⇒ x0 − f (x0
f
(x0)
= x1
∴ x1 = x0 − f (x0)
f (x0)
In general xn+1 = xn − f (xn)
f (xn); where n = 0, 1, 2, 3, . . .
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
53/92
Derivation of the Newton-
Raphson method. f(x)
f x0 B
y= f(x)
AC
AB=)α tan(
x1 x0
XC AαR
01 0
0
( )
( )
f x x x
f x
= −
′
00
0 1
( )'( )
f x f x
x x=
−
4
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
54/92
Newton-Raphson method
x
f(x)
1n nn x = x - f (x )+ ′
x0
f(x1)
x2 x1 x0 X
( )0, 0 x f x
α
3
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method:
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
55/92
Advantages:
Converges Fast (if it converges).
Requires only one guess.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Drawbacks:Divergence at inflection point.
S l ti f th i iti l it ti l f th t th t
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
56/92
Selection of the initial guess or an iteration value of the root thatis close to the inflection point of the function f (x) may start
diverging away from the root in the Newton-Raphson method.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method:(Drawbacks)
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
57/92
Division by zero
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method:(Drawbacks)
Results obtained from the N-R method may oscillate about
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
58/92
Results obtained from the N R method may oscillate aboutthe local maximum or minimum without converging on aroot but converging on the local maximum or minimum.
For example for f (x) = x2 + 2 = 0 the equation has no real roots.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method:(Drawbacks)
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
59/92
Root Jumping
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
60/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
61/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
Let f (x) = xq −N
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
62/92
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
63/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
Let f (x) = xq −N
∴ f (x) = qxq−1
Now by N-R method, xn+1 = xn − f (xn)
f (xn) = xn −
(xn)q −N
q (xn)q−1
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
64/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
Let f (x) = xq −N
∴ f (x) = qxq−1
Now by N-R method, xn+1 = xn − f (xn)
f (xn) = xn −
(xn)q −N
q (xn)q−1
= xn − 1
q xn +
N
q (xn)q−1
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
65/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
Let f (x) = xq −N
∴ f (x) = qxq−1
Now by N-R method, xn+1 = xn − f (xn)
f (xn) = xn −
(xn)q −N
q (xn)q−1
= xn − 1
q xn +
N
q (xn)q−1
xn+1 =
1
q
(q − 1)
xn +
N
(xn)q−1
; n
= 0,
1,
2, . . .
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
66/92
Iterative formula for finding q th root:
xq −N = 0 i.e. x = N 1q
Let f (x) = xq −N
∴ f (x) = qxq−1
Now by N-R method, xn+1 = xn − f (xn)
f (xn) = xn −
(xn)q −N
q (xn)q−1
= xn − 1
q xn +
N
q (xn)q−1
xn+1 =
1
q
(q −
1)xn +
N
(xn)q−1
; n
= 0,
1,
2, . . .
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
N-R Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
67/92
Iterative formula for finding reciprocal of a positive number
N :
x = 1
N
i.e. 1
x
−N = 0
Let f (x) = 1
x −N
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
68/92
In N R method two functions f and f are required to beevaluate per step.
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
69/92
In N R method two functions f and f are required to beevaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
N.B.V yas−
Department of M athematics, AIT S−
Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
70/92
R f f qevaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
Often it requires a very good initial guess.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
71/92
f f qevaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
Often it requires a very good initial guess.
To overcome these drawbacks, the derivative of f of the function
f is approximated as f
(xn) = f (xn−1) − f (xn)
xn−1 − xn
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
72/92
f f qevaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
Often it requires a very good initial guess.
To overcome these drawbacks, the derivative of f of the function
f is approximated as f
(xn) = f (xn−1) − f (xn)
xn−1 − xnTherefore formula of N-R method becomes
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
73/92
f f
evaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
Often it requires a very good initial guess.
To overcome these drawbacks, the derivative of f of the function
f is approximated as f
(xn) = f (xn−1) − f (xn)
xn−1 − xnTherefore formula of N-R method becomes
xn+1 = xn − f (xn)
f (xn−1)−f (xn)
xn−1−xn
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
In N-R method two functions f and f are required to be
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
74/92
evaluate per step.
Also it requires to evaluate derivative of f and sometimes it isvery complicated to evaluate f .
Often it requires a very good initial guess.
To overcome these drawbacks, the derivative of f of the function
f is approximated as f
(xn) = f (xn−1) − f (xn)
xn−1 − xnTherefore formula of N-R method becomes
xn+1 = xn − f (xn)
f (xn−1)−f (xn)
xn−1−xn ∴ xn+1 = xn − f (xn)
xn−1 − xn
f (xn−1) − f (xn)
where n = 1, 2, 3, . . ., f (xn−1) = f (xn)
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
75/92
This method requires two initial guesses
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
76/92
This method requires two initial guesses
The two initial guesses do not need to bracket the root of the
equation, so it is not classified as a bracketing method.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
77/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
78/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
Draw the straight line through the points (xn, f (xn)) and(xn−1, f (xn−1))
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
79/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
Draw the straight line through the points (xn, f (xn)) and(xn−1, f (xn−1))
Take the x−coordinate of intersection with X −axis as xn+1
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
80/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
Draw the straight line through the points (xn, f (xn)) and(xn−1, f (xn−1))
Take the x−coordinate of intersection with X −axis as xn+1
From the figure ABE and DCE are similar triangles.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
81/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
Draw the straight line through the points (xn, f (xn)) and(xn−1, f (xn−1))
Take the x−coordinate of intersection with X −axis as xn+1
From the figure ABE and DCE are similar triangles.
Hence AB
DC =
AE
DE ⇒
f (xn)
f (xn−1) =
xn − xn+1
xn−1 − xn+1
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
82/92
Geometrical interpretation of Secant Method:
Consider a continuous function y = f (x)
Draw the straight line through the points (xn, f (xn)) and(xn−1, f (xn−1))
Take the x−coordinate of intersection with X −axis as xn+1
From the figure ABE and DCE are similar triangles.
Hence AB
DC =
AE
DE ⇒
f (xn)
f (xn−1) =
xn − xn+1
xn−1 − xn+1
∴ xn+1 = xn − f (xn) xn−1 − xn
f (xn−1) − f (xn)
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
83/92
NOTE:
Do not combine the secant formula and write it in the form asfollows because it has enormous loss of significance errors
xn+1 = xnf (xn−1) − xn−1f (xn)f (xn−1) − f (xn)
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
84/92
General Features:
The secant method is an open method and may not converge.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
85/92
General Features:
The secant method is an open method and may not converge.
It requires fewer function evaluations.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
86/92
General Features:
The secant method is an open method and may not converge.
It requires fewer function evaluations.
In some problems the secant method will work when Newton’smethod does not and vice-versa.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
87/92
General Features:
The secant method is an open method and may not converge.
It requires fewer function evaluations.
In some problems the secant method will work when Newton’smethod does not and vice-versa.
The method is usually a bit slower than Newton’s method. It ismore rapidly convergent than the bisection method.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
G l F
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
88/92
General Features:
The secant method is an open method and may not converge.
It requires fewer function evaluations.
In some problems the secant method will work when Newton’smethod does not and vice-versa.
The method is usually a bit slower than Newton’s method. It ismore rapidly convergent than the bisection method.
This method does not require use of the derivative of thefunction.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
G l F t
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
89/92
General Features:
The secant method is an open method and may not converge.
It requires fewer function evaluations.
In some problems the secant method will work when Newton’smethod does not and vice-versa.
The method is usually a bit slower than Newton’s method. It ismore rapidly convergent than the bisection method.
This method does not require use of the derivative of thefunction.
This method requires only one function evaluation per iteration.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
90/92
Disadvantages:
There is no guaranteed error bound for the computed value.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
91/92
Disadvantages:
There is no guaranteed error bound for the computed value.
It is likely to difficulty of f (x) = 0. This means X −axis is
tangent to the graph of y = f (x)
N.B.V yas−Department of M athematics, AIT S − Rajkot
Secant Method
8/20/2019 Dr. Nirav Vyas numerical method 1.pdf
92/92
Disadvantages:
There is no guaranteed error bound for the computed value.
It is likely to difficulty of f (x) = 0. This means X −axis is
tangent to the graph of y = f (x)Method may converge very slowly or not at all.
N.B.V yas−Department of M athematics, AIT S − Rajkot
Top Related