Numerical Methods

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Sub :Advanced Calculus and Numerical Methods Sub-Code : 18MAT21

Module 5

NUMERICAL METHOD
CONTENTS:
 Finite difference:
Forward and Backward difference
 Newtons forward and backward interpolation formula
 Newtons divided difference formula
 Lagranges interpolation formula
 Numerical integration
 Newton Raphson,s Method
 Regular Falsi Method

Department of Mathematics/ACSCE Page 1


NUMERICAL METHODS

Finite Differences

Let y = f(x) be represented by a table


x: x0 x1 x2 x3 …. xn
y: y0 y1 y2 y3 … yn
where x0, x1,x2….xn are equidistant. (x1 - x0 = x2 - x1 = x3 - x2 =….=xn - xn-1 = h)

Forward difference operator (∆) The first forward difference is defined as


fpllows:
f (x)  f (x  h)  f (x)

y r  y r 1  y r , r  0,1, 2,..., n  1

y 0  y1  y 0 
y1  y 2  y1 

.  first forward differences
. 

y n 1  y n  y n 1 

The difference of the first difference are called the second differences,they are
symbolically denoted as
Now 2 y 0  (y 0 )  ( y1  y 0 )

2 y 0 , 2 y1 , 2 y 2 ,...., are called the sec ond differences

 y1  y 0  ( y 2  y1 )  ( y1  y 0 )

 y 2  2y1  y 0

||| ly 2 y1  y 3  2 y 2  y1

2 y r  y r 2  2y r 1  y r

Note : 3 y 0  y 3  3y 2  3y1  y 0

 k y r  y r  k  k C1 y r  k 1  k C 2 y r  k  2  ....  (1) k C r

Department of Mathematics/ACSCE Page 2


The above forward Differences can be put in the following form called
Difference Table

x Y y 2y 3y 4y 5y


x0 y0
y0
x1 y1 2y0
y1 3y0
x2 y2 2y1 4y0
y2 3y0
x3 y3 2y2
y3
x4 y4
y 0 , 2 y 0 , 3 y 0 ,....are called the leading differences.

Ex: The following table gives a set of values of x and the corresponding values of
y = f(x)
x: 10 15 20 25 30 35
y: 19.97 21.51 22.47 23.52 24.65 25.89
Form the difference table and find f (10), 2 f (10), 3f (20), 4 f (15) .

x Y  2 3 4 5
10 19.97
1.54
15 21.51 -0.58
0.96 0.67
20 22.47 0.09 -0.68

Department of Mathematics/ACSCE Page 3


1.05 -0.01 0.72
25 23.52 0.08 0.04
1.13 0.03
30 24.65 0.11
1.24
35 25.89
f (10)  1.54, 2 f (10)   0.58, 3 f (20)  0.03, 4 f (15)  0.04

Note: The nth differences of a polynomial of n the degree are constant.

Backward difference operator ()


Let y = f(x) , then the backward difference is defined and denoted symbolically as
f(x) = f(x) - f(x - h)
i.e. y1 = y1 - y0 = ∆ y0
y2 = y2 - y1 = ∆ y1
y3 = y3 - y2 = ∆ y2
'
'
yn = yn - yn-1 = ∆ yn - 1
 y r  y r  y r 1  y r 1

Note:
1.  f(x + h) = f(x + h) - f(x) = ∆ f(x)
2. 2 f(x + 2h) = (f(x + 2h))
=  {f(x + 2h) - f(x + h)}
= f(x + 2h) -  f(x + h)
= f(x + 2h) - f(x + h) - f(x + h) + f(x)
= f(x + 2h) -2f(x + h) + f(x)
Department of Mathematics/ACSCE Page 4
= ∆2 f(x)
|||ly n f(x + nh) = ∆n f(x)
Backward difference table
x Y y 2y 3y
X0 y0
y1
X1 y1 2y2
y2 3y3
X2 y2 2y3
y3
X3 y3

1. Form the difference table for


X 40 50 60 70 80 90
Y 184 204 226 250 276 304
and find y (30), 2y (70), 5y (90)
Soln:
x Y y 2y 3y 4y 5y
40 184
20
50 204 2
22 0
60 226 2 0
24 0 0
70 250 2 0

Department of Mathematics/ACSCE Page 5


26 0
80 276 2
28
90 304
y (80) = 26, 2y (70) = 2, 5y (90) = 0
2. Given
X 0 1 2 3 4
f(x) 4 12 32 76 156
Construct the difference table and write the values of f (4), 2f (4), 3f (3)
x Y y 2y 3y
0 4
8
1 12 12
20 12
2 32 24
44 12
3 76 36
80
4 156

3) Find the missing term from the table:


X 0 1 2 3 4
Y 1 3 9 - 81

Explain why the value obtained is different by putting x = 3 in 3 x.


Denoting the missing value as a, b, c ..etc. Construct a difference table and solve.

Department of Mathematics/ACSCE Page 6


X y y 2y 3y 4y
0 1 2
1 3 6 4
2 9 a-9 a - 15 a - 19 -4a + 124
3 a 81 - a 81 - a -3a +105
4 81

Put 4y = 0 (assuming f(x) its be a polynomial of degree 3)


i.e., -4a + 124 = 0
a = 31
Since we have assumed f(x) to be a polynomial of degree 3 which is not 3 x we
obtained a different value.
4) Given u1 = 8, u3 = 64, u5 = 216 find u2 and u4
X u u 2u 3u
x1 8
x2 a a-8 -2a + 72 b + 3a - 200
x3 64 64 - a b + a - 128 -3b - a + 408
x4 b b - 64 -2b + 280
x5 216 216 -b

We carryout upto the stage where we get two entries ( 2 unknowns) and equate
each of those entries to zero. (Assuming) to be a polynomial of degree 2.
b + 3a - 200 = 0
-3b - a + 408 = 0 We get a = 24 b = 128

Department of Mathematics/ACSCE Page 7


Interpolation:
Interpolation is the process of finding the intermediate values for a given set of
values(x0,y0) ,(x1,y1),……………..(xn, yn) in the interval of the function y=f(x).The
process of finding the value outside the interval(x0,xn) is called Extrapolation.
Newton-Gregory Forward Interpolation Formula
Given (x0,y0) ,(x1,y1),……………..(xn, yn) , for y=ϕ(x) such
thatx1=x0+h,x2=x1+h………………..xn=x0+uh , we wish to estimate the value of y
corresponding to a desired value of x that lies near x 0 by using the following
formula:
u (u  1) 2 u (u  1) (u  2) 3
( x )  y 0  u y 0   y0   y 0  ....
2! 3!

u (u  1) (u  2) ...( u  n  1) n
  y0
n!

whichis called the Newton Gregory forward difference formula

Note :
1. Newton forward interpolation is generally used to interpolate the values of y
near the beginning of a set of tabular values for a better accuracy,.

Problems:

1) The table gives the distances in nautical miles of the visible horizon for the
given heights in feet above the earths surface.
x = height 100 150 200 250 300 350 400
y = 10.63 13.03 15.04 16.81 18.42 19.90 21.27
distance

Department of Mathematics/ACSCE Page 8


Find the values of y when i) x = 120, ii) y =218
Solution:
X y  2 3 4 5 6
100 10.63
2.40
150 13.03 -0.39
2.01 0.15
200 15.04 -0.24 -0.07
1.77 0.08 0.02
250 16.81 -0.16 -0.05 0.02
1.61 0.03 0.04
300 18.42 -0.13 -0.01
1.48 0.02
350 19.90 -0.11
1.37
400 21.27

Choose x0 = 100
120  100
i) x  120, u   0.4
50
0.4 (0.4)(0.4  1)
f (120)  10.63  (2.40)  (0.39)
1! 2!

(0.4) (0.4  1)(0.4  2)


 (0.15)
3!

(0.4) (0.4  1) (0.4  2) (0.4  3)


 (0.07)
4!

(0.4) (0.4  1) (0.4  2) (0.4  3) (0.4  4)


 (0.02)
5!

(0.4) (0.4  1) (0.4  2) (0.4  3) (0.4  4) (0.4  5)


 (0.02)  11.649
6!

218  200 18
ii) Let x = 218, x0 = 200, u    0.36
50 50

Department of Mathematics/ACSCE Page 9


0.36 (0.64)
f (218)  15.04  0.36(1.77)  (0.16)
2
0.36 (0.64) (1.64)
 (0.03)  ...
6

= 15.7

2) Find the value of f(1.85).


x y y 2y 3y 4y 5y 6y
1.7 5.474
0.575
1.8 6.049 0.062
0.637 0.004
1.9 6.686 0.066 0.004
0.703 0.008 -0.004
2.0 7.389 0.074 0 0.004
0.777 0.008 0
2.1 8.166 0.082 0
0.859 0.008
2.2 9.025 0.090
0.949
23 9.974
x  x 0 1.85  1.8
Choose x 0  1.8, x 1.85 u    0.5
h 0.1

(0.5)(0.5)
f (1.85)  6.049  (0.5) (0.637)  (0.066)
2
(0.5)(0.5) (1.5)
 (0.008)
6

 6.049  0.3185 - 0.0008  0.0005

= 6.359

Department of Mathematics/ACSCE Page 10


3) Given sin 45o = 0.7071, sin 50o = 0.7660, sin 55o =0.8192, sin 60o = 0.8660.
Find sin 48o.
x Y  2 3
45 0.7071
0.589
50 0.7660 -
0.0057
0.0532 0.0007
55 0.8192 -
0.0064
0.0468
60 0.8660
x  x0
x  48, x 0  45; h  5 u   0.6
h

sin 48 o  0.7071  (0.6) (0.0589 )

(0.6)( 0.4) (0.6) (0.4) (1.4)


 (0.0057)  (0.0007)  0.7431
2 6

4) From the following data find the number of students who have obtained  45
marks. Also find the number of students who have scored between 41 and 45
marks.
Marks 0 - 40 41 - 50 51 - 60 61 -70 71 - 80
No. of 31 42 51 35 31
students

x Y  2 3 4
40 31

Department of Mathematics/ACSCE Page 11


42
50 73 9
51 -25
60 124 -16 37
35 12
70 159 -4
31
80 190
(0.5) (0.5) 9 (0.5) (0.5) (1.5) (25)
f (45)  31  (0.5) (42)  
2 3!
(0.5) (0.5) (1.5) (2.5)
 (37)  47.8672  48
4!

f(45) - f(40) = 70 = Number of students who have scored between 41 and 45.

5) Find the interpolating polynomial for the following data:


f(0) = 1, f(1) = 0, f(2) = 1, f(3) = 10. Hence evaluate f(0.5)
y  2 3
x
0 1
-1
1 0 2
1 6
2 1 8
9
3 10
x0
u x
1
x(x  1) x(x  1) (x  2)
f (x)  1  x(1)  (2)  6  x 3  2x 2  1
2! 3!

Department of Mathematics/ACSCE Page 12


6) Find the interpolating polynomial for the following data:
x: 0 1 2 3 4
f(x) : 3 6 11 18 27

x y  2 3 4
0 3
3
1 6 2
5 0
2 11 2 0
7 0
3 18 2
9
4 27
x0
u x
1
x ( x  1) x(x  1)
f ( x )  3  x (3)  (2)  (0)  3  2x  x 2
2 x!

Newton Gregory Backward Interpolation formula


We use the following formula to calculate an approximate value of y= f(x) near the ending value
of xn of x as follows:

u (u  1) 2 u (u  1) (u  2) 3
y  y n  u y n   yn   y n  ....
2! 3!

x  xn
where u 
h

Department of Mathematics/ACSCE Page 13


1) The values of tan x are given for values of x in the following table. Estimate
tan (0.26)

x 0.10 0.15 0.20 0.25 0.30


y 0.1003 0.1511 0.2027 0.2553 0.3093

x y  2 3 4
0.10 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 0.0002
0.20 0.2027 0.0010 0.0002
0.0526 0.0004
0.25 0.2553 0.0014
0.0540
0.30 0.3093

0.26  0.3
u   0.8
0.05
(0.8) (0.8) (0.2) (1.2)
f (0.26 )  0.3093  (0.8)(0.054 )  (0.2) (0.0014)  (0.0004)  0.2659
2 6

2) The deflection d measured at various distances x from one end of a cantilever is


given by the following table. Find d when x = 0.95
0.95  1
u  0.25 d  0.3308 when x  0.95
0.2

x d  2 3 4 5
0 0
0.0347
0.2 0.0347 0.0479
0.0826 -
0.0318
0.4 0.1173 0.0161 0.0003
Department of Mathematics/ACSCE Page 14
0.0987 - -
0.0321 0.0003
0.6 0.2160 -0.016 0
0.0827 -0.032
0.8 0.2987 -
0.0481
0.0346
1.0 0.3333

3) The area y of circles for different diameters x are given below:


x: 80 85 90 95 100
y: 5026 5674 6362 7088 7854

Calculate area when x = 98


x y y 2y 3y 4y
80 5026
648
85 5674 40
688 -2
90 6362 38 4
726 2
95 7088 40
766
100 7854

Answer:
x  xn
u  0.4
n
y = 7542
4) Find the interpolating polynomial which approximates the following data.
x 0 1 2 3 4

Department of Mathematics/ACSCE Page 15


y -5 -10 -9 4 35

x y  2 3 4
0 -5
-5
1 -10 6
1 6
2 -9 12 0
13 6
3 4 18
31
4 35

x4
u
1
18 (x  4) (x  3) (x  2) (6)
f (x)  35  (x  4) (31)  (x  4) (x  3) 
2! 3!

f(x)  x 3  2x 2  6x - 5

Interpolation with unequal intervals


Newton backward and forward interpolation is applicable only when x 0, x1,…,xn-1
are equally spaced. Now we use two interpolation formulae for unequally spaced
values of x.
i) Lagranges formula for unequal intervals:
If y = f(x) takes the values y0, y1, y2,….,yn corresponding to x = x0, x1, x2,…,xn then
( x  x1 ) ( x  x 2 )...( x  x n ) ( x  x 0 ) ( x  x 2 ) ( x  x 3 )...( x  x n )
f (x)  f (x 0 )  f (x1 )
( x 0  x1 ) ( x 0  x 2 )...( x 0  x n ) ( x1  x 0 ) ( x1  x 2 ) ( x1  x 3 )...( x1  x n )

( x  x 0 ) ( x  x1 ) ( x  x 3 )...( x  x n )
 f ( x 2 )  ....
( x 2  x 0 ) ( x 2  x1 ) ( x 2  x 3 )...( x 2  x n )

Department of Mathematics/ACSCE Page 16


( x  x 0 ) ( x  x1 ) ( x  x 2 )...( x  x n 1 )
 f ( x n ) is known as the lagrange's
( x n  x 0 ) ( x n  x1 ) ( x n  x 2 )...( x n  x n 1 )

interpolation formula

ii) Divided differences ()


Let y0,y1……………………yn be the values of the function y=f(x) corresponding
values x0,x1…………………….xn which are not necessarily equally spaced.we
define them as follows
y1  y 0
f ( x 0 )  y 0   [ x 0 , x1 ]
x1  x 0

y 2  y1
y1   [x 2 , x1 ]
x 2  x1

y n  y n 1
y n 1   [ x n 1 , x n ]
x n  x n 1

These are called as First divided difference.


The second divided difference are defined as follows:
y1  y 0
2 f ( x 0 )  2 y 0 
x2  x0

[x 2 , x1 ]  [x1 , x 0 ]
  [x 0 , x1 , x 2 ]
x2  x0

y 2  y1 [ x 3 , x 2 ]  [ x 2 , x1 ]
|| ly 2 y1    [x1 , x 2 , x 3 ]
x 3  x1 x 3  x1

similarly 3 y 0 ,.... can be defined by following the above metod.


These divided differences may be employed to derive the following formula
known as Newton's divided difference interpolation formula:
y  f (x)  y 0  (x  x 0 ) y 0  (x  x 0 ) (x  x1 ) 2 y 0  (x  x 0 ) (x  x1 )(x  x 2 ) 3 y 0

 ...  ( x  x 0 ) ( x  x 1 ) ...( x  x n ) n y 0

.
Department of Mathematics/ACSCE Page 17
Inverse interpolation: Finding the value of y given the value of x is called
interpolation where as finding the value of x for a given y is called inverse
interpolation.

Since Lagrange's formula is only a relation between x and y we can obtain the
inverse interpolation formula just by interchanging x and y.

( y  y1 ) ( y  y 2 )....( y  y n )
x  .x 0
( y 0  y1 ) ( y 0  y 2 )...( y 0  y n )

( y  y 0 ) ( y  y 0 ) ( y  y 2 ) ( y  y 3 )...( y  y n )
 x1  ...
( y1  y 0 ) ( y1  y 2 ) ( y1  y 3 ) ...( y1  y n )

( y  y 0 ) ( y  y1 )...( y  y n 1 )
 ...  .x n
( y n  y 0 ) ( y n  y1 )...( y n  y n 1 )

is the Lagranges formula for inverse interpolation

1) The following table gives the values of x and y


x: 1.2 2.1 2.8 4.1 4.9 6.2
y: 4.2 6.8 9.8 13.4 15.5 19.6

Find x when y = 12 using Lagranges inverse interpolation formula.


Using Langrages formula
( y  y1 ) ( y  y 2 ) ( y  y 3 ) ( y  y 4 ) ( y  y 5 )
x x0
( y 0  y1 ) ( y 0  y 2 ) ( y 0  y 3 ) ( y 0  y 4 ) ( y 0  y 5 )

( y  y 0 ) ( y  y1 ) ( y  y 2 ) ( y  y 3 ) ( y  y 4 )
 ....  x4
( y 5  y 0 ) ( y 5  y1 ) ( y 5  y 2 )...( y 5  y 4 )

 0.022  0.234 1.252  3.419  0.964  0.055

= 3.55

Department of Mathematics/ACSCE Page 18


2) Given the values
x: 5 7 11 13 17
f(x) : 150 392 1452 2366 5202

Evaluate f(9) using (i) Lagrange's formula (ii) Newton's divided difference
formula.

i) Lagranges formula
(9  7) (9  11) (9  13) (9  17) (9  5) (9  11) (9  13) (9  17)
f (9)  (150)  .392
(5  7) (5  11) (5  13) (5  17) (7  5) (7  11) (7  13) (7  17)

(9  5) (9  7) (9  13) (9  17) (9  5) (9  7) (9  11) (9  17)


 (1452)  (2366)
(11  5) (11  7) (11  13) (11  17) (13  5) (13  7) (13  11) (13  17)

(9  5) (9  7) (9  11) (9  13)
 (5202)  810
(17  5) (17  7) (17  11) (17  13)

f(9) = 810

ii)
5 150
121
7 392 24
265 1
11 1452 32 0
457 1
13 2366 42
709
17 5202

Department of Mathematics/ACSCE Page 19


f(9) = 150 + 121 (9 - 5) + 24 (9 - 5) (9 - 7) + 1(9 - 5) (9 - 7) (9 - 11) = 810

3) Using i) Langranges interpolation and ii) divided difference formula. Find the
value of y when x = 10.
x: 5 6 9 11
y: 12 13 14 16
i) Lagranges formula
(10  6) (10  9) (10  11) (10  5)(10  9)(10  11)
y  f (10)   12   13
(5  6) (5  9) (5  11) (6  5)(6  9)(6  11)

(10  5)(10  6)(10  11) (10  5)(10  6)(10  9)


  14   16
(9  5)(9  6)(9  11) (11  5)(11  6)(11  9)
44

3
ii)Divided difference
X y  2 3
5 12
1
6 13 2 / 3 1
 
4 6
1 2 1 27

3 15 6  90  3 / 10  1
11  5 6 6 20
9 14 2/3 2

5 15
2
1
2

11 16

Department of Mathematics/ACSCE Page 20


 1  1 
f (10)  12  (10  5)  (10  5)(10  6).    (10  5)(10  6)(10  9)  
 6  20 
44

3

4) If y(1) = -3, y(3) = 9, y(4) =30, y(6) = 132 find the lagranges interpolating
polynomial that takes the same values as y at the given points.
Given:
X 1 3 4 6
Y -3 9 30 132

( x  3) ( x  4) ( x  6) ( x  1)(x  4)(x  6)
f (x)  . (3)  .9
(1  3)(1  4)(1  6) (3  1)(3  4)(3  6)
( x  1)(x  3)(x  6) ( x  1)(x  3)(x  4)
 .30  .132
(4  1)(4  3)(4  6) (6  1)(6  3)(6  4)

= x3 - 3x2 + 5x - 6
5) Find the interpolating polynomial using Newton divided difference formula for
the following data:
X 0 1 2 5
Y 2 3 12 147

X y  2 3
0 2
1
1 3 4
9 1

Department of Mathematics/ACSCE Page 21


2 12 9
45
5 147

F(x) = 2 + (x - 0)(1) + (x - 0) (x - 1) (4) + (x - 0) (x - 1) (x - 2) 1


= x3 + x 2 - x + 2

Numerical Integration:-
b
Evaluating the value of I   y dx numerically, given the set of values ( xi , yi ) ,
a

i  0,1,2,..., n at regular intervals is known as Numerical Integration.The


following formulae can be used to Evaluate the integral numerically.
(i) Simpson’s one third rule:-
I
h
 y0  yn   4 y1  y3  .....  yn1   2 y2  y4  .....  yn2 
3
when n is even.

(ii) Simpson’s three-eighth rule:-

I
3h
 y0  y n   3 y1  y 2  y 4  y5  ....  y n1   2 y3  y6  .....  y n3 
8
when n is a multiple of 3.

(iii) Weddle’s rule:-


I
3h
y0  5 y1  y 2  6 y3  y 4  5 y5  y6  ......
10
when n is a multiple of 6.

Problems:
rd 1
by dividing the interval 0 , 1 into
1 dx
1) Using Simpson’s
3
rule evaluate 1 x
0
2

4 equal sub intervals and hence find the value of  correct to four decimal
places.
Department of Mathematics/ACSCE Page 22
Solution: Let us divide [0,1] into 4 equal strips (n = 4)
1 0 1
 length of each strip: h  
4 4
1 2 1 3 4
The points of division are x  0, ,  , ,  1
4 4 2 4 4
1
By data y 
1  x2
Now we have the following table
x 0 1/4 ½ 3/4 1
1
y
1  x2 1 16/17 4/5 16/25 ½
y0 y1 y2 y3 y4
rd
1
Simpson’s rule for n = 4 is given by
3
b
h
 ydx  3  y
a
0  y4   4  y1  y3   2  y2  

1/ 4  1   16 16  4
1
1
 dx   1    4     2.   0.7854
0
1 x 2
3  2   17 25  5
1
1
Thus  1 x
0
2
dx  0.7854

To deduce the value of π: We perform theoretical integration and equate the


resulting value to the numerical value obtained.
1
1 

1
dx  
 tan 1
x 
  tan 1 (1)  tan 1 (0) 
0
1 x 2 0 4

We must have,  0.7854    4(0.7854)  3.1416
4
Thus   3.1416

2) Given that
x 4 4.2 4.4 4.6 4.8 5 5.2
log x 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487
5.2 th
3
Evaluate  log x dx using Simpson’s rule
4
8
th
3
Solution: Simpson’s rule for n = 6 is given by
8

Department of Mathematics/ACSCE Page 23


b
3h
 ydx   y0  y6   3  y1  y2  y4  y5   2  y3 
a
8 
5.2
3(0.2)
 log xdx  1.3863  1.6487   3 1.4351  1.4816  1.5686  1.6094   2 1.5261 
8 
e
4
5.2

 log
4
e xdx  1.8279
1
xdx
3) Using Weddle’s rule evaluate  1 x
0
2
by taking seven ordinates and hence

find loge2
Solution: Let us divide [0,1] into 6 equal strips ( since seven ordinates)
1 0 1
 length of each strip: h  
6 6
1 2 1 3 1 4 2 5 6
The points of division are x  0, ,  ,  ,  , ,  1
6 6 3 6 2 6 3 6 6
1
By data y 
1  x2
Now we have the following table

x 0 1/6 1/3 ½ 2/3 5/6 1


y
x 0 6/37 3/10 2/5 6/13 30/61 ½
1  x2
y0 y1 y2 y3 y4 y5 y6

Weddle’s rule for n = 6 is given by


b
3h
 ydx  10  y
a
0  5 y1  y2  6 y3  y4  5 y5  y6 

1
x 3(1/ 6)
 1 x 2
dx  0  5(6 / 37)  3/10  6(2 / 5)  6 /13  5(30 / 61)  1/ 2
0
10
1
x
 1 x
0
2
dx  0.3466

To deduce the value of loge2: We perform theoretical integration and equate the
resulting value to the numerical value obtained.

Department of Mathematics/ACSCE Page 24


1

1
x 1 1 1
 dx  log e (1  x 2 )   log e 2  log e 1
0
1 x 2
2 0 2 2
1
x 1
Hence  1 x
0
2
dx  log e 2
2
1
We must have, log e 2  0.3466  log e 2  2(0.3466)  0.6932
2
Thus log e 2  0.6932

Department of Mathematics/ACSCE Page 25


Solution of Algebraic and Transcendental Equations

The equation f(x) = 0 , is called as Transcedental equation , if it contains algebraic


function or trigonometric function or both.
Ex: (1) x4 - 7x3 + 3x + 5 = 0 is transcedental
(2) ex - x tan x = 0 is transcendental
The approximate root for an Transcedental equation is fond by the following two
iterative methods:
I. Regula-Falsi Method.

II. Newton Raphson’s Method

Method of false position or Regula-Falsi Method:


This is a method of finding a real root of an equation f(x) = 0 and is slightly an
improvisation of the bisection method.
Let x0 and x1 be two points such that f(x0) and f(x1) are opposite in sign.

Let f(x0) > 0 and f(x1) < 0


The graph of y = f(x) crosses the x-axis between x0 and x1
 Root of f(x) = 0 lies between x0 and x1

Department of Mathematics/ACSCE Page 26


Now equation of the Chord AB is
f (x1 )  f (x 0 )
y  f (x 0 )  (x  x 0 ) ...(1)
x1  x 0
When y =0 we get x = x2
x1  x 0
i.e. x 2  x 0  f (x 0 ) ...( 2)
f (x1 )  f (x 0 )
Which is the first approximation
If f(x0) and f(x2) are opposite in sign then second approximation
x2  x0
x3  x0  f (x 0 )
f (x 2 )  f (x 0 )
This procedure is continued till the root is found with desired accuracy.

Poblems:

1. Find a real root of x3 - 2x -5 = 0 by method of false position correct to three


decimal places between 2 and 3.
Answer:
Let f(x) = x3 - 2x - 5 = 0
f(2) = -1
f(3) = 16
 a root lies between 2 and 3
Take x0 = 2, x1 = 3
 x0 = 2, x1 = 3
x1  x 0
Now x 2  x 0  f (x 0 )
f (x1 )  f (x 0 )
32
 2 (1)
16  1
= 2.0588
f(x2) = f(2.0588) = -0.3908

 Root lies between 2.0588 and 3


Taking x0 = 2.0588 and x1 = 3
f(x0) = -0.3908, f(x1) = 16
x1  x 0
We get x 3  x 0  .f ( x 0 )
f (x1 )  f (x 0 )
0.9412
 2.0588  (0.3908)
16.3908
= 2.0813
f(x3) = f(2.0813) = -0.14680
Department of Mathematics/ACSCE Page 27
 Root lies between 2.0813 and 3
Taking x0 = 2.0813 and x1 = 3
f(x0) = 0.14680, f(x1) =16
0.9187
x 4  2.0813  (0.14680)  2.0897
16.1468
Repeating the process the successive approximations are
x5 = 2.0915, x6 = 2.0934, x7 = 2.0941, x8 = 2.0943
Hence the root is 2.094 correct to 3 decimal places.

2. Find the root of the equation xex = cos x using Regula falsi method correct to
three decimal places.
Solution:
Let f(x) = cosx - xex
Observe
f(0) = 1
f(1) =cos1 - e = -2.17798
 root lies between 0 and 1
Taking x0 = 0, x1 = 1
f(x0) = 1, f(x1) = -2.17798
x1  x 0
x2  x0  .f ( x 0 )
f (x1 )  f (x 0 )
1
 0 (1)  0.31467
 3.17798
f(x2) = f(0.31467) = 0.51987 +ve
 Root lies between 0.31467 and 1
x0 = 0.31467, x1 = 1
f(x0) = 0.51987, f(x1) = -2.17798

1  0.31467
x 3  0.31467  (0.51987)  0.44673
 2.17798  0.51987

f(x3) = f(0.44673) = 0.20356 +ve


 Root lies between 0.44673 and 1
0.55327
x 4  0.44673   0.20356  0.49402
2.38154

Department of Mathematics/ACSCE Page 28


Repeating this process

x5 = 0.50995, x6 = 0.51520, x7 = 0.51692, x8 = 0.51748


x9 = 0.51767, etc

Hence the root is 0.518 correct to 4 decimal places

Newton Raphson Method

This method is used to find the isolated roots of an equation f(x) = 0, when the
derivative of f(x) is a simple expression.

Let m be a root of f(x) = 0 near a.


 f(m) = 0
We have by Taylor's series
( x  a ) 2 ''
f ( x )  f (a )  ( x  a ) f (a ) 
'
f (a )  .....
2!
 f (m)  f (a )  (m  a ) f ' (a )  .....
Ignoring higher order terms
f(m) = f(a) + (m - a) f' (a) = 0
f (a )
or m  a  
f ' (a )
f (a )
or m  a  '
f (a )
Let a = x0, m = x 1
f (x 0 )
then x1  x 0  is the first approximat ion
f ' (x 0 )
f (x1 )
x 2  x1  is the second approximat ion
f ' (x1 )
.
.
.
f (x k )
x k 1  x k  is the iterative formula for Newton Raphson Method
f ' (x k )

Department of Mathematics/ACSCE Page 29


1. Using Newton's Raphson Method find the real root of x log10 x = 1.2 correct to
four decimal places.
Answer:
Let f(x) = x log10 x - 1.2
f(1) = -1.2, f(2) = -0.59794, f(3) = 0.23136
x loge x 1  loge x
We have f ( x )   1.2  f ' ( x ) 
loge 10 loge 10
 log10 e  log10 x
x log10 x k  1.2
 x k 1  x k  k
log10 e  log10 x K
Let x0 = 2.5 (you may choose 2 or 3 also)
2.5 log10 2.5  1.2
x1  2.5   2.7465
log10 e  log10 2.5
2.7465log 2.7465  1.2
x 2  2.7465   2.7406
log10 e  log10 2.7465
Repeating the procedure
x 3  2.7406
 x  2.7406 is the root of the given equation

2.Using Newton's Method, find the real root of xex = 2. Correct to 3 decimal
places.
Answer:
Let f(x) = xex - 2
f(0) = -2
f(1) = e - 2 = 0.7182
Let x0 = 1
f' (x) = (x + 1) ex
We have
x k e xk  2
x k 1  x k 
( x k  1) e x k
e2
x1  1   0.8678
2e
(0.8678) e 0.8678  2
x 2  0.8678   0.8527
(1.8678) e 0.8678
(0.8527) e 0.8527  2
x 3  0.8527   0.8526
(1.8527) e 0.8527

Department of Mathematics/ACSCE Page 30


 x  0.8526, is the required root. Correct to 3 decimal places

3. Find by Newton's Method the real root of 3x = cosx + 1 near 0.6, x is in radians.
Correct for four decimal places.
Answer:
Let f(x) = 3x - cosx - 1
f'(x) = 3 + sinx
3x k  cos x k 1
x k 1  x k 
3  sin x k
3 (0.6)  cos (0.6)  1
When x 0  0.6 x 1  0.6   0.6071
3  sin (0.6)
3 (0.6071)  cos (0.6071)  1
x 2  0.6071  0.6071
3  sin (0.6071)
Since x1 = x2
The desired root is 0.6071

4. Obtain the iterative formula for finding the square root of N and find 41
Answer:
Let x  N
or x2 - N = 0
 f(x) = x2 - N
f'(x) = 2x
Now
x 2k  N
x k 1  x k 
2x k
x N
 xk  k 
2 2x k
1 N
i.e. x k 1  x k  
2 xk 
To find 41
Observe that 36  41

 Choose x 0  6
1 41
x 1  6    6.4166
2 6
1 41 
x 2  6.4166    6.4031
2 6.4166

Department of Mathematics/ACSCE Page 31


1 41 
x3  6.4031   6.4031
2 6.4031
Since x2 = x3 = 6.4031
The value of 41  6.4031

5. Obtain an iterative formula for finding the p-th root of N and hence find (10)1/3
correct to 3 decimal places.
Answer:
Let xp = N
or xp - N = 0
Let f(x) = xp - N
f ' ( x )  px p1
x pk  N
Now x k 1  x k 
px pk1
Observe that 8 < 10
 81 / 3  101 / 3
i.e. 2  (10)1 / 3
 Use x0 = 2, p = 3, N=10
2 3  10
x1  2   2.1666
3 (2 2 )
(2.1666) 3  10
x 2  2.1666   2.1545
3(2.1666) 2
(2.1545) 3  10
x 3  2.1545   2.1544
3 (2.1545) 2
 (10)1 / 3  2.1544

6. Obtain an iterative formula for finding the reciprocal of p-th root of N. Find
(30)-1/5 correct to 3 decimal places.
Answer:
Let x -p = N
or x -p - N = 0
 f(x) = x -p - N
f'(x) = -px -p - 1
Now
p
xk N
x k 1  x k 
 p 1
p xk

Department of Mathematics/ACSCE Page 32


1
sin ce (32)1 / 5   0.5
2
We use x0 = 0.5, p = 5, N = 30
(0.5) 5  30
x1  0.5   0.50625, Re peating the process
5(0.5) 6
x 2  0.506495, x 3  0.506495
 (30) 1 / 5  0.5065

Department of Mathematics/ACSCE Page 33

You might also like