Tải bản đầy đủ (.pdf) (10 trang)

A textbook of Computer Based Numerical and Statiscal Techniques part 11 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (125.5 KB, 10 trang )

86
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
x
6
= – 1.93375.
Thus, the approximation value to the root is –1.93375, correct up to five decimals.
2.9 METHODS FOR COMPLEX ROOTS
We now consider methods for determining complex roots of non-linear equations. Even if all
coefficients of a non-linear equation are real, the equation can have complex roots. The iterative
methods like the Secant method or the Newton-Raphson method are applicable to complex roots
also, provided complex arithmetic is used. Starting with the complex initial approximation, if the
iteration converges to a complex root, then the asymptotic convergence rate is the same as that
for a real root.
The problem of finding a complex root of f(z) = 0, where z is a complex variable, is equivalent
to finding real values x and y, such that
f(z)= f (x + iy) = u (x, y) + iv (x, y) = 0
Where u and v are real functions.
This problem is equivalent to solving a system of two non-linear equations in two real
unknowns x and y,
u (x, y) = 0, v (x, y) = 0
Which can be solved using the methods discussed in previous section.
Example 6. Find all roots of the equation f(x) = x
3
+ 2x
2
– x + 5 using Newton-Raphson method.
Use initial approximations x
0
= – 3 for real root and x
0
= 1 + i for complex root.


Sol. Given f(x)= x
3
+ 2x
2
– x + 5
f´(x)= 3x
2
+ 4x – 1
Newton-Raphson formula is given by
x
n+1
= x
n

()
()

n
n
fx
fx
For real root: Taken initial approximation as x
0
= – 3.
First approximation: x
1
= x
0

()

()

0
0
fx
fx
x
1
= – 3 –
()

1
14
= – 2.928571429
Second approximation: x
2
= x
1

()
()

1
1
fx
fx
x
2
= – 2.928571429 +
()

0.035349848
13.01530612
x
2
= – 2.925855408
Third approximation: x
3
= x
2

()
()

2
2
fx
fx
ALGEBRAIC AND TRANSCENDENTAL EQUATION
87
x
3
= – 2.925855408 +
()
0.000050045
12.97846797
x
3
= – 2.925851552
Since the second and third approximations are same for five decimals hence the real root is
–2.92585 correct up to five decimals.

For complex root: Initial approximation is x
0
= 1 + i
First approximation: x
1
= x
0

()
()
0
0
fx
fx

x
1
= 1 + i –
() ()()
()()
32
121 15
31 41 1
iii
ii
++ +−++
++ +−
x
1
=

()
53 114
109
i
+
= 0.486238 + i (1.045871)
Thus 0.486238 + i (1.045871) is the first approximation value of the root. Proceeding similarly,
we get next iterations as
x
2
= 0.448139 + i (1.23665)
x
3
= 0.462720 + i (1.22242)
x
4
= 0.462925 + i (1.22253)
x
5
= 0.462925 + i (1.22253)
Since the last two iterations are similar, we take 0.462925 + i(1.22253) as the value of the
complex root.
2.10 MULLER’S METHOD
This method can also used to determine the both real and complex root of equation
f(x) = 0. Let x
i–2
, x
i–1
, x
i

be three distinct approximations to a root of f(x) = 0 and let y
i–2
, y
i–1
, y
i
be the corresponding value of y = f(x).
Let
=−+−+
2
1
() ( ) ( )
ii
px Ax x Bx x y
is a parabola passing through the points
211
2
( , ), ( , ), ( , ),
ii ii ii
xy xy xy
−−−

we have

2
11 1
()()
iiiiii
yAxxBxxy
−− −

=−+−+
(1)

−− −
=−+−+
2
22 2
()()
iiiiii
y AxxBxxy
(2)
Equations (1) and (2) can be written as
2
111
()()
ii iiii
Ax x Bx x y y
−−−
−+ −=−
−−−
−+ −=−
2
222
()()
ii iiii
AxxBxxyy
Therefore
21 12
121 2
()()()()

()()()
iiiiiii i
iiiiii
xxyyxxyy
A
xxxxxx
−− −−
−−− −
−−−−−
=
−−−

−− −−
−−− −
−−−−−
=
−−−
22
21 12
211 2
()()()()
()()()
iiiiiiii
iiiiii
xxyyxxyy
B
xxxxxx
88
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
From A and B, the quadratic equation

2
()()()
0
iii
p
xAxx Bxx y
=−+−+=
gives the next
approximation

2
1
4
2
i
ii
BB Ay
xx
A
+
−± −
−=
(3)
But direct solution from (3) lead to loss of accuracy therefore for maximum accuracy,
equation (3) can be written as

1
2
2
4

i
ii
i
y
x
x
BB A
y
+
−=−
±−
Note: If B > 0, we use +ve sign with square root of the equation and if B < 0, we use
–ve sign with square root of the equation.
Example 7. Find the root of the equation
=−−−=
32
y(x) x x x 1 0
 Muller’s method, taking initial
approximations as x
0
= 0, x
1
= 1, x
2
= 2
Sol. Let x
i
– 2 = 0, x
i
– 1 = 1, x

i
= 2
Then
21
1, 2,
1
iii
y
yy
−−
=− =− =

21 12
121 2
()()()(
)
()())
iiiiiiii
iiiiii
xxyyxxyy
A
xxxxxx
−− −−
−−− −
−−−−−
=
−−−

(0 2)( 2 1) (1 2)( 1 1)
(1 0)(1 2)(0 2)

A
−−−−−−−
=
−−−
A = 2

−− −−
−− −

−−−−−
=
−−−
22
21 12
11 2
2
()()()()
()()()
iiiiiiii
iiiiii
xxyyxxyy
B
xxxxxx

22
(0 2) ( 2 1) (1 2) ( 1 1)
(0 1)(1 2)(0 2)
B
−−−−−−−
=

−− −
B = 5
The next approximation to the desired root is

1
2
2
4
i
ii
y
xx
BB Ayi
+
=−
±−

1
21
2
525421
i
x
+
×
=−
±−××
(taking +ve sign)

1

2
2 1.7807
76
5 4.123106
i
x
+
=− =
+
The procedure can now be repeated with three approximations as 1, 2, 1.780776.
Let
21
1, 2, 1.780776
iii
xxx
−−
===
Then
21
2, 1, 0.3048
08
iii
y
yy
−−
=− = =−

21 12
121 2
()()()()

()()()
iiiiiiii
iiiii i
xxyyxxyy
A
xxxxxx
−− −−
−−− −
−−−−−
=
−−−
ALGEBRAIC AND TRANSCENDENTAL EQUATION
89
A =
−+−−−+
−− −
(1 1.780776)(1 0.304808) (2 1.780776)( 2 0.304808)
(2 1)(2 1.780776)(1 1.780776)
A=3.780773
B =
−−−

−−− −
−−−−−
−−−
22
112
2
211 2
()()()()

()()()
iiiiiiii
iiiiii
xxyyxxyy
xxxxxx
B =
−+−−−+
−− −
22
(1 1.780776) (1 0.304808) (2 1.780776) ( 2 0.304808)
(1 2)(2 1.780776)(1 1.780776)
B = 5.123098
The next approximation to the desired root is
1
2
2
4
i
ii
i
y
xx
BB Ay
+
=−
±−

1
2
2 ( 0.304808)

1.780776
5.123098 (5.123098) 4 3.780773 ( 0.304808)
i
x
+
×−
=−
+−××−

1
1.837867
i
x
+
=
The procedure can repeated with three approximations as 2, 1.780776, 1.837867.
Let
21
2, 1.780776, 1.837867
ii i
xx x
−−
== =
Then
21
1, 0.304808, 0.007757
ii i
yy y
−−
==− =−

A =
−− −−
−−− −
−−−−−
−−−
21 12
121 2
()()()()
()()()
iiiiiiii
iiiiii
xxyyxxyy
xxxxxx
A =
−−+−− +
−−−
(2 1.837867)( 0.304808 0.007757) (1.780776 1.837867)(1 0.007757)
(1.780776 2)(1.780776 1.837867)(2 1.837867)
A = 4.619024
B =
−− −−
−−−

−−−−−
−−−
22
21 12
22
11
()()()()

()()()
iiiiiiii
iiiiii
xxyyxxyy
xxxxxx
B =
−−+−− +
−−−
22
(2 1.837867) ( 0.304808 0.007757) (1.780776 1.837867) (1 0.007757)
(2 1.780776)(1.780776 1.837867)(2 1.837867)
B = 5.467225
The next approximation to the desired root is

1
2
2
4
i
ii
i
y
xx
BB Ay
+
=−
±−

+
×−

=−
+−×−
1
2
2 ( 0.007757)
1.837867
5.467225 (5.467225) 4 4.619024 (0.007757)
i
x
x
i+1
= 1.839284
The procedure can now be repeated with three approximations as 1.780776, 1.837867, and
1.839284.
90
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Let
21
1.780776, 1.837867, 1.839284
iii
xxx
−−
===
Then y
i-2
= – 0.304808, y
i-1
= – 0.007757, y
i
= – 0.000015

A =
21 12
121 2
()()()()
()()()
iiiiiiii
iiiiii
xxyyxxyy
xxxxxx
−− −−
−−− −
−−−−−
−−−
(1.780776 1.839284)( 0.007757 0.000015) (1.837867 1.839284)( 0.304808 0.000015)
(1.837867 1.78.776)(1.837867 1.839284)(1.780776 1.839284)
A
−−+−−−+
=
−− −
A = 4.20000
22
21 12
211 2
()()()()
()()()
iiiiiiii
iiiiii
xxyyxxyy
B
xxxxxx

−− −−
−−− −
−−−−−
=
−−−
22
(1.780776 1.839284) ( 0.007757 0.000015) (1.837867 1.839284) ( 0.304808 0.000015)
(1.780776 1.837867)(1.837867 1.839284)(1.780776 – 1.839284)
B
−−+−−−+
=
−−
B = 5.20000
The next approximation to the desired root is
x
i+1
= x
i

2
2
4
i
i
y
BB Ay
±−
x
i+1
= 1.839284 –

()
() ( )
2
2 0.000015
5.2 5.2 4 4.2 0.000015
×−
+−××−
x
i+1
= 1.839287
Hence the required root is 1.839287
Example 8. Using Muller’s method, find the root of the equation y(x) = x
3
– 2x – 5 = 0, which
lies between 2 and 3.
Sol. Let x
i–2
= 1.9, x
i–1
= 2, x
i
= 2.1
Then y
i–2
= – 1.941, y
i–1
= – 1, y
i
= 0.061
A =

()
()
()()
()()()
212
1
121 2
iii i i ii i
iiiiii
xxyyxxyy
xxxxxx
−−−

−−− −
−−−− −
−−−
A =
()( )()( )
()( )( )
0.2 1.061 0.1 2.002
0.1 0.1 0.2
−− −−−
−−
A =
0.2122 0.2002
6
0.002

=
B =

()( )( )( )
()()()
22
212
211 2
1
iii i i ii i
iiiiii
xxy y x xy y
xxxxxx
−−−
−−− −
−−−−− −
−−−
B =
()( )()( )
()()()
22
0.2 1.061 0.1 2.002
0.1 0.1 0.2
−−−−−
−−−
B =
0.04244 0.02002
0.002
−+

= 11.21
ALGEBRAIC AND TRANSCENDENTAL EQUATION
91

The next approximation to the desired root is
x
i+1
= x
i

2
2
4
i
i
y
BB Ay
±−
x
i+1
= 2.1 –
()
()
()
2
2 0.061
11.21 11.21 24 0.061
×
±−×
x
i+1
= 2.1 –
0.122
11.21 11.1445

+
= 2.094542
The procedure can now be repeated with three approximations as 2, 2.1 and 2.094542.
Let x
i–2
= 2, x
i–1
= 2.1, x
i
= 2.094542
Then y
i–2
= – 1, y
i–1
= 0.061, y
i
= – 0.0001058
A =
()()()()
()()()
21 1 2
121 2
iiiiiiii
iiiiii
xxyyxxyy
xxxxxx
−− −−
−−− −
−−−−−
−−−

A =
()
()()()
()( )
()
2 2.094542 0.061 0.0001058 2.1 2.094542 1 0.0001058
2.1 2 2.1 2.094542 2 2.094542
−+−−−+
−− −
A = 6.194492
B =
()() ()
()()()
2
2
2112
21 1 2
()
iiiiiiii
ii i ii i
xxyyxxyy
xx x xx x
−−−−
−− − −
−−−−−
−−−
B =
()()()
()( )( )
22

0.094542 0.0611058 0.005458 ( 0.9998942)
0.1 0.005458 0.094542
−−−
−−
B = 11.161799
The next approximation to the desired root is
x
i+ 1
= x
i

2
2
4
i
i
y
BB Ay
±−
x
i+1
= 2.094542 –
()
()()( )
2
2 0.0001058
11.161799 11.161799 4 6.194492 0.0001058
×−
±−−
x

i+1
= 2.094542 +
0.0002116
11.161799 11.161916
+
= 2.094551
Hence the required root is 2.0945 correct up to 4 decimal places.
2.11 LIN BAIRSTOW METHOD
Let the polynomial equation be
p
n
(x)= a
0
x
n
+ a
1
x
n–1
+ a
2
x
n–2
+ a
3
x
n–3
+ + a
n–1
x + a

n
= 0 (1)
where a
0
≠ 0 and all a
i


s are real.
For polynomials, if the coefficients are all real valued then the complex roots occurs in
conjugate pair. Therefore we extract the quadratic factors that are the products of the pairs of
92
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
complex roots, and then complex arithmetic can be avoided because such quadratic factors have
real coefficients.
This method extracts a quadratic factor from polynomial given by equation (1), which gives
a pair of complex roots or a pair of real roots.
Let us divide the given polynomial p
n
(x) by a quadratic factor x
2
+ px + q, we obtain a
quotient polynomial Q
n–2
(x) of degree (n–2) and a linear remainder of the form Rx + S. Therefore
p
n
(x)= (x
2
+ px + q)Q

n – 2
(x) + (Rx + S) (2)
where Q
n–2
(x)= b
0
x
n–2
+ b
1
x
n–3
+ b
2
x
n–4
+ +b
n–3
x + b
n–2
If (x
2
+ px + q) is a factor of equation (1) then the remainder terms must vanish, therefore
the problem is then to find p and q such that
R(p, q) = 0 and S (p, q) = 0 (3)
If we regularly change the values of p and q, we can make the remainder zero or at least
make its coefficient smaller, however this equation (3) will normally not be so, for the approximated
values of p and q.
Since R and S are both functions of the two parameters p and q then the improved values
are given by

R(p + ∆p, q + ∆q) = 0 (4)
S(p + ∆p, q + ∆q) = 0
Expand equation (4) by Taylor’s series for a function of two variables, were the second and
higher order terms are neglected. We get
R(p, q) +
RR
p
pq
∂∂
∆+
∂∂
∆q = 0
S(p, q) +
SS
p
pp
∂∂
∆+
∂∂
∆q = 0 (5)
On solving equation (5), we get
∆p = –
SR
RS
qq
RS RS
pq qp
 
∂∂


 
∂∂
 

∂∂ ∂∂


∂∂ ∂∂

∆q = –
RS
SS
pp
RS RS
pq qp
 
∂∂

 
∂∂
 

∂∂ ∂∂


∂∂ ∂∂

(6)
Now the coefficients of b
i

’s, R and S can be obtained by comparing the like powers of x in
(2). i.e.,
a
0
x
n
+ a
1
x
n–1
+ a
2
x
n–2
+ a
3
x
n–3
+ a
n–2
x
2
+ a
n–1
x + a
n
= (x
2
+ px + q)
× (b

0
x
n–2
+ b
1
x
n–3
+ b
2
x
n–4
+ b
n–4
x
2
+ b
n–3
x + b
n–2
) + (Rx + S)
ALGEBRAIC AND TRANSCENDENTAL EQUATION
93
⇒ a
0
= b
0
a
1
= b
1

+ pb
0
a
2
= b
2
+ pb
1
+ qb
0
a
3
= b
3
+ pb
2
+ qb
1


a
r
= b
r
+ pb
r–1
+ qb
r–2



a
n–1
= pb
n–2
+ qb
n–3
+ R
a
n
= S + qb
n–2
Hence, b
0
= a
0
b
1
= a
1
– pb
0
b
2
= a
2
– pb
1
– qb
0
b

3
= a
3
– pb
2
– qb
1

.
b
r
= a
r
– pb
r-1
– qb
r–2


R = a
n–1
– pb
n–2
– qb
n–3
S = a
n
– qb
n-2
(7)

Using b
r
= a
r
– pb
r–1
– qb
r–2
, r = 1, 2, 3, n (8)
where b
0
= a
0
, b
– 1
= 0, Also from (8)
b
n–1
= a
n–1
– pb
n–2
– qb
n–3
Therefore a
n–1
= b
n–1
+ pb
n–2

+ qb
n–3
and b
n
= a
n
– pb
n–1
– qb
n–2
Therefore a
n
= b
n
– pb
n–1
– qb
n–2
So equation (7) becomes R = b
n–1
and S = b
n
+ pb
n–1
(9)
For partial derivaties of R and S equation (8) can be used i.e., differentiate equation (8) with
respect to ‘p’ and ‘q’.

r
b

p


= b
r–1
+ p
12rr
bb
q
pp
−−
∂∂
+
∂∂
or
0
1
bb
pp

∂∂
=
∂∂
= 0 (10)

r
b
q



= b
r–2
+ p
12rr
bb
q
qq
−−
∂∂
+
∂∂
or
0
1
bb
qq

∂∂
=
∂∂
= 0; where r = 1, 2, 3, 4, (11)
94
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Now, an equation (10) and (11) shows that
1
+
∂∂
=
∂∂
rr

bb
qp
= 0 (12)
Now set, –
r
b
p


= C
r–1
so that –
r
b
p


= C
r–2
; r = 1, 2, 3, (13)
Thus from (10)
r
b
p



=
12
1

−−

∂∂
++
∂∂
rr
r
bb
bp q
pp
C
r–1
= b
r–1
– pC
r–2
– qC
r–3
or
r
C
=
1
2
rr r
b
pC qC
−−
−−
(14)

where
1
C

= 0 and

∂∂
=− =− − =− =
∂∂ ∂
0
1
010 00
()
() or C
pb
b
C a pb b
pp p
(15)
From equations (9) and (15),
R
p


=
1
2
()
nn
R

bC
pp
−−
∂∂
⇒=−
∂∂
R
q


=
13
()
−−
∂∂
⇒=−
∂∂
nn
R
bC
qq
S
p


=
1
(
)
n

n
b
pb
pp



+
∂∂

1
11
()

−−

∂∂
=− + +
∂∂∂
n
nn
b
S
Cp b p
ppp
=
121
0
−−−
−− +

nnn
CpCb
S
q


=
1
(
)
n
n
b
pb
qq



+
∂∂
= – C
n–2
– pC
n–3
On substituting these values in equation (6), we get
p

=
−− −
−− − − − − −


−++


+−−−−+

23 3
22 3 3 1 2 1
()
()[][ ]
nn n
nn n n n n n
RC pC SC
C C pC C C pC b
Since R = b
n–1
and S = b
n
+ pb
n–1
, therefore
p


=
−− −− − −−
−− − − −− −− −−

−− ++



++ − − +

12 13 3 13
22 2 3 31 23 13
)]
nn nn nn nn
nn n n nn nn nn
bC pbC bC pbC
C C pC pC C C pC C b C
p

=
()
−−−
−−−−


−−
312
2
2311
nn n n
nnnn
bC b C
CCCb
(16)
ALGEBRAIC AND TRANSCENDENTAL EQUATION
95
Similarly

q

=
()
()
−− − −
−−−−
−−

−−
11 1 2
2
2311
nn n nn
nnnn
bC b bC
CCCb
Then the improved values of p and q are given by
p
1
= p +
p

and q
1
= q +
q

The method for computation of b
r

and C
r
can be given by
01 2 3 2 1
012 3 2 1
01 4 3 2
01 2 3 2 1
012 3 2
01





.
−−
−−−
−−−
−−
−−
−−− − − − − −
−− −− − − − −
−−− − − − − −
−− −− −
nn n
nnn
nnn
nn n
nn
aa a a a a a

ppbpbpb pbpbpb
qqbqb qbqbqb
bb b b b b b
ppCpCpC pCpC
qqCqC
43
01 2 3 2 1


−−
−−
−− −
nn
nn
qC qC
CC C C C C
The quotient polynomial
2
(
)
n
Qx

=
2
()/(
)
n
p
xx px

q
++
=
23
01
3

nn
n
b
xbx b
−−

++ +
can be obtained when p and q have been determined to the desired accuracy. This polynomial is
called the defaulted polynomial. Another quadratic factor is of obtained using this default
polynomial.
If the initial approximation of p and q are not known then the last three terms of given
polynomial a
n – 2
x
2
+ a
n–1
x + a
n
= 0 can be used to get approximations as p
0
=
1

2
n
n
a
a


, q
0
=
2
n
n
a
a

Example 9. Find the quadratic factor of the equation x
4
– 6x
3
+ 18x
2
– 24x + 16 = 0 using
Bairstow’s method where p
0
= – 1.5 and q
0
= 1. Also, find all the roots of the equation.
Sol. Let the quadratic factor of the equation be x
2

+ px + q. Using Bairstow’s method we
find the values of p and q.
First approximation: Let p
0
and q
0
be the initial approximations, then the first approximation
can be obtained by p
1
= p
0
+
p

and q
1
= q
0
+
q

. Because given equation is of the degree four
then.
p

= –
()

−−
41 32

2
2133
bC bC
CCCb
(1)
q

= –
()
()
−−
−−
33 3 42
2
2133
bC b bC
CCCb
(2)

×