SlideShare a Scribd company logo
1 of 69
Download to read offline
Algebraic and Transcendental Equations
2
▪ A frequently occurring problem is to find the roots of
equations of the form f(x) = 0.
▪ If f(x) is a polynomial of higher degree or an expression
involving transcendental functions (e.g. 1 + cos x – 5x),
then algebraic methods are not available.
Roots of an equation
3
▪ Different approaches to solve these equations:
▪ Bisection Method
▪ Method of False Position
▪ Newton-Raphson Method
▪ Iteration Method
Note : For a polynomial presented by f(x) = anxn + an-1xn-1 + ….+ a1 + a0, the
largest possible root is given by x* = - an-1/an. ( E. Balaguruswamy)
Roots of an equation
4
Theorem:
If f(x) = 0,
▪ A function f(x) is continuous between two points a and b,
▪ f(a) and f(b) are of opposite sign,
▪ Then, there exists at least one real root or an odd
number of real roots of f(x) between a and b (i.e., where
f(x) intersects the x-axis, since f(x) = 0).
Roots of an equation
5
f(b) is positive
f(a) negative
The root of this equation
f(x) is continuous between xa and xb
6
What might go Wrong?
Tangent point: very difficult
to find
Singularity : brackets don’t
surround root
Pathological case: infinite number
of roots – e.g. sin(1/x)
Roots of an equation
7
If function f(x) in f(x)=0 does not change sign between two
points, roots may still exist between the two points.
x
f(x)
xu
x
Roots of an equation
8
x
f(x)
xu
x
If the function f(x) in f(x)=0 does not change sign between
two points, there may not be any roots between the two
points.
x
f(x)
xu
x
Roots of an equation
9
If the function f(x) in f(x)=0 changes sign between two points,
more than one root may exist between the two points.
x
f(x)
xu
x
Roots of an equation
10
If the function f(x) is not continuous between a and b, but f(a)
and f(b) has opposite signs, then there may not exist any root
between a and b.
f(x)
x
( )
x
x
f
1
=
Roots of an equation
11
• Let f(a) and f(b) has opposite signs.
• Find xc = (a+b)/2.
• If f(xc) = 0, then xc is the root of the equation.
• Otherwise, the root lies between
• a and xc [if a and xc has opposite signs], or
• xc and b [if xc and b has opposite signs].
• We continue this process until we find the root (i.e., xc = 0), or
the latest interval is smaller than some specified tolerance.
Bisection Method
12
Bisection Method
f(b) is positive
f(a) negative
xc= (a+b)/2
What will be the next interval?
f(c) negative
Bisection Method
➢ After a root of f (x) = 0 has been bracketed in the interval (a, b).
➢ Suppose that f (x) is continuous on an interval a ≤ x ≤ b and that
f (a) f (b) < 0.
➢ When this is the case, f (x) will have opposite signs at the end points
of the interval (a, b).
➢ As shown in Fig. 3.1 (a) and (b), if f (x) is continuous and has a
solution between the points x = a and x = b, then either f (a) > 0 and f
(b) < 0 or f (a) < 0 and f (b) > 0.
Algorithm for the Bisection Method
1. Compute the first estimate of the numerical solution xs1 by
2. Determine whether the true solution is between a and xs1 or between
xs1 and b by checking the sign of the product f (a) f(xs1)
➢If f (a) f ( xs1 ) < 0, the true solution is between a and xs1.
➢If f (a) f ( xs1) > 0, the true solution is between xs1 and b.
➢If b – c ≤ ∈, then accept c as the root and stop. ∈ is the error
tolerance, ∈ > 0.
3. Choose the subinterval that contains the true solution (a to xs1 or xs1
to b) as the new interval (a, b) and go back to step 1.
4. Steps 1 through 3 are repeated until a specified tolerance or error
bound is attained
Example 1
➢Use the Bisection method to find a root of the equation x3 –
4x – 8.95 = 0 accurate to three decimal places using the
Bisection method.
➢Solution:
➢ Here, f (x) = x3 – 4x – 8.95 = 0
➢ f (2) = 23 – 4(2) – 8.95 = – 8.95 < 0
➢ f (3) = 33 – 4(3) – 8.95 = 6.05 > 0
➢ Hence, a root lies between 2 and 3.
➢ f ' (x) = 3x2 – 4 > 0 for x in the interval (2, 3). Hence, we have a = 2
and b = 3. The results of the algorithm for Bisection method are shown
in Table E3.1.
Hence the root is 2.711 accurate to three decimal places
19
➢Example .2
➢ Find one root of ex – 3x = 0 correct to two decimal places using the
method of Bisection.
➢ Solution:
➢Here, f (x) = ex – 3x
➢ f(1.5) = e1.5 – 3(1.5) = –0.01831
➢ f (1.6) = e1.6 – 3(1.6) = 0.15303
➢f '(x) = ex – 3 > 0 for x in the interval (1.5, 1.6). Hence, a root lies in the
interval (1.5, 1.6). Therefore, here we have a = 1.5 and b = 1.6. The
results of the algorithm for Bisection method are shown in Table .2.
20
Hence the root of f (x) = 0 is x = 1.51 accurate up to two decimal places.
Error estimation
➢At each stage the length of the interval is halved, so the
maximum possible error is reduced by a factor of one half.
➢If a and b denote the ends of the original interval that
brackets the root(zer0), then the error at stage k is at most
(b-a)/2k.
➢Order of convergence for bisection method is linear with
rate of convergence as 1/2.
CONVERGENCE OF BISECTION METHOD
➢ In Bisection method, the interval containing the root is reduced by a
factor of 2 in each iteration.
➢ After n iterations, the interval containing the root is reduced to the size
➢ The root must lie within ± Δx/2n of our estimate after n iterations.
➢ The error decreases linearly with each step by a factor of 0.5. The
bisection method is, therefore, linearly convergent.
n
n
x
x
x
2
2
1
2 
=
−
2
2
2
1
1
n
n
n
n
n
E
x
E
x
E
=

=

=
+
+
Method of False Position
➢The method of False Position (also called the Regular False
method, and the linear interpolation method) is another well-
known bracketing method.
➢Rather than bisecting the interval (a, b), it locates the root by
joining f (a) and f (b) with a straight line.
➢The intersection of this line with the x-axis represents an
improved estimate of the root.
➢We assume that within a given interval (a, b), f (x) is continuous
and the equation has a solution.
2/18/2023 25
The Method of False Position
▪ This method consists in replacing the part of
the curve between the points (xa, f(xa)) and
(xb, f(xb)).
▪ The equation of the chord joining the two
points (xa , f(xa)) and (xb , f(xb)) is
▪
▪It takes the point of intersection of the chord
with the x-axis as an approximation to the
root (here, x1).
(xa, f(xa))
(xb, f(xb))
a
b
a
b
a
a
x
x
x
f
x
f
x
x
x
f
y
−
−
=
−
− )
(
)
(
)
(
(x1, f(x1))
2/18/2023 26
The Method of False Position
▪ The point of intersection in the present case
is given by putting y = 0 in the equation
▪ Thus we obtain
▪ Hence, the approximate root is
a
b
a
b
a
a
x
x
x
f
x
f
x
x
x
f
y
−
−
=
−
− )
(
)
(
)
(
)
(
)
(
)
(
)
(
a
b
a
b
a
a x
x
x
f
x
f
x
f
x
x −
−
−
=
)
(
)
(
)
(
)
(
1 a
b
a
b
a
a x
x
x
f
x
f
x
f
x
x −
−
−
=
2/18/2023 27
The Method of False Position : Geometric Significance
Here, for  PMS and  PRQ
▪ MS/MP = RQ/RP
▪ (x1 – xa)/f(xa) = (xb – xa) /(f(xb)+- f(xa))
▪ X1 – xa = f(xa)(xb– xa) /(f(xa)+(- f(xb)))
▪ x1 = xa - f(xa)(xb– xa) /(f(xb) - f(xa))
P
R
Q
M S
xa xb
x1
f(x)
Algorithm for the Method of False Position
1. Define the first interval (a, b) such that solution exists between them. Check
f (a) f (b) < 0.
2. Compute the first estimate of the solution xs
3. Find out whether the actual solution is between a and x or between x and b.
This is accomplished by checking the sign of the product f (a) f(xs).
➢If f(a) f(xs) < 0, the solution is between a and xs
➢If f(a) f(xs) > 0, the solution is between xs and b
4. Select the subinterval that contains the solution (a to x, or x to b) is the new
interval (a, b) and go back to step 2. Step 2 through 4 are repeated until a
specified tolerance or error bound is attained.
5. The method of False Position always converges to an answer, provided a root
is bracketed in the interval (a, b).
Convergence of False Position Method
➢ This method is based on linear interpolation model. Assume that the
initial points bracketing the solution are a and b and a moves towards
the solution and b is fixed.
➢ Let x1= a and xr be the solution.
➢Then, e1 = xr – x1 and e2 = xr – x2
➢That is, ei = xr - xi
➢It can be shown that
➢Where R is some point in the interval xi and b.
➢It shows that the process of iteration converges linearly.
( ) ( )
( )
R
f
R
f
b
x
e
e r
r
i
'
"
*
1
−
=
+
Using the False Position method, find a root of the function f (x) = e – 3x2 to an
accuracy of 5 digits. The root is known to lie between 0.5 and 1.0.
Solution:
We apply the method of False Position with a = 0.5 and b = 1.0.
Example 3
The root is 0.91 accurate to five digits
Example 4
Find a real root of cosx – 3x + 5 = 0. Correct to four decimal places using
the method of False Position method.
Solution:
Therefore, a root of f (x) = 0 lies between 0 and π/2. We apply the method of
False Position with a = 0 and b = π/2.
The root is 1.6427 accurate to four decimal places.
Newton – Raphson Method
➢The Newton-Raphson method is the best-known method of
finding roots of a function f (x).
➢The method is simple and fast. One drawback of this method
is that it uses the derivative f'(x) of the function as well as the
function f (x) itself.
➢ Hence, the Newton-Raphson method is usable only in
problems where f'(x) can be readily computed.
➢Here, again we assume that f(x) is continuous and
differentiable and the equation is known to have a solution
near a given point.
➢ Figure illustrates the procedure used in Newton-Raphson
method.
➢ The solution process starts by selecting point x as the first
estimate of the solution.
The iterations are stopped when the estimated relative error is smaller
than a specified value ∈.
The Newton-Raphson method, when successful, works well and
converges fast.
➢ Convergence problems occur when the value of f '(x) is close to
zero in the vicinity of the solution, where f (x) = 0.
➢ Newton-Raphson method generally converges when f (x), f ' (x)
and f "(x) are all continuous, if f '(x) is not zero at the solution and
if the starting value x is near the actual solution.
f(x)
f(xi)
xi+1 xi
X
B
C A

)
(
)
(
1
i
i
i
i
x
f
x
f
x
x

−
=
+
1
)
(
)
(
'
+
−
=
i
i
i
i
x
x
x
f
x
f
AC
AB
=
)

tan(
Newton-Raphson method. 35
http://numericalmethods.eng.usf.edu
Newton – Raphson Method - graphical
36
http://numericalmethods.eng.usf.edu
Newton – Raphson Method – Taylor Series
f(xi+h) = f(xi) + h f’(xi) +( 1/2!) (h2 f”(xi)) + (1/3! )(h3 f”’(xi)) + …..
If xi is the approximation then f(xi+h) is given by above expression through Taylor
series.
Since we are finding the roots of the function(equation), f(xi+h) = 0
Therefore,
0 = f(xi) + h f’(xi) + 1/2! (h2 f”(xi)) + 1/3! (h3 f”’(xi)) + …..
Neglecting higher order terms starting from quadratic terms,
0 = f(xi) + h f’(xi) + …..
Which gives, h = -f(xi)/f’(xi)
Thus, the next approximate root will be, Xi+1 = Xi +h,
Or, Xi+1 = Xi - f(xi)/f’(xi)
Note: The term neglected also shows that the convergence is quadratic. Further, another
formulation can also be done by neglecting cubic terms, will give a quadratic equation
for h, if f(x), f’(x), f”(x) is known near the root. This formulation is given by
Chebyshev……
Convergence of Newton-Raphson Method
The Newton-Raphson iteration formula is given by
The general form of above Eq. is given by
Here
…..1
…..2
..…3
Hence
or
….4
…..5
Hence, Newton-Raphson’s method converges if
or
….6
….7
➢If α denotes the actual root of f (x) = 0, then we can select a small
interval in which f (x), f ′(x) and f ″(x) are all continuous and the
condition given by Eq.7 is satisfied.
➢ Therefore, Newton-Raphson method always converges provided the
initial approximation X0 is taken very close to the actual root α.
Example 5
Use Newton-Raphson method to find the real root near 2 of the
equation x4 – 11x + 8 = 0 accurate to five decimal places
Solution:
Here
and
Therefore,
Hence the root of the equation is 1.89188.
Example 6
Using Newton-Raphson method, find a root of the function f (x) =
ex – 3x2 to an accuracy of 5 digits. The root is known to lie between
0.5 and 1.0. Take the starting value of x as x0 = 1.0.
Solution:
Start at x0 = 1.0 and prepare a table as shown in Table, where f (x)
= ex – 3x2 and f '(x) = ex –6x. The relative error
The Newton-Raphson iteration method is given by
43
Newton-Raphson Method
Use the slope of f(x) to
predict the location of the
root.
xi+1 is the point where the
tangent at xi intersects x-
axis.
)
(
'
)
(
0
)
(
)
(
' 1
1 i
i
i
i
i
i
i
i
x
f
x
f
x
x
x
x
x
f
x
f −
=

−
−
= +
+
44
Error Analysis of Newton-Raphson Method
By definition
)
2
(
)
1
(
1
1 +
+ −
=
−
=
i
i
i
i
x
E
x
E


Newton-Raphson method
)
3
(
)
)(
(
'
)
)(
(
'
)
(
)
)(
(
'
)
)(
(
'
)
(
)
)(
(
'
)
(
)
(
'
)
(
1
1
1
1
+
+
+
+
−
=
−
+

−
=
−
+

−
=

−
=
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
x
x
f
x
x
f
x
f
x
x
f
x
x
f
x
f
x
x
x
f
x
f
x
f
x
f
x
x


(if α is the true value)
45
Suppose α is the true value (i.e., f(α) = 0).
Using Taylor's series
Error Analysis of Newton-Raphson Method
2
2
1
2
1
2
1
2
2
)
(
'
2
)
(
"
)
(
'
2
)
(
"
))
2
(
and
)
1
(
from
(
)
(
2
)
(
"
)
)(
(
'
0
))
3
(
from
(
)
(
2
)
(
"
)
)(
(
'
0
)
(
2
)
(
"
)
)(
(
'
)
(
0
)
(
2
)
(
"
)
)(
(
'
)
(
)
(
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
E
f
f
x
f
c
f
E
E
c
f
E
x
f
x
c
f
x
x
f
x
c
f
x
x
f
x
f
x
c
f
x
x
f
x
f
f










−

−
=

+
=

−
+
−
=

−
+
−
+
=

−
+
−
+
=
+
+
+
When xi and α are very close to each
other, c is between xi and α.
The iterative process is said to be of second order.
Mean Value theorem
truncates Taylor series
46
Error Analysis of the Newton-Raphson Method
Each error is approximately proportional to the square of the previous error. It
means that the number of correct decimal places roughly doubles with each
approximation.
Example: Find the root of f(x) = e-x - x = 0
(Ans: α= 0.56714329)
1
1
−
−
−
−
= −
−
+ i
i
x
i
x
i
i
e
x
e
x
x
Error Analysis :
56714329
.
0
)
(
"
56714329
.
1
1
)
(
'
=
=
−
=
−
−
=
−
−




e
f
e
f
47
Error Analysis
2
2
2
1
18095
.
0
)
56714329
.
1
(
2
56714329
.
0
)
(
'
2
)
(
"
i
i
i
i
E
E
E
f
f
E
−
=
−


+


i xi εt (%) |Ei| estimated |Ei+1|
0 0 100 0.56714329 0.0582
1 0.500000000 11.8 0.06714329 0.008158
2 0.566311003 0.147 0.0008323 0.000000125
3 0.567143165 0.0000220 0.000000125 2.83x10-15
4 0.567143290 < 10-8
48
Pitfalls of the Newton-Raphson Method
• Sometimes slow
iteration xi
0 0.5
1 51.65
2 46.485
3 41.8365
4 37.65285
5 33.8877565
… …
40
41
42
43
1.002316024
1.000023934
1.000000003
1.000000000
1
)
( 10
−
= x
x
f
49
Pitfalls of the Newton-Raphson Method
Figure (a)
An inflection point (f"(x)=0) at
the vicinity of a root causes
divergence.
Figure (b)
A local maximum or minimum
causes oscillations.
Note: In case of a graph of a function, inflection point is a point where the function
changes from being concave to convex, or vice versa.
For example, if the curve is the graph of a function y = f(x), of differentiability class C2,
this means that the second derivative of f vanishes and changes sign at the point.
50
Pitfalls of the Newton-Raphson Method
Figure (c)
It may jump from one location
close to one root to a location
that is several roots away.
Figure (d)
A zero slope causes division by
zero.
51
Fixed Point Iteration
• Also known as one-point iteration or successive substitution.
• To find the root for f(x) = 0, we reformulated f(x) = 0 so that there is an
x on one side of the equation.
• f(x) = 0 g(x) = x
• If we can solve g(x) = x, we solve f(x) = 0.
• x is known as the fixed point of g(x).
• We solve g(x) = x by computing
• xi+1 = g(xi) with x0 given
• until xi+1 converges to x.
52
Example
Find root of f(x) = e-x - x = 0.
(Answer: α= 0.56714329).
As per the method,
We formulate f(x) = e-x - x = 0 as
xi+1 = e-x
i
i xi εa (%) εt (%)
0 0 100.0
1 1.000000 100.0 76.3
2 0.367879 171.8 35.1
3 0.692201 46.9 22.1
4 0.500473 38.3 11.8
5 0.606244 17.4 6.89
6 0.545396 11.2 3.83
7 0.579612 5.90 2.20
8 0.560115 3.48 1.24
9 0.571143 1.93 0.705
10 0.564879 1.11 0.399
53
Graphical Representation of fixed point iteration
The point, x, where the two
curves,
f1(x) = x and
f2(x) = g(x),
intersect is the solution to
f(x) = 0.
54
Fixed Point Iteration – Convergence?
2
3
)
(
2
3
3
2
0
3
2
2
2
2
2
−
=

−
=

−
=

=
−
−
x
x
g
x
x
x
x
x
x
2
3
)
(
2
3
0
3
)
2
(
0
3
2
2
−
=

−
=

=
−
−

=
−
−
x
x
g
x
x
x
x
x
x
3
2
)
(
3
2
3
2
0
3
2
2
2
+
=

+
=

+
=

=
−
−
x
x
g
x
x
x
x
x
x
• There are number of ways to construct g(x) from f(x).
• For example, f(x) = x2 – 2x - 3 = 0
So which one is better?
(ans: x = 3 or -1)
Case a: Case b: Case c:
55
3
2
a
Case
1 +
=
+ i
i x
x
1. x0 = 4
2. x1 = 3.31662
3. x2 = 3.10375
4. x3 = 3.03439
5. x4 = 3.01144
6. x5 = 3.00381
2
3
b
Case
1
−
=
+
i
i
x
x
2
3
c
Case
2
1
−
=
+
i
i
x
x
1. x0 = 4
2. x1 = 1.5
3. x2 = -6
4. x3 = -0.375
5. x4 = -1.263158
6. x5 = -0.919355
7. x6 = -1.02762
8. x7 = -0.990876
9. x8 = -1.00305
1. x0 = 4
2. x1 = 6.5
3. x2 = 19.625
4. x3 = 191.070
Converge!
Converge, but slower
Diverge!
56
• Can we know which g(x) would converge to solution before
we do the computation?
• How to choose g(x)?
Convergence of Fixed Point Iteration
57
Suppose the iterative equation is xi+1 = g(xi),
and the true solution is xr = g(xr)
Then on subtracting
xr – xi+1 = g(xr) – g(xi) ………(1)
The derivative mean value theorem states that if a function g(x) and its first
derivative are continuous over an interval a ≤ x ≤ b, then there exists at least one value
of x = ξ within the interval such that
g’(ξ) = [g(b) – g(a)]/ (b-a).
Slope = g’(ξ)
b
a ξ
x
g(x)
Slope = Ro /h
Ro
h
Convergence of Fixed Point Iteration – contd.
• g’(ξ) = [g(b) – g(a)]/ (b-a).
• The right hand side is the slope of the line joining g(a) and g(b).
• Thus the theorem states that there is at least one point between a and b that has a
slope, designated by g’(ξ), which is parallel to the line joining g(a) and g(b).
• If we let a = xi and b = xr then,
• g(xr) – g(xi) = ( xr – xi) g’(ξ)
• Where ξ is somewhere between xi and xr.
• From (1) then xr – xi+1 = ( xr – xi) g’(ξ) ……….(2)
• If the error for iteration i is defined as Et,i = xr – xi,
• then from (2), Et,i+1 = g’(ξ) Et,i.
• Thus if │g’(x) │< 1, the errors decrease with each iteration.
• For │g’(x) │> 1, the errors grow.
58
Convergence of Fixed Point Iteration – contd.
59
• Therefore, if |g‘(x)| < 1, the error decreases with each iteration. If
|g'(x)| > 1, the error increase.
• If the derivative is positive, the iterative solution will be monotonic.
• If the derivative is negative, the errors will oscillate.
Convergence of Fixed Point Iteration – contd.
60
(a) |g'(x)| < 1, g'(x) is +ve
 converge, monotonic
(b) |g'(x)| < 1, g'(x) is -ve
 converge, oscillate
(c) |g'(x)| > 1, g'(x) is +ve
 diverge, monotonic
(d) |g'(x)| > 1, g'(x) is -ve
 diverge, oscillate
61
The Order of Iterative Process - Definition
Using an iterative process we get xk+1 from xk and other info.
We have x0, x1, x2, …, xk+1 as the estimation for the root α.
Let Ek = α – xk
Then we may observe
The process in such a case is said to be of p-th order.
• It is called Super linear if p > 1.
– It is call Quadratic if p = 2
• It is called Linear if p = 1.
• It is called Sub linear if p < 1.
)
(
1
p
k
k E
O
E =
+
62
Newton-Raphson vs. Fixed Point Iteration
Find root of f(x) = e-x - x = 0.
(Answer: α= 0.56714329) i
x
i e
x −
+ =
1
i xi εa (%) εt (%)
0 0 100.0
1 1.000000 100.0 76.3
2 0.367879 171.8 35.1
3 0.692201 46.9 22.1
4 0.500473 38.3 11.8
5 0.606244 17.4 6.89
6 0.545396 11.2 3.83
7 0.579612 5.90 2.20
8 0.560115 3.48 1.24
9 0.571143 1.93 0.705
10 0.564879 1.11 0.399
i xi εt (%) |Ei|
0 0 100 0.56714329
1 0.500000000 11.8 0.06714329
2 0.566311003 0.147 0.0008323
3 0.567143165 0.0000220 0.000000125
4 0.567143290 < 10-8
Newton-Raphson
Fixed Point Iteration with
63
Let x0 and x1 are two initial approximations for the root 's' of f(x) = 0 and f(x0) & f(x1)
respectively, are their function values. If x 2 is the point of intersection of x-axis and the
line-joining the points (x0, f(x0)) and (x1, f(x1)) then x2 is closer to 's' than x0 and x1. The
equation relating x0, x1 and x2 is found by considering the slope 'm‘.
( )
( ) ( )
1
1
1
)
(
−
−
+
−
−
−
=
i
i
i
i
i
i
i
x
f
x
f
x
x
x
f
x
x
Secant Method
64
• Secant Method is similar to Regula-falsi scheme of root bracketing
methods but differs in the implementation.
• The Regula-falsi method begins with the two initial approximations
'a' and 'b' such that a < s < b where s is the root of f(x) = 0.
• It proceeds to the next iteration by calculating c(x2) using the above
formula and then chooses one of the interval (a,c) or (c,h) depending on
f(a) * f(c) < 0 or > 0 respectively.
• On the other hand secant method starts with two initial
approximation x0 and x1 (they may not bracket the root) and then
calculates the x2 by the same formula as in Regula-falsi method but
proceeds to the next iteration without bothering about any root
bracketing.
Secant Method vs Regula Falsi
65
Find the root of 3x + sin[x] - exp[x] = 0, using Secant Method
Let the initial guess be 0.0 and 1.0
So the iterative process converges to 0.36 in six iterations
i 0 1 2 3 4 5 6
xi 0 1 0.471 0.308 0.363 0.36 0.36
Example
66
SECANT METHOD
The secant formula of iteration is
(1)
Let xr be actual root of f(x) and ei the error in the estimate of xi.
Then,
xi+1 = ei+1 +xr
xr = ei + xr
xi-1 = ei-1 + xr
Substitute these in eq. (1) and simplifying, the error equation is
(2)
( )
( ) ( )
1
1
1
)
(
−
−
+
−
−
−
=
i
i
i
i
i
i
i
x
f
x
f
x
x
x
f
x
x
( ) ( )
( ) ( )
1
1
1
1
−
−
−
+
−
−
=
i
i
i
i
i
i
i
x
f
x
f
x
f
e
x
f
e
e
From Mean Value Theorem
We know that,
f(xr) = 0
xi – xr = ei
And therefore,
Similarly,
f(xi-1) = ei-1 f’(Ri-1)
Substituting these in the numerator of eq. (2), we get
( ) ( ) ( )
r
i
r
i
i
x
x
x
f
x
f
R
f
−
−
=
'
( ) ( ) ( ) ( )
i
i
i
i
i
i R
f
e
x
f
e
x
f
R
f '
' =

=
( ) ( )
( ) ( )
1
1
1
1
'
'
−
−
−
+
−
−
=
i
i
i
i
i
i
i
x
f
x
f
R
f
R
f
e
e
e
That is, we can say
(3)
We know that the order of convergence of an iteration process is p, if
(4)
Substituting for ei+1 and ei in eq. (3), we get
(5)
Comparing the relations (4) and (3), we observe that
p = (p+1)/p
p2 – p – 1 = 0
Which has the solutions
p = ±1.618
Since p = +ve always, it is referred as Superlinear Convergence
1
1 −
+  i
i
i e
e
e
p
i
i
p
i
i
e
e
e
e


+
−
1
1
p
p
i
i
i
p
i
p
i
e
e
e
e
e
/
)
1
(
1
1
1
+
−
−
−



More Related Content

Similar to Adv. Num. Tech. 1 Roots of function.pdf

Solution of nonlinear_equations
Solution of nonlinear_equationsSolution of nonlinear_equations
Solution of nonlinear_equationsTarun Gehlot
 
Lecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etcLecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etcRiyandika Jastin
 
Analysis for engineers _roots_ overeruption
Analysis for engineers _roots_ overeruptionAnalysis for engineers _roots_ overeruption
Analysis for engineers _roots_ overeruptionuttamna97
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Asad Ali
 
Numarical values
Numarical valuesNumarical values
Numarical valuesAmanSaeed11
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlightedAmanSaeed11
 
Chapter 2 solving nonlinear equations
Chapter 2 solving nonlinear equationsChapter 2 solving nonlinear equations
Chapter 2 solving nonlinear equationsssuser53ee01
 
Limits and continuity[1]
Limits and continuity[1]Limits and continuity[1]
Limits and continuity[1]indu thakur
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment HelpMaths Assignment Help
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlabsheetslibrary
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 

Similar to Adv. Num. Tech. 1 Roots of function.pdf (20)

Ch 2
Ch 2Ch 2
Ch 2
 
Solution of nonlinear_equations
Solution of nonlinear_equationsSolution of nonlinear_equations
Solution of nonlinear_equations
 
Lecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etcLecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etc
 
Quadrature
QuadratureQuadrature
Quadrature
 
Analysis for engineers _roots_ overeruption
Analysis for engineers _roots_ overeruptionAnalysis for engineers _roots_ overeruption
Analysis for engineers _roots_ overeruption
 
Presentation aust final
Presentation aust finalPresentation aust final
Presentation aust final
 
Bisection
BisectionBisection
Bisection
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
OPERATIONS RESEARCH
OPERATIONS RESEARCHOPERATIONS RESEARCH
OPERATIONS RESEARCH
 
Numarical values
Numarical valuesNumarical values
Numarical values
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlighted
 
Chapter 2 solving nonlinear equations
Chapter 2 solving nonlinear equationsChapter 2 solving nonlinear equations
Chapter 2 solving nonlinear equations
 
Limits and continuity[1]
Limits and continuity[1]Limits and continuity[1]
Limits and continuity[1]
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Bca numer
Bca numerBca numer
Bca numer
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment Help
 
Lecture6
Lecture6Lecture6
Lecture6
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlab
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 

Recently uploaded

Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 

Recently uploaded (20)

Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

Adv. Num. Tech. 1 Roots of function.pdf

  • 2. 2 ▪ A frequently occurring problem is to find the roots of equations of the form f(x) = 0. ▪ If f(x) is a polynomial of higher degree or an expression involving transcendental functions (e.g. 1 + cos x – 5x), then algebraic methods are not available. Roots of an equation
  • 3. 3 ▪ Different approaches to solve these equations: ▪ Bisection Method ▪ Method of False Position ▪ Newton-Raphson Method ▪ Iteration Method Note : For a polynomial presented by f(x) = anxn + an-1xn-1 + ….+ a1 + a0, the largest possible root is given by x* = - an-1/an. ( E. Balaguruswamy) Roots of an equation
  • 4. 4 Theorem: If f(x) = 0, ▪ A function f(x) is continuous between two points a and b, ▪ f(a) and f(b) are of opposite sign, ▪ Then, there exists at least one real root or an odd number of real roots of f(x) between a and b (i.e., where f(x) intersects the x-axis, since f(x) = 0). Roots of an equation
  • 5. 5 f(b) is positive f(a) negative The root of this equation f(x) is continuous between xa and xb
  • 6. 6 What might go Wrong? Tangent point: very difficult to find Singularity : brackets don’t surround root Pathological case: infinite number of roots – e.g. sin(1/x) Roots of an equation
  • 7. 7 If function f(x) in f(x)=0 does not change sign between two points, roots may still exist between the two points. x f(x) xu x Roots of an equation
  • 8. 8 x f(x) xu x If the function f(x) in f(x)=0 does not change sign between two points, there may not be any roots between the two points. x f(x) xu x Roots of an equation
  • 9. 9 If the function f(x) in f(x)=0 changes sign between two points, more than one root may exist between the two points. x f(x) xu x Roots of an equation
  • 10. 10 If the function f(x) is not continuous between a and b, but f(a) and f(b) has opposite signs, then there may not exist any root between a and b. f(x) x ( ) x x f 1 = Roots of an equation
  • 11. 11 • Let f(a) and f(b) has opposite signs. • Find xc = (a+b)/2. • If f(xc) = 0, then xc is the root of the equation. • Otherwise, the root lies between • a and xc [if a and xc has opposite signs], or • xc and b [if xc and b has opposite signs]. • We continue this process until we find the root (i.e., xc = 0), or the latest interval is smaller than some specified tolerance. Bisection Method
  • 12. 12 Bisection Method f(b) is positive f(a) negative xc= (a+b)/2 What will be the next interval? f(c) negative
  • 13. Bisection Method ➢ After a root of f (x) = 0 has been bracketed in the interval (a, b). ➢ Suppose that f (x) is continuous on an interval a ≤ x ≤ b and that f (a) f (b) < 0. ➢ When this is the case, f (x) will have opposite signs at the end points of the interval (a, b). ➢ As shown in Fig. 3.1 (a) and (b), if f (x) is continuous and has a solution between the points x = a and x = b, then either f (a) > 0 and f (b) < 0 or f (a) < 0 and f (b) > 0.
  • 14.
  • 15. Algorithm for the Bisection Method 1. Compute the first estimate of the numerical solution xs1 by 2. Determine whether the true solution is between a and xs1 or between xs1 and b by checking the sign of the product f (a) f(xs1) ➢If f (a) f ( xs1 ) < 0, the true solution is between a and xs1. ➢If f (a) f ( xs1) > 0, the true solution is between xs1 and b. ➢If b – c ≤ ∈, then accept c as the root and stop. ∈ is the error tolerance, ∈ > 0. 3. Choose the subinterval that contains the true solution (a to xs1 or xs1 to b) as the new interval (a, b) and go back to step 1. 4. Steps 1 through 3 are repeated until a specified tolerance or error bound is attained
  • 16.
  • 17. Example 1 ➢Use the Bisection method to find a root of the equation x3 – 4x – 8.95 = 0 accurate to three decimal places using the Bisection method. ➢Solution: ➢ Here, f (x) = x3 – 4x – 8.95 = 0 ➢ f (2) = 23 – 4(2) – 8.95 = – 8.95 < 0 ➢ f (3) = 33 – 4(3) – 8.95 = 6.05 > 0 ➢ Hence, a root lies between 2 and 3. ➢ f ' (x) = 3x2 – 4 > 0 for x in the interval (2, 3). Hence, we have a = 2 and b = 3. The results of the algorithm for Bisection method are shown in Table E3.1.
  • 18. Hence the root is 2.711 accurate to three decimal places
  • 19. 19 ➢Example .2 ➢ Find one root of ex – 3x = 0 correct to two decimal places using the method of Bisection. ➢ Solution: ➢Here, f (x) = ex – 3x ➢ f(1.5) = e1.5 – 3(1.5) = –0.01831 ➢ f (1.6) = e1.6 – 3(1.6) = 0.15303 ➢f '(x) = ex – 3 > 0 for x in the interval (1.5, 1.6). Hence, a root lies in the interval (1.5, 1.6). Therefore, here we have a = 1.5 and b = 1.6. The results of the algorithm for Bisection method are shown in Table .2.
  • 20. 20 Hence the root of f (x) = 0 is x = 1.51 accurate up to two decimal places.
  • 21. Error estimation ➢At each stage the length of the interval is halved, so the maximum possible error is reduced by a factor of one half. ➢If a and b denote the ends of the original interval that brackets the root(zer0), then the error at stage k is at most (b-a)/2k. ➢Order of convergence for bisection method is linear with rate of convergence as 1/2.
  • 22. CONVERGENCE OF BISECTION METHOD ➢ In Bisection method, the interval containing the root is reduced by a factor of 2 in each iteration. ➢ After n iterations, the interval containing the root is reduced to the size ➢ The root must lie within ± Δx/2n of our estimate after n iterations. ➢ The error decreases linearly with each step by a factor of 0.5. The bisection method is, therefore, linearly convergent. n n x x x 2 2 1 2  = − 2 2 2 1 1 n n n n n E x E x E =  =  = + +
  • 23. Method of False Position ➢The method of False Position (also called the Regular False method, and the linear interpolation method) is another well- known bracketing method. ➢Rather than bisecting the interval (a, b), it locates the root by joining f (a) and f (b) with a straight line. ➢The intersection of this line with the x-axis represents an improved estimate of the root. ➢We assume that within a given interval (a, b), f (x) is continuous and the equation has a solution.
  • 24.
  • 25. 2/18/2023 25 The Method of False Position ▪ This method consists in replacing the part of the curve between the points (xa, f(xa)) and (xb, f(xb)). ▪ The equation of the chord joining the two points (xa , f(xa)) and (xb , f(xb)) is ▪ ▪It takes the point of intersection of the chord with the x-axis as an approximation to the root (here, x1). (xa, f(xa)) (xb, f(xb)) a b a b a a x x x f x f x x x f y − − = − − ) ( ) ( ) ( (x1, f(x1))
  • 26. 2/18/2023 26 The Method of False Position ▪ The point of intersection in the present case is given by putting y = 0 in the equation ▪ Thus we obtain ▪ Hence, the approximate root is a b a b a a x x x f x f x x x f y − − = − − ) ( ) ( ) ( ) ( ) ( ) ( ) ( a b a b a a x x x f x f x f x x − − − = ) ( ) ( ) ( ) ( 1 a b a b a a x x x f x f x f x x − − − =
  • 27. 2/18/2023 27 The Method of False Position : Geometric Significance Here, for  PMS and  PRQ ▪ MS/MP = RQ/RP ▪ (x1 – xa)/f(xa) = (xb – xa) /(f(xb)+- f(xa)) ▪ X1 – xa = f(xa)(xb– xa) /(f(xa)+(- f(xb))) ▪ x1 = xa - f(xa)(xb– xa) /(f(xb) - f(xa)) P R Q M S xa xb x1 f(x)
  • 28. Algorithm for the Method of False Position 1. Define the first interval (a, b) such that solution exists between them. Check f (a) f (b) < 0. 2. Compute the first estimate of the solution xs 3. Find out whether the actual solution is between a and x or between x and b. This is accomplished by checking the sign of the product f (a) f(xs). ➢If f(a) f(xs) < 0, the solution is between a and xs ➢If f(a) f(xs) > 0, the solution is between xs and b 4. Select the subinterval that contains the solution (a to x, or x to b) is the new interval (a, b) and go back to step 2. Step 2 through 4 are repeated until a specified tolerance or error bound is attained. 5. The method of False Position always converges to an answer, provided a root is bracketed in the interval (a, b).
  • 29. Convergence of False Position Method ➢ This method is based on linear interpolation model. Assume that the initial points bracketing the solution are a and b and a moves towards the solution and b is fixed. ➢ Let x1= a and xr be the solution. ➢Then, e1 = xr – x1 and e2 = xr – x2 ➢That is, ei = xr - xi ➢It can be shown that ➢Where R is some point in the interval xi and b. ➢It shows that the process of iteration converges linearly. ( ) ( ) ( ) R f R f b x e e r r i ' " * 1 − = +
  • 30. Using the False Position method, find a root of the function f (x) = e – 3x2 to an accuracy of 5 digits. The root is known to lie between 0.5 and 1.0. Solution: We apply the method of False Position with a = 0.5 and b = 1.0. Example 3 The root is 0.91 accurate to five digits
  • 31. Example 4 Find a real root of cosx – 3x + 5 = 0. Correct to four decimal places using the method of False Position method. Solution: Therefore, a root of f (x) = 0 lies between 0 and π/2. We apply the method of False Position with a = 0 and b = π/2. The root is 1.6427 accurate to four decimal places.
  • 32. Newton – Raphson Method ➢The Newton-Raphson method is the best-known method of finding roots of a function f (x). ➢The method is simple and fast. One drawback of this method is that it uses the derivative f'(x) of the function as well as the function f (x) itself. ➢ Hence, the Newton-Raphson method is usable only in problems where f'(x) can be readily computed. ➢Here, again we assume that f(x) is continuous and differentiable and the equation is known to have a solution near a given point.
  • 33. ➢ Figure illustrates the procedure used in Newton-Raphson method. ➢ The solution process starts by selecting point x as the first estimate of the solution.
  • 34. The iterations are stopped when the estimated relative error is smaller than a specified value ∈. The Newton-Raphson method, when successful, works well and converges fast. ➢ Convergence problems occur when the value of f '(x) is close to zero in the vicinity of the solution, where f (x) = 0. ➢ Newton-Raphson method generally converges when f (x), f ' (x) and f "(x) are all continuous, if f '(x) is not zero at the solution and if the starting value x is near the actual solution.
  • 36. 36 http://numericalmethods.eng.usf.edu Newton – Raphson Method – Taylor Series f(xi+h) = f(xi) + h f’(xi) +( 1/2!) (h2 f”(xi)) + (1/3! )(h3 f”’(xi)) + ….. If xi is the approximation then f(xi+h) is given by above expression through Taylor series. Since we are finding the roots of the function(equation), f(xi+h) = 0 Therefore, 0 = f(xi) + h f’(xi) + 1/2! (h2 f”(xi)) + 1/3! (h3 f”’(xi)) + ….. Neglecting higher order terms starting from quadratic terms, 0 = f(xi) + h f’(xi) + ….. Which gives, h = -f(xi)/f’(xi) Thus, the next approximate root will be, Xi+1 = Xi +h, Or, Xi+1 = Xi - f(xi)/f’(xi) Note: The term neglected also shows that the convergence is quadratic. Further, another formulation can also be done by neglecting cubic terms, will give a quadratic equation for h, if f(x), f’(x), f”(x) is known near the root. This formulation is given by Chebyshev……
  • 37. Convergence of Newton-Raphson Method The Newton-Raphson iteration formula is given by The general form of above Eq. is given by Here …..1 …..2 ..…3 Hence or ….4 …..5
  • 38. Hence, Newton-Raphson’s method converges if or ….6 ….7 ➢If α denotes the actual root of f (x) = 0, then we can select a small interval in which f (x), f ′(x) and f ″(x) are all continuous and the condition given by Eq.7 is satisfied. ➢ Therefore, Newton-Raphson method always converges provided the initial approximation X0 is taken very close to the actual root α.
  • 39. Example 5 Use Newton-Raphson method to find the real root near 2 of the equation x4 – 11x + 8 = 0 accurate to five decimal places Solution: Here and
  • 40. Therefore, Hence the root of the equation is 1.89188.
  • 41. Example 6 Using Newton-Raphson method, find a root of the function f (x) = ex – 3x2 to an accuracy of 5 digits. The root is known to lie between 0.5 and 1.0. Take the starting value of x as x0 = 1.0. Solution: Start at x0 = 1.0 and prepare a table as shown in Table, where f (x) = ex – 3x2 and f '(x) = ex –6x. The relative error
  • 42. The Newton-Raphson iteration method is given by
  • 43. 43 Newton-Raphson Method Use the slope of f(x) to predict the location of the root. xi+1 is the point where the tangent at xi intersects x- axis. ) ( ' ) ( 0 ) ( ) ( ' 1 1 i i i i i i i i x f x f x x x x x f x f − =  − − = + +
  • 44. 44 Error Analysis of Newton-Raphson Method By definition ) 2 ( ) 1 ( 1 1 + + − = − = i i i i x E x E   Newton-Raphson method ) 3 ( ) )( ( ' ) )( ( ' ) ( ) )( ( ' ) )( ( ' ) ( ) )( ( ' ) ( ) ( ' ) ( 1 1 1 1 + + + + − = − +  − = − +  − =  − = i i i i i i i i i i i i i i i i i i x x f x x f x f x x f x x f x f x x x f x f x f x f x x   (if α is the true value)
  • 45. 45 Suppose α is the true value (i.e., f(α) = 0). Using Taylor's series Error Analysis of Newton-Raphson Method 2 2 1 2 1 2 1 2 2 ) ( ' 2 ) ( " ) ( ' 2 ) ( " )) 2 ( and ) 1 ( from ( ) ( 2 ) ( " ) )( ( ' 0 )) 3 ( from ( ) ( 2 ) ( " ) )( ( ' 0 ) ( 2 ) ( " ) )( ( ' ) ( 0 ) ( 2 ) ( " ) )( ( ' ) ( ) ( i i i i i i i i i i i i i i i i i i E f f x f c f E E c f E x f x c f x x f x c f x x f x f x c f x x f x f f           −  − =  + =  − + − =  − + − + =  − + − + = + + + When xi and α are very close to each other, c is between xi and α. The iterative process is said to be of second order. Mean Value theorem truncates Taylor series
  • 46. 46 Error Analysis of the Newton-Raphson Method Each error is approximately proportional to the square of the previous error. It means that the number of correct decimal places roughly doubles with each approximation. Example: Find the root of f(x) = e-x - x = 0 (Ans: α= 0.56714329) 1 1 − − − − = − − + i i x i x i i e x e x x Error Analysis : 56714329 . 0 ) ( " 56714329 . 1 1 ) ( ' = = − = − − = − −     e f e f
  • 47. 47 Error Analysis 2 2 2 1 18095 . 0 ) 56714329 . 1 ( 2 56714329 . 0 ) ( ' 2 ) ( " i i i i E E E f f E − = −   +   i xi εt (%) |Ei| estimated |Ei+1| 0 0 100 0.56714329 0.0582 1 0.500000000 11.8 0.06714329 0.008158 2 0.566311003 0.147 0.0008323 0.000000125 3 0.567143165 0.0000220 0.000000125 2.83x10-15 4 0.567143290 < 10-8
  • 48. 48 Pitfalls of the Newton-Raphson Method • Sometimes slow iteration xi 0 0.5 1 51.65 2 46.485 3 41.8365 4 37.65285 5 33.8877565 … … 40 41 42 43 1.002316024 1.000023934 1.000000003 1.000000000 1 ) ( 10 − = x x f
  • 49. 49 Pitfalls of the Newton-Raphson Method Figure (a) An inflection point (f"(x)=0) at the vicinity of a root causes divergence. Figure (b) A local maximum or minimum causes oscillations. Note: In case of a graph of a function, inflection point is a point where the function changes from being concave to convex, or vice versa. For example, if the curve is the graph of a function y = f(x), of differentiability class C2, this means that the second derivative of f vanishes and changes sign at the point.
  • 50. 50 Pitfalls of the Newton-Raphson Method Figure (c) It may jump from one location close to one root to a location that is several roots away. Figure (d) A zero slope causes division by zero.
  • 51. 51 Fixed Point Iteration • Also known as one-point iteration or successive substitution. • To find the root for f(x) = 0, we reformulated f(x) = 0 so that there is an x on one side of the equation. • f(x) = 0 g(x) = x • If we can solve g(x) = x, we solve f(x) = 0. • x is known as the fixed point of g(x). • We solve g(x) = x by computing • xi+1 = g(xi) with x0 given • until xi+1 converges to x.
  • 52. 52 Example Find root of f(x) = e-x - x = 0. (Answer: α= 0.56714329). As per the method, We formulate f(x) = e-x - x = 0 as xi+1 = e-x i i xi εa (%) εt (%) 0 0 100.0 1 1.000000 100.0 76.3 2 0.367879 171.8 35.1 3 0.692201 46.9 22.1 4 0.500473 38.3 11.8 5 0.606244 17.4 6.89 6 0.545396 11.2 3.83 7 0.579612 5.90 2.20 8 0.560115 3.48 1.24 9 0.571143 1.93 0.705 10 0.564879 1.11 0.399
  • 53. 53 Graphical Representation of fixed point iteration The point, x, where the two curves, f1(x) = x and f2(x) = g(x), intersect is the solution to f(x) = 0.
  • 54. 54 Fixed Point Iteration – Convergence? 2 3 ) ( 2 3 3 2 0 3 2 2 2 2 2 − =  − =  − =  = − − x x g x x x x x x 2 3 ) ( 2 3 0 3 ) 2 ( 0 3 2 2 − =  − =  = − −  = − − x x g x x x x x x 3 2 ) ( 3 2 3 2 0 3 2 2 2 + =  + =  + =  = − − x x g x x x x x x • There are number of ways to construct g(x) from f(x). • For example, f(x) = x2 – 2x - 3 = 0 So which one is better? (ans: x = 3 or -1) Case a: Case b: Case c:
  • 55. 55 3 2 a Case 1 + = + i i x x 1. x0 = 4 2. x1 = 3.31662 3. x2 = 3.10375 4. x3 = 3.03439 5. x4 = 3.01144 6. x5 = 3.00381 2 3 b Case 1 − = + i i x x 2 3 c Case 2 1 − = + i i x x 1. x0 = 4 2. x1 = 1.5 3. x2 = -6 4. x3 = -0.375 5. x4 = -1.263158 6. x5 = -0.919355 7. x6 = -1.02762 8. x7 = -0.990876 9. x8 = -1.00305 1. x0 = 4 2. x1 = 6.5 3. x2 = 19.625 4. x3 = 191.070 Converge! Converge, but slower Diverge!
  • 56. 56 • Can we know which g(x) would converge to solution before we do the computation? • How to choose g(x)? Convergence of Fixed Point Iteration
  • 57. 57 Suppose the iterative equation is xi+1 = g(xi), and the true solution is xr = g(xr) Then on subtracting xr – xi+1 = g(xr) – g(xi) ………(1) The derivative mean value theorem states that if a function g(x) and its first derivative are continuous over an interval a ≤ x ≤ b, then there exists at least one value of x = ξ within the interval such that g’(ξ) = [g(b) – g(a)]/ (b-a). Slope = g’(ξ) b a ξ x g(x) Slope = Ro /h Ro h Convergence of Fixed Point Iteration – contd.
  • 58. • g’(ξ) = [g(b) – g(a)]/ (b-a). • The right hand side is the slope of the line joining g(a) and g(b). • Thus the theorem states that there is at least one point between a and b that has a slope, designated by g’(ξ), which is parallel to the line joining g(a) and g(b). • If we let a = xi and b = xr then, • g(xr) – g(xi) = ( xr – xi) g’(ξ) • Where ξ is somewhere between xi and xr. • From (1) then xr – xi+1 = ( xr – xi) g’(ξ) ……….(2) • If the error for iteration i is defined as Et,i = xr – xi, • then from (2), Et,i+1 = g’(ξ) Et,i. • Thus if │g’(x) │< 1, the errors decrease with each iteration. • For │g’(x) │> 1, the errors grow. 58 Convergence of Fixed Point Iteration – contd.
  • 59. 59 • Therefore, if |g‘(x)| < 1, the error decreases with each iteration. If |g'(x)| > 1, the error increase. • If the derivative is positive, the iterative solution will be monotonic. • If the derivative is negative, the errors will oscillate. Convergence of Fixed Point Iteration – contd.
  • 60. 60 (a) |g'(x)| < 1, g'(x) is +ve  converge, monotonic (b) |g'(x)| < 1, g'(x) is -ve  converge, oscillate (c) |g'(x)| > 1, g'(x) is +ve  diverge, monotonic (d) |g'(x)| > 1, g'(x) is -ve  diverge, oscillate
  • 61. 61 The Order of Iterative Process - Definition Using an iterative process we get xk+1 from xk and other info. We have x0, x1, x2, …, xk+1 as the estimation for the root α. Let Ek = α – xk Then we may observe The process in such a case is said to be of p-th order. • It is called Super linear if p > 1. – It is call Quadratic if p = 2 • It is called Linear if p = 1. • It is called Sub linear if p < 1. ) ( 1 p k k E O E = +
  • 62. 62 Newton-Raphson vs. Fixed Point Iteration Find root of f(x) = e-x - x = 0. (Answer: α= 0.56714329) i x i e x − + = 1 i xi εa (%) εt (%) 0 0 100.0 1 1.000000 100.0 76.3 2 0.367879 171.8 35.1 3 0.692201 46.9 22.1 4 0.500473 38.3 11.8 5 0.606244 17.4 6.89 6 0.545396 11.2 3.83 7 0.579612 5.90 2.20 8 0.560115 3.48 1.24 9 0.571143 1.93 0.705 10 0.564879 1.11 0.399 i xi εt (%) |Ei| 0 0 100 0.56714329 1 0.500000000 11.8 0.06714329 2 0.566311003 0.147 0.0008323 3 0.567143165 0.0000220 0.000000125 4 0.567143290 < 10-8 Newton-Raphson Fixed Point Iteration with
  • 63. 63 Let x0 and x1 are two initial approximations for the root 's' of f(x) = 0 and f(x0) & f(x1) respectively, are their function values. If x 2 is the point of intersection of x-axis and the line-joining the points (x0, f(x0)) and (x1, f(x1)) then x2 is closer to 's' than x0 and x1. The equation relating x0, x1 and x2 is found by considering the slope 'm‘. ( ) ( ) ( ) 1 1 1 ) ( − − + − − − = i i i i i i i x f x f x x x f x x Secant Method
  • 64. 64 • Secant Method is similar to Regula-falsi scheme of root bracketing methods but differs in the implementation. • The Regula-falsi method begins with the two initial approximations 'a' and 'b' such that a < s < b where s is the root of f(x) = 0. • It proceeds to the next iteration by calculating c(x2) using the above formula and then chooses one of the interval (a,c) or (c,h) depending on f(a) * f(c) < 0 or > 0 respectively. • On the other hand secant method starts with two initial approximation x0 and x1 (they may not bracket the root) and then calculates the x2 by the same formula as in Regula-falsi method but proceeds to the next iteration without bothering about any root bracketing. Secant Method vs Regula Falsi
  • 65. 65 Find the root of 3x + sin[x] - exp[x] = 0, using Secant Method Let the initial guess be 0.0 and 1.0 So the iterative process converges to 0.36 in six iterations i 0 1 2 3 4 5 6 xi 0 1 0.471 0.308 0.363 0.36 0.36 Example
  • 66. 66
  • 67. SECANT METHOD The secant formula of iteration is (1) Let xr be actual root of f(x) and ei the error in the estimate of xi. Then, xi+1 = ei+1 +xr xr = ei + xr xi-1 = ei-1 + xr Substitute these in eq. (1) and simplifying, the error equation is (2) ( ) ( ) ( ) 1 1 1 ) ( − − + − − − = i i i i i i i x f x f x x x f x x ( ) ( ) ( ) ( ) 1 1 1 1 − − − + − − = i i i i i i i x f x f x f e x f e e
  • 68. From Mean Value Theorem We know that, f(xr) = 0 xi – xr = ei And therefore, Similarly, f(xi-1) = ei-1 f’(Ri-1) Substituting these in the numerator of eq. (2), we get ( ) ( ) ( ) r i r i i x x x f x f R f − − = ' ( ) ( ) ( ) ( ) i i i i i i R f e x f e x f R f ' ' =  = ( ) ( ) ( ) ( ) 1 1 1 1 ' ' − − − + − − = i i i i i i i x f x f R f R f e e e
  • 69. That is, we can say (3) We know that the order of convergence of an iteration process is p, if (4) Substituting for ei+1 and ei in eq. (3), we get (5) Comparing the relations (4) and (3), we observe that p = (p+1)/p p2 – p – 1 = 0 Which has the solutions p = ±1.618 Since p = +ve always, it is referred as Superlinear Convergence 1 1 − +  i i i e e e p i i p i i e e e e   + − 1 1 p p i i i p i p i e e e e e / ) 1 ( 1 1 1 + − − −  