Numerical Analysis 109
Numerical Analysis 109
.. /lt.tfJl,,u1111 '11
m1:thod.
Solution, Lt"'t tt:,:), a,:- ooH x - 1.a o ,,.( IJ
t.hon
/tO) • - 2
and
/t l) a. coH 1 - 1
a- 0.041(,:J -
11:1 f .4BH7.
So Oroot of thij t.'quuiion f(.t) • 0 lioH lwtwoon Ound J,
Let us tako ,to • o.a.
From, (l) f'(x) = 3 + Ain x.
Therefore, tho Newton'1-1 1nethod givos
/txn)
.X,i + 1 = Xn - f''(x,i}
3xli - COB Xn - 1
=x. - ---- • rt◄'rom (1) and <2)1
"' 3 + sin xtt
Xn sin Xn + cos Xn + 1
• X - . - -, ... (3)
·· n +1 - 3 + sin Xn
Putting n = 0, we get first approximation
x0 sin x0 + cos x0 + 1
Xl =
3 + sin x0
_ 0.6 sin (0.6) + cos (0.6) + 1
- 3 + sin (0.6)
_ 0.6 (0.5646) + 0.8253 + 1
- 3 + 0.5646
=2.16406 =O6071
3.5646 . .
Putting n = 1 into (3), we get second approximation which is given by
x 1 sin x 1 + cos x 1 + 1
X =- - - - - - -
2 3 + sin x 1
= 0.6071 sin (0.6071) + cos (0.6071) + 1
3 + sin (0.6071)
= 0.6071 (0.5705) + 0.8213 + 1
3 + 0.5705
2.1677
= 3.5705 = 0.6071.
Here X1 = X2, So the root correct to four decimal p]acei:; is 0.6071.
j
Example 2. Find the real root of the equation x log 10 x = 1.2 by Newton.
Raphson's Method .
Solution. Let ftx) = x log10 x - 1.2 = 0 ... (1)
Then /tl) := - 1.2
and /t2) = 2 log10 2 - 1.2 = - 0.5979
/t3) = 3 log10 3 - 1.2 = 0.2314.
Thus, a root of ftx) = 0 lies between 2 and 3.
Let us take x0 = 2
xn log10 Xn - 1.2
- x - ____:_;____::.._;____ _ [From (1) and (2)]
- n log10 Xn + 0.4343
0.4343 Xn + 1.2
Xn + l =1 0 4343 ' n =0, 1, 2, .. . .. .(3)
oglO Xn + ·
Putting n = 0, we get the first approximation as
0.4343 Xo + 1.2
xi= log10 x0 + 0.4843
_ 0.4343 (2) + 1.2
- loglO 2 + 0.4343
2.0686
= 0. 7353 =2.8133.
Putting n = 1 into (3), we get second approximation as
0.4343 Xl + 1.2
X2 =
log10 x1 + 0.4343
= 0.4343 (2.8133) + 1.2
logIO 2.8133 + 0.4343
2.4128
= 0.8835 = 2 ·7411 ·
Putting n = 2 into (3), we get third approximation as
0.4343 X2 + 1.2
X3 =
loglO X2 + 0.4343
0.4343 (2.7411) + 1.2
=
log10 2.7411 + 0.4343
2.3905
= 0.8722 = 2.7408.
Putting n = 3 into (3), we get fourth approximation
0.4343 X3 + 1.2
X4 =
log10 x 3 + 0.4343
_ 0.43 13 (2 .740 8) + 1.2
- loglO 2.74 08 + 0.43 43
2.3903
= 0.8721 = 2.7408.
Hero x == .:r , so tha t the root of f(x) = 0 correct to four dec ima l plac es is 2.7408.
3 4
aniplc 3. Fin d the real root of
the equ atio n x 2 - 5x + 2 = 0 by
1,0
2
Xn - 5xn +2
=Xn - 2x - 5 (Fr om (1) and (2)1
n
or Xn + 1 = 2x _
5
, n =0, 1, 2, .... ...(3 )
n
Let us tak e Xo=4.
Putting n = 0 into (3), we get firs t app rox ima
tion to the roo t as
x5-2 42 -2
Xl = 2xo - 5 = 2 (4) - 5
14
=3 =4 .66 67.
Putting n = 1 into (3), we get second app rox
ima tion as
xj-2
X2 = 2x1 - 5
_ (4.6667) 2 - 2 19.7781
- 2 (4.6667) - 5 = 4.3334
= 4.5641.
Putting n = 2, into (3), we get thir d app rox
ima tion as
x~ -2
X3=---
2x2 -5
_ (4.5641) 2 - 2 18.8310
- 2 (4.5641) - 5 = 4.1282
= 4.5616.
'P 1-1ttin g n - 3 m
· t o (3) , we get fou rth app
rox ima tion as
x~ -2
X4 = 2x3 - 5
2
_ (4.561 6) - 2 _ 18.80 82
- 2 (4.561 6) - 5 - 4.123 2
= 4.5616 .
places 1~
Here, x 3 = x 4 . Thus the root of the equat ion correc t to four decim al
4.5616 .
4
Exam ple 4. Find the real root of the equation x - x - 10 = 0, correct to three
decim al places by Newto n-Rap hson's metho d.
f(x) = x 4 - x - 10 = 0. . .. (1)
Solut ion. Let
Then f(l) = (1)4 - 1 - 10 = - 10
and {(2) = (2)4 - 2 - 10 = 4.
There fore, the root lies betwe en 1 and 2.
3 . .. (2)
From (1) f'(x) = 4x - 1.
Then, by Newto n-Rap hson's metho d, we have
f(xn)
Xn + l = Xn - f'(xn)
4
-xn -10
Xn
[From (1) and (2)J
-x --'- '--- --
- n 4x 3 - l
n
3.xn 4 + 10
x 1=
, n = 0, l, 2, .... ... (3)
n+ 4x 3 -1
n
Let us assum e x 0 = l ·6.
Now puttin g n = 0 into (3), we get first appro ximat ion as
3xo4 + 10
X -
1 - 4xo3 - 1
_ 3 (1·6)4 + 10 _ 29-66 08
- 4 (l ·6)3 - 1 - 15-38 4
= 1·92803.
Puttin g n =l into (3), we get secon d appro ximat ion as
3x14 + 10
X -
2 - 4x/- 1
= 3 (1-85971)4 + 10 =45-88
----
411
4 (1·859 71}3- 1 24-7~ 739
= 1-85559.
~ n = 3 into (3), we get fourth approximation as
3x34 + 10
X4= - ~ -
4x33 - 1
4
= 3 (1·85559) + 10 = 45-56717
4 (1·85559) 3 - 1 24-55677
= 1-85558.
Hence, the required root correct to three of decimal is 1-856.
Example 5. Using Newton-Raphson's method. Find the square root of 12
correct to three places of decimal.
Solution. Let f(x) =x 2 - 12 = 0 ... (1)
then f(l) = - 11
and {(2) = - 8
and /(3) = - 3
and {(4) = 4.
The root lies between 3 and 4.
Further, /(3· 1) =(3· 1)2 - 12 =- 2-39
2
/(3·2) = (3·2) - 12 = - 1-76
/(3·3) = - 1·11
/(3·4) = - 0·44
/(3·5) = 0-25.
Thus, the required root lies between 3-4 and 3-5.
Now, from (1), f'(x) = 2x.
Then, Newton-Rap hson's method gives
f(xn)
Xn+l =xn - f'(xn) ... (2)
2 -12
Xn
=xn---- [From (1) and (2)]
2xn
2
or xn + 12
xn + I = 2x , n =0, 1, 2, ... ...(3)
n
Let us assume that x 0 = 3-4.
= 24-0041 = 3-4641.
6-9294
mnt ion as
Put ting n = 2 into (3), we get thir d app roxi
2 2
X2 + 12 (3·4641) + 12
X -
3- 2..t 2 -- 2 (3·4641)
Xn + 1 13 ( 2xn +
=- -2 , n -- 0, 1, 2, ....
17)
Xn ...(2)
s·~ce 113
.(8) . = 2 and (27) 113 = 3 and 8 < 17 < 27 so that
approximation 1s taken as the initia l
2+3
Xo =- - =2-5.
2
For n = 0, we get
Xl = 3 2xo +2
1( 17) =-1(5 + 17)
--
Xo 3 6-25
1
=3 (7•72) =2-5733.
For n = 1, we get
= ! [2 (2-5733) + 17
3
]
6-6219
1
= 3 (7·7138) ='2·5713.
For n = 2, we get
X3 = ! (2x2 + 17 j
3 X22 J
= 1[ 17 ] 1
3 2 (2-5713) + 6-61158 = (7-71385)
3
= 2-571 28.
Fo r n = 3. we ge t
X4 = 1[2,·3+ ~ ;J
.\ J
= 2·57128.
d root correct
on s ar e eq ua l. so th at th e re qu ire
x
Th us , x 3 an d 4 ap pr ox im ati ~
is 2-5 71 3.
fo ur de cim al pla ce s d q so th at the rate of convergen
ce ~-
the va lue s of p an
Ex am pl e 8. Determine
the ite ra tiv e me th od N
Xn + l = p:r,, + q 2
Xn
xn = S+ £n an d xn +
d, we ge t
in th e giv en ite ra tiv e me tho s3
S+ £n + I = P(S + £11) + q <s + £11)2
=p (s +£ n) +q s3 2
s (1+ ~]
2
=p (S +E n) +qs(1 + tr
=P(S + En) + qS [ I - 2 ~n +3 ( ~ J-. .]
2
,t:
=p(.., + £n) + qs - 2qen + 2q T - .. .
fll
e,/ ) + .. .
=P S+ qs + (p - 2q) £n + 0(
2 .
or £n + I = (p + q - 1) S
+ (p - 2q) £n + 0 (En. ) + ...
r 2, we
to be co me of or de r as hi gh as po ssi ble i.e., of or de
Fo r th e given me tho d
mu st ha ve
= 0.
p + q - 1 = 0 an d p - 2q
on solving, we ge t
2 I
P = 3 an d q=""§"
by
e 9. Sh ow th at the sq ua re root of N =A B is gi ve n
Ex am pl
-f ii= S+ N
4 S
where S =A +B .
---
then
Solu tion . Let f(x) = x 2 - N = 0
f'(x) = 2x.
... (1)
Xn N
or x11 + 1 = + 2x ·
2 Tl
A+B
Let xn = . , then
2
A+B N
xn + 1 = - 4- + A + B
S N
=- + - [·: S = A + B]
4 S
1N = S + N _
4 S
Exa mpl e 10. Show that the following two sequences, both
have convergence of
the second order with the same limit fa :
Xn ½
+ 1 = Xn ( 1 + x: 2) and Xn + 1 =½Xn ( 3 - Xn
=½ (✓a +En)[ 1+ (1 + ~ ri
= ½(✓a +En) [ 1+ 1 - 2 ~ + 3 (~ r-.-]
= 1[ 2"1a
2
. , + 2En -
2En - 2 En. 2 + fa
fa 3 En 2 +~E
3 n 3 + ... l
_, 1 2
= "la + - - En + 0 (En 3) + ... .
2fa
1 2
En+ 1 = - - En + 0 (En 3) + ...
2~
⇒
2
En+ 1 oc En
which shows that the first itera tive formula has quad ratic
rate of convergence with
limit -fa.
- - -- - -- - - -- -- - -- - -·- - , .,,
~ En + 1 ex ~ -
quad ratic rfJI!! 11t
This shows that the second iterat ive formu la hru! allUJ
conve rgenc e with limit ../a.
11. Use synthetic diviRwn to noL,11,
Exam ple
f(x) =x3 - x2 - 1·000l x + 0-999 9 =0 in the neighbourlwod of x • 1,
Solu tion. To find / (1) and f'(l ), we proceed as fulJows :
1 1 - 1 - 1·0001 0·9009
1 0 - 1·0001
1 0 - 1·0001 - 0·000 2 -= /i'. JJ
1 1
1 1 - 0-0001 = /'(l)
1
1 2 = _!_ /"(1)
2!
1
::; - 0·0002 and
From above synth etic division, we obt1erve that / (1)
y equal roots,
f'(l) = 0-0001, both are small , there fore there exist two nearl
So tal<lng x0 = 1, we shall UBe the formula
{'(xn)
Xn + 1 =Xn - f"(xn) .
For this we shall requi re /"(l). From the above synth etic di
vi Rion, we haw
2 = \ /"(l)
2
~ f"(l) =4.
x1 = x 0 - /'(xo) = 1 - [ill_ = 1 - :- O·O0Ol ;:; 1,000025 ·
/"(x 0 ) f"<l) 4
~ '~":"'~
u~
(J/llf/0// --- - -- - - - - - - - - - - - - - - -~
----- e again calculate f'(x 1) and f "(x 1) by syn thetic division as follow s :
Noww
1 - 1 - 1·0001 0-9999
l 000025 1·000025 0-000025 - 1·000095
_ _ - - - - + - -1· - - - - - - :0::--:.0=--=0~00=2:-:5- - - - 1·000075 - 0-000195 = f (x1)
1·000025 1·000075
I
1 1·000050
1·000025
1 2·000075 = \ f "(x1)
2
1
From second synthetic division table, we have
f(x 1) =- 0-000195 i .e ., f(l -000025) = - 0-000195
f"(x 1 ) = 4-000150 i.e., f"(l -000025) = 4-000150.
and
Thus, for nearly equal roots, the starting values are
!
I
X =C± ✓-f:f(c)
(c)
, C = · 1,000025
I
= 1·000025 + ✓- 2 (- 0-000195)
- 4-000150
= 1·000025 ± 0·00987402
I = 1·009899, 0-990151.
Now taking x = 1-009899 and x = 0·990151 as starting values of two roots, we
can find the two close roots by original Newton's method.
3 2
Example 12. Find the double root of the equation x -x -x + 1 = O.
Solution. Let f(x) = x 3 - x2 - x + 1 = 0 ... (1)
2 .
then f ·,(x) = 3x - 2x - 1
· and f"(x) = 6x - 2
smce f(0 -9) =-1-439 < 0, f(l) =0 and f(l·l) = 0-021
so taking x 0 = 0-9, we have
f(xo) 2 (0·19)
x1 =xo -2 - ,- = 0·9- = 1·003
f (xo) - 0·37
= 1-01- 2 0-0403
0 0002
<· ) = 1·01 - 0-0099 = 1·0001
and f'(x1)
X2 = XI - (2 - 1) f"(x1)
0403
= 1-01- 04-06
· = 1-01 - 0-0099 = 1-0001
we conclude that there is a double root at x = 1·0001 which is very close to x ==
1
Example 13. Show that the equation ftx)_= 1 - xe 1 -x = 0, has a double roo~
x = 1. The root is obtained by using the modified Newton-Raphso n method IJ.Ji~
m =2 starting with x 0 = 0.
(1-xn el-xn)
=X - 2 - - - - - -
n X el -xn - el -xn
n
x2el-xn-x el-xn-2+2x el-xn
=----
n
n ---- n
----
e1 -xn (xn - 1)
x n 2 e 1 -xn +x e 1 -xn - 2
n
Xn + 1 -
- ---
( - -1)
-=1-x- - -
Xn - e n
=-e2 =0-735758882 .
For n = 1, we get
(xi2 +x1)el-x1 -2
X2=-----.---
(X1 - 1) e1 -xl
= (1·277100014) (1·302442201) 2
(- 0-264241118) (1 -302442201)
= 0-978185253.
For n = 2, ~e get
(xl + X2) e1 - x2 - 2
X3=-- ---;;---
(X2 - l) e 1 -x2
= (1·935031642) (1·022054428) 2
( 0-021814747) (1·022054428)
= 0-999842233.
-------
2
(., a Pl .\ .,
1)
, 1 n!m 52 672·1) (1 00015777
~)_ - 2
- (·- 0 000157767) (l -000157
7 79)
= 1 00000006 l .
For n = '1 . W C' ~ t
(X/
•l
+ X4) <? \ - X
<I -
2
X ti = (~ 4--=- 1) el - v.; -
~ oooo o1 sr u1 0000001s s)
- 2
= (0 -000000061) (l -00 00 00
183)
I = 1-0000000 61.
Bence th C' root co rrect to nin
e decimal places is 1-0 00 00 00
\
I
I
I EXERCISE 4
61 .
I
1. Using Ncwt.on-Raph son 's
me thod, obtai n a rea l root of
I
I
ti ) x5 ➔ Gx+ l ·..: O
(iv ) tan x = 4x
(ii) x=m
th~.foll~win g eq ua tio ns :
2
(m ) X +x - 80 =0
(v) x3 - 5x +3 =0 (vi) xs inx +c os x= O
(vii ) x4 - x - 13 = 0
(viii ) x3 -1 0= 0 (ix ) lo gx -x +3 =0
(x l ex= 3x.
2. Fin d to fou r pla ces of decima
l , the sm all est roo t of the eq ua
3. So lve x 4 - 5x3 + 20x 2 - 40x
tio n e- x = sin x.
+ 60 = 0 by Ne wt on -R aph
son 's me tho d giv en tha t all
roots of the given equ ation are the
complex.
4.. Use Ne wton -Ra ph son's me
tho d to ob tai n a roo t cor rec
foll owi ng equ ati ons : t thr ee dec im al pla ces of the
x,. + I O
½(2x,. <2)
for fin din g the cub e root of N.
He nce find the cub e roo t of 63.
9. Us e Ne wt on 's formul a to pro
ve tha t squ are roo t of N can
for mu la, . be ob tai ned by the rec urr enc
e
.
x11 + 1 = xn 1 -
(
x 11 -N
22N . J
He nce find the squ are root of
26, 29 an
d 35.
10. Ob tai n the cube root of
120 usi ng Newt on -R aph son 's
me tho d sta rti ng wi th Xo = 4 ·5
·
ll. Deter mine P, q and r so that the order of the iterati ve method
_ qa ra 2
5
x,t + 1 - PX,1 + - 2 + -
xn xn
113 .
for a becomes as high as possible.
to ensur e the fastes t possib le convergence with
12. How should the consta nt a be chosen
the iterat ion formu la
ax,,+ x,,- 2 + 1
-
Xn+l- a+l
4
Newto n-Rap hson's metho d, find the root of x - x - 10 = O which is ne;tr to
13. By using
x = 2 correc t to three decimal places. 4 3 2 4 4-0 ta di ·
- s n ng Xo == t .
14. Using Newton-Raphson's metho d find a root of x + x + 5x + x +
15. Obtai n Newton-Raphson's extend ed formu la 2
f(x 0 ) 1 Vtxo)1 .f"(xo )
x1 = xo - f'(xo) - 2 . if'(xo)]3
la of third order.
for the root of the equati on f(x) = o it is also known as Che~y shev formu
the formu la
16. If xn is suitab le close approx imatio n to ..fa show that error m
x. + , ~ ½x. (1 + x:,J
is about .!rd that in formu la
3 2
1 xn (3 - _
xn + 1 = 2 7xn J
n
x;'J
gives a sequence with third order convergence.
17. Show that the modified Newton-Raphson's metho d
2f(x11 )
xn + 1 = xn - f'(xn)
e root in the
gives a quadr atic convergence when f(x) = 0 has a pair of doubl
neighbourhood of x = x 11 •
18. The equati onf(x) =x - 7x2 + 16x - 12 =0 has a doubl e root atx
3 =2. Starti ng with the
using modified
initial approx imatio n x = 1, find the root correc t to three decim al places
0
Newton-Raphson's metho d with m = 2.
ANSWERS
(ii) 5-3852 (iii) 2·908 (iv) 0-0000 (v) 0-6566
1. (i) - 0-1999
(vi) 2-798 (vii) 1·967 (viii) 2·1547 (ix) 0-052 (x) 0·6190 4
2. 0-5885 3. 1·915 ± l908i , 0-585 ± 2·805i
(ii)- 2·533 (iii) 1-756 (iv) 4.4934 (v) 1-171
4. (i) 0·511
(vi) 1-896 (vii) 0-657 (viii) - 1-934 (ix) 1-303 (x) 2-908