Lecture 4
Lecture 4
Numerical Methods
for Solving
Nonlinear Equations
Open Methods
Algorithm Example
1 0.000000000000000
2 0.500000000000000
3 0.566311003197218
4 0.567143165034862 The true value of the root: 0.56714329.Thus,
5 0.567143290409781
Department of Computer Science the approach rapidly converges on the true root.
Comparison with previous two methods :
In previous methods, we were given an interval.
Here we are required an initial guess value of root.
The previous two methods are guaranteed to
converge.
Newton Rahhson may not converge in some cases.
For many problems, Newton Raphson method converges
faster than the above two methods.
The previous two methods do not identify repeated
roots.
It can identify repeated roots, since it does not look
for changes in the sign of f(x) explicitly.
Calculate the next estimate of the root from two initial guesses
f ( xi )( xi xi 1 )
xi 1 xi
f ( xi ) f ( xi 1 )
Find the absolute relative approximate error
xi 1- xi
a = 100
xi 1
27
Step 2
28
29
Advantages
Converges fast, if it converges
Requires two guesses that do not need to
bracket the root
Example:
solution
Step
1
Step
2
Note
Convert the problem from
root-finding to finding fixed-
Department of Computer Science point
Fixed- Point Iteration
Step Example1
1
Step
1 0.0000000000000
2 2 1.0000000000000
3 0.3678794411714
4 0.6922006275553
Starting with an initial guess of x = 0 0
5 0.5004735005636
6 0.6062435350856
7 0.5453957859750
8 0.5796123355034
9 0.5601154613611
10 0.5711431150802
11 0.5648793473910
12 0.5684287250291
Thus, each iteration brings the estimate closer
Department of Computer Science to the true value of the root: 0.56714329
When does it
converge?
Here,
x 0 1 2 Here, f(1)=-5<0 and f(2)=7>0
f(x) -5 -5 7 ∴ Root lies between 1 and 2
x0=(1+2)/2=1.5