Professional Documents
Culture Documents
Lec #3 (Successive App & Newton Raphson) PDF
Lec #3 (Successive App & Newton Raphson) PDF
By
NEWTON-RAPHSON METHOD
Lec # 3
1
METHOD OF SUCCESSIVE APPROXIMATION
This method of successive approximation also known as iterative
method can be applied to find a real root of the equation 𝑓 𝑥 = 0 by
rewriting the same in the form φ 𝑥 = 𝑥 Eq. (1)
Let
𝑥 = 𝑥0 be an initial approximation to the actual root say α of Eq. (1).
Then the 1st approximation is 𝑥1 = φ(𝑥0 ) and the successive
approximations are
𝑥2 = φ 𝑥1 , 𝑥3 = φ 𝑥2 , …, 𝑥𝑛 = φ 𝑥𝑛−1 .
If the sequence of the approximate roots 𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 converges to
α. It is taken as the root of the equation 𝑓 𝑥 = 0.
For convergence purpose the initial approximation 𝑥0 is to be done
carefully.
The choice of 𝑥0 is determined according to the following theorem:
2
THEOREM:
If “ α ” be a root of “ 𝑓 𝑥 = 0 ” which is equivalent to " φ 𝑥 = 𝑥 “
𝐼 be any interval containing the point 𝑥 = α and |φ′ 𝑥 | < 1
∀ 𝑥 𝜖 𝐼. Then the sequence of approximation 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 will
converge to the root α provided the initial approximation 𝑥0 is chosen
to 𝐼.
EXAMPLE:
Starting with 𝑥 = 0.12 , Solve the equation 𝑥 = 0.21 sin(0.5 + 𝑥)
correct to four decimal places by iterative method.
SOLUTION: The recursion formula is
𝑥𝑖+1 = 0.21 sin(𝑥𝑖 + 0.5)
𝑥0 = 0.12
For 𝑖 = 0
𝑥1 = 0.21 sin 𝑥0 + 0.5 = 0.21 sin 0.12 + 0.5 = 0.21 sin(0.62)
𝑥1 = 0.21 0.58104 = 0.12202
3
𝑖=1
𝑥2 = 0.21 sin 𝑥1 + 0.5 = 0.21 sin 0.12202 + 0.5
4
EXAMPLE#1:
Find a real root of the equation 𝑥 3 + 𝑥 2 − 1 = 0 by iteration method.
SOLUTION: Let 𝑓 𝑥 = 𝑥3 + 𝑥2 − 1
𝑓(𝑎) = 𝑓 0 = −1 < 0
𝑓 1 = 𝑓 1 = 13 + 12 − 1 = 1 > 0
⇒ Root lies between " 𝑎 = 0 " and " 𝑏 = 1 “
Now 𝑥 3 + 𝑥 2 − 1 = 0 can be written as
𝑥3 + 𝑥2 = 1
Now 𝑥 2 (𝑥 + 1) = 1
2
1
⇒ 𝑥 =
𝑥+1
1
⇒ 𝑥= = 𝜑 𝑥 say
𝑥+1
1 1
Clearly, 𝜑′ (0) = < 1 and 𝜑′ (1) = 1/2 < 1
2 2
⇒ 𝜑′ (𝑥) < 1 ∀ 𝑥 𝜖 (0,1)
Hence the iterative method can be applied. 5
Let 𝑥0 = 0.65 be the initial approximation, then
1 1
⇒ 𝑥1 = 𝜑 𝑥0 = = = 0.7784989
𝑥0 + 1 0.65 + 1
1 1
⇒ 𝑥2 = 𝜑 𝑥1 = = = 0.7498479
𝑥1 + 1 0.7784989 + 1
1 1
⇒ 𝑥3 = 𝜑 𝑥2 = = = 0.7559618
𝑥2 + 1 0.7498479 + 1
1 1
⇒ 𝑥4 = 𝜑 𝑥3 = = = 0.7546446
𝑥3 + 1 0.7559618 + 1
1
⇒ 𝑥5 = 𝜑 𝑥4 = = 0.7549278
𝑥4 + 1
6
1
⇒ 𝑥6 = 𝜑 𝑥5 = = 0.7548669
𝑥5 + 1
1
⇒ 𝑥7 = 𝜑 𝑥6 = = 0.7548800
𝑥6 + 1
1
⇒ 𝑥8 = 𝜑 𝑥7 = = 0.7548772
𝑥7 + 1
1
⇒ 𝑥9 = 𝜑 𝑥8 = = 0.7548778
𝑥8 + 1
1
⇒ 𝑥10 = 𝜑 𝑥9 = = 0.7548776
𝑥9 + 1
10
EXAMPLE #3:Find the real root of the equation 𝑙𝑜𝑔10 𝑥 = 𝑐𝑜𝑠𝑥 lies
in the interval [1, 2] correct to 2- decimal places by iterative method.
SOLUTION: Let 𝑓 𝑥 = 𝑙𝑜𝑔10 𝑥 − 𝑐𝑜𝑠𝑥 = 0
𝑓 1 = 𝑙𝑜𝑔10 (1) − cos 1 = 0.540302 > 0
𝑓 2 = 𝑙𝑜𝑔10 (2) − cos 2 = 0.30102999 − 0.416146
= −0.11511601 < 0
Real root lying between 1 and 2. so rewrite the equation
𝑐𝑜𝑠𝑥 = 𝑙𝑜𝑔10 𝑥 At 𝑥0 = 1.5
1
(𝑙𝑜𝑔10 𝑒)
⇒ 𝑥 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥 = 𝜑 𝑥 ′
𝜑 𝑥 =− 𝑥
1 − (𝑙𝑜𝑔10 𝑥)2
The recursion formula is
0.28953
=− = −0.29413
⇒ 𝑥𝑖+1 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥𝑖 0.98437
⇒ 𝜑 ′ (𝑥) < 1
11
The recursion formula is
⇒ 𝑥𝑖+1 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥𝑖
For 𝑖 = 0
⇒ 𝑥1 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥0 ⇒ 𝑥1 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 1.5
⇒ 𝑥1 = 𝑐𝑜𝑠 −1 0.1761 = 1.3938
For 𝑖 = 1
⇒ 𝑥2 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥1 ⇒ 𝑥2 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 1.3938
⇒ 𝑥2 = 𝑐𝑜𝑠 −1 0.144200 = 1.4261
For 𝑖 = 2
⇒ 𝑥3 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 𝑥2 ⇒ 𝑥3 = 𝑐𝑜𝑠 −1 𝑙𝑜𝑔10 1.4261
⇒ 𝑥3 = 𝑐𝑜𝑠 −1 0.1541 = 1.4160 ~1.42
Required root, correct to two decimal places is 1.42
12
EXERCISES
13
14
15
NEWTON-RAPHSON METHOD
This is a very powerful method for finding the real root of an equation
given in the form 𝑓 𝑥 = 0.
It can be derived as follows:
Let 𝑥0 be an approximation of a root of the given equation 𝑓 𝑥 = 0,
which may be algebraic or transcendental.
Let 𝑥1 = 𝑥0 + ℎ . Where “ h ” is small, be the exact of 𝑓 𝑥 = 0, then
𝑓(𝑥1 ) = 0 and expanding it by Taylor’s theorem, we get
𝑓(𝑥1 ) = 0
𝑓(𝑥0 + ℎ) = 0
ℎ2 ′′
𝑓(𝑥0 ) + ℎ𝑓 ′(𝑥0 ) + 𝑓 𝑥0 + ⋯ = 0
2!
Since h is small, we neglect terms containing ℎ2 and its higher powers.
16
𝑓(𝑥0 ) + ℎ𝑓 ′(𝑥0 ) = 0
𝑓(𝑥0 )
ℎ=−
𝑓 ′(𝑥0 )
𝑓(𝑥0 )
hence, 𝑥1 = 𝑥0 + ℎ = 𝑥0 −
𝑓 ′(𝑥0 )
Now substituting 𝑥1 for 𝑥0 and 𝑥2 for 𝑥1 the next better
approximations are given by
𝑓(𝑥1 ) 𝑓(𝑥2 )
𝑥2 = 𝑥1 − and 𝑥3 = 𝑥2 −
𝑓 ′(𝑥1 ) 𝑓 ′(𝑥2 )
Proceeding in the same way n times, we get the general formula
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − for 𝑛 = 0,1,2,3 …
𝑓 ′(𝑥𝑛 )
This method is also called Newton-Raphson iteration formula or
Tangent method
17
EXAMPLE #1: Solve 𝑥 3 + 2𝑥 2 + 10𝑥 − 20 = 0 by Newton
Raphson method.
SOLUTION: Let 𝑓 𝑥 = 𝑥 3 + 2𝑥 2 + 10𝑥 − 20
𝑓 1 = 1 + 2 + 10 − 20 = −7 < 0
𝑓 2 = 8 + 2 4 + 10 2 − 20 = 16 > 0
𝑓 ′ 𝑥 = 3𝑥 2 + 4𝑥 + 10
⇒ Root of lies between (1, 2).
Now Let 𝑥0 = 1.2
𝑓(𝑥𝑛 ) 𝑥𝑛 3 + 2𝑥𝑛 2 + 10𝑥𝑛 − 20
𝑥𝑛+1 = 𝑥𝑛 − = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 ) 3𝑥𝑛 2 + 4𝑥𝑛 + 10
2𝑥𝑛 3 + 2𝑥𝑛 2 + 20
𝑥𝑛+1 =
3𝑥𝑛 2 + 4𝑥𝑛 + 10
18
When 𝑛 = 0 1st approximation
(𝑛 = 1) 2nd approximation
2(𝑥1 3 + 𝑥1 2 + 10)
2((1.3774059)3 + (1.3774059)2 +10)
𝑥2 = 2 =
3𝑥1 + 4𝑥1 + 10 3(1.3774059)2 + 4(1.3774059) + 10
2(𝑥2 3 + 𝑥2 2 + 10)
28.8769242
𝑥3 = 2 = = 1.3688081
3𝑥2 + 4𝑥2 + 10 21.0964006
(𝑛 = 3) 4th approximation
2(𝑥3 3 + 𝑥3 2 + 10)
28.8765664
𝑥4 = 2 = = 1.3688081
3𝑥3 + 4𝑥3 + 10 21.0961392
20
EXAMPLE #2: Solve the equation 2𝑥 − 5 = 3 sin 𝑥 by Newton
Raphson method. Correct to 3-decimal places. (Root lies b/w 2.8 and
2.9
SOLUTION: Let 𝑓 𝑥 = 2𝑥 − 5 − 3 sin 𝑥 = 0
𝑓 2.8 = 2 2.8 − 5 − 3 sin 2.8 = 5.6 − 5 − 1.0050 = −0.4050 < 0
𝑓 2.9 = 2 2.9 − 5 − 3 sin 2.9 = 5.8 − 5 − 0.717747 = 0.0823 > 0
𝑓 ′ 𝑥 = 2 − 3 cos 𝑥
⇒ Root of lies between (2.8, 2.9).
Now Let 𝑥0 = 2.8
𝑓(𝑥𝑛 ) 2𝑥𝑛 − 5 − 3 sin(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 ) 2 − 3 cos(𝑥𝑛 )
13.9197
= = 2.8839
4.8267
(𝑛 = 1) 2nd approximation
(𝑛 = 3) 2nd approximation
𝑓(𝑥𝑛 )
𝜑 𝑥𝑛 = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 )
In general, 𝑥 = 𝜑 𝑥 , where
𝑓(𝑥𝑛 )
𝜑 𝑥 =𝑥−
𝑓 ′(𝑥𝑛 )
We know that the iteration method converges if
𝜑′ 𝑥 <1 Eq. (1)
𝑓(𝑥𝑛 )𝑓′′(𝑥𝑛 )
𝜑′ 𝑥 =
(𝑓 ′(𝑥𝑛 ))2
From (1)
𝑓(𝑥𝑛 )𝑓′′(𝑥𝑛 )
2
<1
(𝑓 ′(𝑥𝑛 ))
24
SOME SPECIAL CASES
CASE 1: Set up Newton-Raphson scheme of iteration for finding the
square root of a positive Number 𝑁.
SOLUTION: The square root of 𝑁 can be carried out as a root of
𝑥2 − 𝑁 = 0
Here
𝑓 𝑥 = 𝑥2 − 𝑁
𝑓′ 𝑥 = 2𝑥
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 )
𝑥𝑛 2 − 𝑁 2𝑥𝑛 2 − 𝑥𝑛 2 + 𝑁 𝑥𝑛 2 + 𝑁
𝑥𝑛+1 = 𝑥𝑛 − = =
2𝑥𝑛 2𝑥𝑛 2𝑥𝑛
1 𝑁
𝑥𝑛+1 = 𝑥𝑛 + Required Soln
2 𝑥𝑛
𝑤ℎ𝑒𝑟𝑒 𝑛 = 0,1,2,3, …
25
EXAMPLE: Find the value of 12 using formula
1 𝑁 Aside 12
𝑥𝑛+1 = 𝑥𝑛 +
2 𝑥𝑛 9=3
SOLUTION: 16 = 4
𝑛=0 (3, 4)
1 𝑁 1 12 1 1
𝑥1 = 𝑥0 + = 3.5 + = 3.5 + 3.4286 = 6.9286 = 3.4643
2 𝑥0 2 3.5 2 2
𝑛=1
1 𝑁 1 12 1
𝑥2 = 𝑥 + = 3.4643 + = 3.4643 + 3.4639 = 3.4641
2 1 𝑥1 2 3.4643 2
𝑛=2
1 𝑁 1 12 1
𝑥3 = 𝑥 + = 3.4641 + = 3.4641 + 3.4641 = 3.4641
2 2 𝑥2 2 3.4641 2
Required answer is
12 = 3.4641
26
In general, if pth root is required
𝑥𝑝 − 𝑁 = 0
Here
𝑓 𝑥 = 𝑥𝑝 − 𝑁
𝑓′ 𝑥 = 𝑝𝑥 𝑝−1
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 )
𝑥𝑛 𝑝 − 𝑁
𝑥𝑛+1 = 𝑥𝑛 −
𝑝𝑥𝑛 𝑝−1
𝑝 − 1 𝑥𝑛 𝑝 + 𝑁
𝑥𝑛+1 = 𝑝−1 , 𝑝>1
𝑝𝑥𝑛
27
3
FOR EXAMPLE, 7 = ? Using formula
𝑝 − 1 𝑥𝑛 𝑝 + 𝑁
𝑥𝑛+1 = 𝑝−1 , 𝑝>1
𝑝𝑥𝑛
SOLUTION
3 − 1 𝑥𝑛 3 + 7 2 𝑥𝑛 3 + 7
𝑥𝑛+1 = 3−1 =
3𝑥𝑛 3𝑥𝑛 2
𝑛=0
2 𝑥0 3 + 7 2 (1.6)3 +7 15.192
𝑥1 = = = = 1.978125
3𝑥0 2 3(1.6) 2 7.68
𝑛=1
2 𝑥1 3 + 7 2 (1.978125)3 +7 22.48072125
𝑥2 = = = = 1.915056195
3𝑥1 2 3(1.978125)2 11.73893555
𝑛=2
2 𝑥2 3 + 7 2 (1.915056195)3 +7 21.04670827
𝑥3 = = = = 1.91293354
3𝑥2 2 3(1.915056195)2 11.00232069
28
𝑛=3
2 𝑥3 3 + 7 2 (1.91293354)3 +7 21.00005176
𝑥4 = = = = 1.912931183
3𝑥3 2 3(1.91293354)2 10.97794419
𝑛=4
2 𝑥4 3 + 7
𝑥5 = 2 = 1.912931183
3𝑥4
CASE 2: Show that the iterative formula for finding the reciprocal of “
“ n ” is
𝑥𝑛+1 = 𝑥𝑛 (2 − 𝑛 𝑥𝑛 )
Solution Try yourself
1
𝑓 𝑥 = −𝑛
𝑥
29
REMARK
➢ When 𝑓′ 𝑥 is very large i.e. when slope is large, then “ h ” will be
small and hence the root can be calculated in even less time.
➢ If we choose the initial approximation 𝑥0 close to the root, then
we get the root of the equation very quickly.
➢ The process will evidently fail if 𝑓 ′ (𝑥) = 0 is in the neighborhood
of the root. In such cases the regular Falsi method should be used.
➢ If the initial approximation to the root is not given. Choose two
values of 𝑥, say “𝑎” and “𝑏” such that 𝑓 𝑎 and 𝑓 𝑏 are of
opposite sign. If 𝑓 𝑎 < |𝑓 𝑏 | then take “ 𝑎 ” as the initial
approximation.
30
EXERCISES
31
32
33
34