0% found this document useful (0 votes)
38 views

Numerical Analysis: Lecture - 7

This document discusses the iterative method for finding roots of equations numerically. It provides: 1) An overview of the iterative method formula xn+1=g(xn) and the condition for convergence |g'(x)| < 1. 2) Two examples of using the iterative method to find roots of equations to 4 decimal places. 3) Five exercises proposing additional equations to find roots for using the iterative method.

Uploaded by

Hassan Sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Numerical Analysis: Lecture - 7

This document discusses the iterative method for finding roots of equations numerically. It provides: 1) An overview of the iterative method formula xn+1=g(xn) and the condition for convergence |g'(x)| < 1. 2) Two examples of using the iterative method to find roots of equations to 4 decimal places. 3) Five exercises proposing additional equations to find roots for using the iterative method.

Uploaded by

Hassan Sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NUMERICAL ANALYSIS

Lecture -7

Dr. Muhammad Shabbir


Department of Mathematics
University of Engineering and Technology
Lahore Pakistan

Page 1 of 10
ITRATIVE METHOD
To find the root of an equation f(x)=0 by this method we rewrite the equation in
the form of
x=g(x).
Let x=x0 be an initial approximation of the desired root “α” then first
approximation will be
x1=g(x0).
Now taking x1 as initial value 2nd approximation is given as
x2=g(x1).
And proceeding in the same way
xn=g(xn-1).

Page 2 of 10
THEOREM If
i) α be the root of equation f(x)=0 which is equivalent to x=g(x)
ii) I be any interval containing the point x= α
iii) |𝑔́ (𝑥)| < 1 ∀ x ∈ I
Then the sequence of approximations x0, x1,x2, x3…..xn will converge to the root
‘α’ provided that the initial approximation is chosen in interval I. Condition iii)
is called “Condition of Convergence” for the Iterative Method.
Example 1
Find a real root of cosx=3x-1 correct to 4 d.p using Iterative Method
Solution
f(x)=cosx-3x+1=0
f(0)=1-0+1=2>0
f(1)=cos(1)-3(1)+1=1.45<0
Interval =[0,1]
Page 3 of 10
Given equation can be written as
x=1/3(1+cosx), where
g(x)= 1/3(1+cosx)
𝑔́ (𝑥)= 1/3(-sinx)
|𝑔́ (𝑥)|= (sinx)/3
Maximum Value of sinx is 1, so
𝑔’(x)=1/3=0.33<1 ∀ x ∈ I
Therefore, we can start iterative procedure. Let
x0 =0
xn+1=g(xn)
x1=g(x0)=1/3(1+cosx)
x1=1/3(1+cos0)=2/3
x1=0.66667
Page 4 of 10
x2=g(x1)=1/3(1+cos0.66667)
x2=0.59529
x3=g(x2)=1/3(1+cos0.59529)
x3=0.60933
x4=g(x3)=1/3(1+cos0.60933)
x4=0.60668
x5=g(x4)=1/3(1+cos0.60668)
x5=0.60718
x6=g(x5)=1/3(1+cos0.60718)
x6=0.60709≅ .6071
x7=g(x6)=1/3(1+cos0.6071)
x7=0.60710
Root =0. 60710
Page 5 of 10
Example.2
Solve x3-3x-20=0 Correct to 4 d.p using Iterative Method.
Solution
f(x)=x3-3x-20=0
f(3)=(3)3-3(3)-20=-2<0
f(4)=(4)3-3(4)-20=32>0
interval=[3,4]
The given equation can be written as
x=1/3(x3-20)
g(x)= 1/3(x3-20)
𝑔’(x)= 1/3(3x2)
𝑔’(x)=x2≮ 1 ∀ x ∈ I.
Again, given equation can be written as
Page 6 of 10
x3-3x-20=0
x(x2 -3)=20
x=20/ x2 -3
g(x)= 20/ x2 -3
𝑔’(x)=-2x*20/ (x2 -3)2
𝑔’(x)=-40x/ (x2 -3)2
|𝑔’(x)|=40x/ (x2 -3)2
For interval [3,4]
|𝑔’(x)|=40(3)/ ((3)2 -3)2
|𝑔’(x)|=120/ 36=3.33>1
𝑔’(x)=3.33≮ 1 ∀ x ∈ I
Again, given equation can be written as

Page 7 of 10
x3=3x+20
x=∛3𝑥 + 20
g(x)=(3x+20)1/3
𝑔’(x)=1/3[3x+20]1/3-1*3
𝑔’(x)=(3x+20)-2/3
𝑔’(x)=1/(3x+20)2/3<1
|𝑔’(x)|<1 ∀ x ∈ I
x0 =4
xn+1=g(xn)
x1=g(x0)= =∛3(4) + 20
x1=3.1748
x2=g(x1)= =∛3(3.1748) + 20

Page 8 of 10
x2=3.09106
x3=g(x2)= =∛3(3.09106) + 20
x3=3.08193
x4=g(x3)= =∛3(3.08193) + 20
x4=3.08097
x5=g(x4)= =∛3(3.08097) + 20
x5=3.080871
x6=g(x5)= =∛3(3.080871) + 20
x6=3.080860
Root==3.080860
NOTE Smaller the value of |𝑔’(x)|, More rapid will be the convergence.

Page 9 of 10
EXCERCISE
Find a real root of the following equations correct to 4 d.p. by Iterative Method.
(1) x = cos(x)
(2)𝑥 3 − 𝑥 2 + 𝑥 − 7 = 0
(3) 𝑥 3 +x-1=0
(4)𝑥𝑡𝑎𝑛𝑥 = −1
(5) 𝑥 3 − 4𝑥 − 9 = 0

Page 10 of 10

You might also like