NA Lec 7 PDF
NA Lec 7 PDF
Lecture -7
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 intial value 2nd approximation is given as
x2=g(x1)
And percending 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 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
Page 3 of 10
Interval =[0,1]
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
so we can start iterative procedure
Page 4 of 10
let
x0 =0
xn+1=g(xn)
x1=g(x0)=1/3[1+cosx]
x1=1/3[1+cos0]=2/3
x1=.66667
x2=g(x1)=1/3[1+cos0.66667]
x2=.59529
x3=g(x2)=1/3[1+cos0.59529]
x3=.60933
x4=g(x3)=1/3[1+cos0.60933]
x4=.60668
x5=g(x4)=1/3[1+cos0.60668]
Page 5 of 10
x5=.60718
x6=g(x5)=1/3[1+cos0.60718]
x6=.60709≅ .6071
x7=g(x6)=1/3[1+cos0.6071]
x7=. 60710
Root =. 60710
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]
Page 6 of 10
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
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
Page 7 of 10
For interval [3,4]
|𝑔’(x)|=40(3)/ ((3)2 -3)2
|𝑔’(x)|=120/ 36=3.33>1
𝑔’(x)=3.33≮ 1 ∀ x ∈ I
again
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
Page 8 of 10
xn+1=g(xn)
x1=g(x0)= =∛3(4) + 20
x1=3.1748
x2=g(x1)= =∛3(3.1748) + 20
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
Page 9 of 10
x6=3.080860
root==3.080860
NOTE
Smaller the value of |𝑔’(x)|, More rapid will be the convergence.
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