100% found this document useful (1 vote)
190 views65 pages

Numerical-Computational I Note Contd

The document discusses finite differences and numerical differentiation. Some key points: 1) Finite differences involve calculating the differences between successive function values to approximate derivatives. This is done by constructing difference tables that show the original function values and successive differences. 2) Numerical differentiation is the process of computing derivatives from discrete function data without knowing the actual function. This can be done using finite differences and interpolation formulas like Newton-Gregory. 3) Finite differences are used to approximate derivatives of all orders. First differences approximate the first derivative, second differences the second derivative, and so on.

Uploaded by

Obiwusi Kolawole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
190 views65 pages

Numerical-Computational I Note Contd

The document discusses finite differences and numerical differentiation. Some key points: 1) Finite differences involve calculating the differences between successive function values to approximate derivatives. This is done by constructing difference tables that show the original function values and successive differences. 2) Numerical differentiation is the process of computing derivatives from discrete function data without knowing the actual function. This can be done using finite differences and interpolation formulas like Newton-Gregory. 3) Finite differences are used to approximate derivatives of all orders. First differences approximate the first derivative, second differences the second derivative, and so on.

Uploaded by

Obiwusi Kolawole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 65

FINITE DIFFERENCES

The symbol  is called the difference operator. The differences of the first differences denoted by 2 y0 , 2

y1 , ..., 2 yn are called second differences, where


2 y0   y0

  y1  y 0

  y1   y 0

 y1  y0 = (y2 – y1) – (y1 – y0)

 y 2  2 y 1  y0

...
2 y1   y1

 y 3  2 y 2  y1
FINITE DI FFE RENCE S

2 is called the second difference operator. 3 y0  2 y1  2 y0

 y3  3y2  3y1  y0
Similarly
r yn  r 1 yn 1  r 1 yn

r r r 1 r
 ynr   1! yn1 r  2! y
nr
2
 ...  1 y n

 r yn  r 1 yn 1  r 1 yn

 yn  r  r y n  r  r n  1 y nr r n
1 1! 2! 2
 ...  1 y

Difference Table
It is a convenient method for displaying the successive differences of a function. The following table is
an example to show how the differences are formed.

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

x0 y0
y0
x1 y1 2 y0
y1 3 y0
x2 y2 2 y1 4 y0
y2 3 y1 5 y0
x3 y3 2 y2 4 y1
y3 3 y2
x4 y4 2 y3
y4
x5 y5

The above table is called a diagonal difference table. The first term in the table is y0. It is called
the leading term.
The differences y0 , 2 y 0, 3 y ,0 ..., are called the leading differences. The differences n yn

with a fixed subscript are called forward differences. In forming such a difference table care must be
taken to maintain correct sign.
FINITE DI FFERE NCES

Construct a forward difference table for the following data


Example 1
x 0 10 20 30
y 0 0.174 0.347 0.518

x y y 2 y 3 y
Solution

0 0

0.174
10 0.174 –0.001

0.173 –0.001

20 0.347 –0.002
0.171

30 0.518

Example 2
Construct a difference table for y = f(x) = x3 + 2x + 1 for x = 1, 2, 3, 4, 5.
Solution

x y = f(x) y 2 y 3 y

1 4
9
2 13 12
21 6

3 34 18
39 6
4 73 24
63
5 136
FINITE DI FFE REN CES 67

Example 3. By constructing a difference table and taking the second order differences as constant find the sixth term of
the series 8, 12, 19, 29, 42, ….
Solution Let K be the sixth term of the series. The difference table is

x y
 2
1 8
4
2 12 3

7
3 19 3

10

4 29 3

13
5 42 K – 55

K – 42
6 K

The second
 differences are constant. K – 55 = 3
 K= 3+55
The sixth term of the series is 58. K = 58.
Example 3.4 Find the first term of the series whose second and
subsequent terms are 8, 3, 0, –1, 0, …
Solution Given f(2) = 8, f(3) = 3, f(3) = 0, f(4) = –1, f(5) = 0, we
are to find f(1).
We construct the difference table with the given values.

2 3 4
x f f f
x f x x fx x

2 8

–5

3 3 2

–3 0

4 0 2 0

–1 0

5 –1 2

6 0

We
3 f x  4 f x  ...  0.
have
BACKWARD D I F F E R E N C E S
Let y = f(x) be a function given by the values y0, y1, … yn which it takes for the equally spaced values x0, x1, …, xn of the
independent variable x. Then y – y0, y2 – y1, …, yn – yn– 1 are called the first backward differences of y = f(x). They are denoted by
y0 , y1 , ..., yn , respectively. Thus we have

y1  y0  y1
y2  y1  y2

yn  yn 1  yn ,

where  is called the backward difference operator.

x y y 2 y 3 y 4 y

x0 y0
y1
x1 y1 2 y2
y2  3 y3
x2 y2
2 y3 4 y4
y3  3 y4
x3 y3
2 y4
y4
x4 y4
NUMERICAL DIFFERENTIATION

The process of computing the value of the derivative dy/dx for some particular
value of x from the
given data when the actual form of the function is not known is called Numerical differentiation. When the values of the
argument are equally spaced and we are to find the derivative for some given x lying near the beginning of the table, we
can represent the function by Newton–Gregory forward
interpolation formula. When the value of d y/ is required at a point near the end of the table, we use
dx

Newton’s backward interpolation formula and we may use suitable Central difference interpolation formula when the
derivative is to be found at some point lying near the middle of the tabulated values. If the values of argument x are not
equally spaced, we should use Newton’s divided difference formula to approximate the function y = f(x).
DERIVATIVES USING NEWTON’S FORWARD INTERPOLATION FO R M U L A

Consider Newton’s forward interpolation formula

uu1 u u1u2
y  y  uy  2 y  3 y
0 0 0 0  ... (1)
12 1
23

x  x0 (2)
wher u
e h

differentiating (1) w.r.t. u we


get
3u 
2 6u  2
 3
dy 2u  y
 y0  0 y0  ... (3)
12
1du 2 12
 3
NUMERICAL DIFFERENTIATION

Example 8.1 From the table of values belowdycompute d y


2

and 2 dx for x = 1
dx

x 1 2 3 4 5 6
y 1 8 27 64 125 216

Solution The difference table


is

x y y 2 y 3 y 4 y

1 1
7

2 8
12

19 6
3 27
18 0

27 6
4 64
24 0
61
6
5 125 30
91
6 216
dy
d2y
Example From the following table of values of x and y find and
for x =
1.05.
dx
x 1.00 1.05 1.10 1.15 1.20 1.25 dx 1.30 2

y 1.00 1.024 1.04 1.07 1.09 1.118 1.14


000 70 881 238 544 03 017

Solution The difference table is as


follows

x y 2 3 4 5

1.00 1.00000
0.0247
0
1.05 1.02470 –0.00059
0.00241 –0.00002
1
1.10 1.04881 –0.00054 0.00003
0.02357 –0.00001 –0.00006
1.15 1.07238 –0.00051 –0.00003
0.0230 –0.00002
6
1.20 1.09544 –0.00047
0.0225
9
1.25 1.11803 –0.00045
0.0221
4
1.30 1.14017
Interpolation

Forward Difference

Q .1. Construct a forward difference table for the following given data.
x 3.60 3.65 3.70 3.75
y 36.598 38.475 40.447 42.521

Ans.:
x y y 2y 3y

3.60 36.598 1.877


0.095 0.007
3.65 38.475 1.972
0.102
3.70 40.447 2.074
3.75 42.521

□□□

10
Backward Difference

Q .1. Construct a backward difference table form the following data :


sin 30 = 0.5000, sin 35 = 0.5736, sin 40 = 0.6428, sin 45 = 0.7071
Assuming third difference to be constant find the value of sin 25 .
Ans.:
x y y 2y 3y

25 ?

30 0.5000 y30 =?
2y35 =?
3y40 =?
35 0.5736 0.0736
-0.0044

40 0.6428 0.069 -0.0005


2 -0.0049

45 0.7071
0.064
Since we know that 3y should be3constant so

3y40 = –0.0005

2y40 – 2y35 = –0.0005

-0.0044 – 2y35 = –0.0005


2y35 = +0.0005 – 0.0044

= -0.0039
Again
2y35 = – 0.0039

y35 –y30 = -0.0039 0.0736

– y30 = –0.0039

y30 = 0.0039 + 0.0736


11
= 0.0775
Again
y30 = 0.0775

y30 –y25 = 0.0775 0.5000

–y25 = 0.0775

y25 = 0.5000 – 0.0775

= 0.4225
Hence sin 25 = 0.4225

□□□

12
Newton Gregory Formula for Forward
Interpolation

Q .1. Use Newton formula for interpolation to find the net premium at the age 25
from the table given below :
Age 20 24 28 32
Annual net premium 0.01427 0.01581 0.01772 0.01996
Ans.:
Age (x) ƒ(x) ƒ(x) 2 ƒ(x) 3 ƒ(x)
20 0.01427
0.00154
24 0.01581 0.00037
0.00191 -0.00004
28 0.01772 0.00033
0.00224
32 0.01996
Here a = 20 , h=4 and k=2

x xk
u = 0.25
h
Using following Newton’s Gregory forward interpolation formula :
k
y x yk yk u
2
y u u 1 .....
nk
y 1 .....(u ((n k) 1))
2! k
u
n k !
f(25) 0.00033 u
0.01581+0.00191(0.25) + 2x1 (.75(0.25))
=
= 0.0162543

13
Q .2. From the following table find the number of students who obtained less than
45 marks :
Marks No. of Students
30 – 40 31
40 – 50 42
50 – 60 51
60 – 70 35
70 – 80 31
Ans.:
Marks (x) No. of ƒ(x) 2 ƒ(x) ƒ(x)
3 4 ƒ(x)
Students ƒ(x)
Less than 40 31
42
Less than 50 73 9
51 -25
Less than 60 124 -16 37
35 12
Less than 70 159 -4
31
Less than 80 190
Here a = 40 , h = 10 and k=1
x xk
u =0.5
h
using following
forward interpolation
2 ku u nk
y x
formula y:k yk u y 1 ..... y 1 .....(u ((n k) 1))
2! k
u

=
9
31+ 42(0.5) + 2 0.5( 0.5) + u n 25 k ! 37
6 0.5( 0.5)( 1.5) + 240.5( 0.5)( 1.5)( 2.5)
= 47.8672 = 48 (approximately)
Hence the no. of students who obtained less than 45 marks are 48.
Q .3. Find the cubic polynomial which takes the following values
x 0 1 2 3
ƒ(x) 1 0 1 10
Find ƒ(4)

14
Ans.: Here we know that a = 0, h = 1 then form Newton’s Gregory forward
interpolation formula.

Pn (x) = ƒ(0) + xc1 ƒ(0) + xc2 2ƒ(0) + ___ xcn nƒ(0) ____ (1)

(x) ƒ(x) ƒ(x) 2 ƒ(x) 3 ƒ(x)


0 1
-1
1 0 2
1 6
2 1 8
9 ƒ(4) – 27 = 6
3 10 ƒ(4) – 19 (it should be constant)
ƒ(4) – 10
4 ƒ(4)

Substituting the values in equation (1) from above table :

x(x 1) x(x 1)(x 2)


P3 (x) = 1 + x (-1) + 1 (2) + 1 2 3 (6)

P3 (x) = 1 –x + x2 –x + x3 –3x2 + 2x
Hence the required polynomial of degree three is
=xx33––2x
2x22++11

Again ƒ(4) – 27 = 6
ƒ(4) = 33

□□□

15
Newton’s Formula for Backward
Interpolation

Q .1. The population of a town in decennial census was as given below :


Year 1891 1911 1921 1931
1901
Population (in thousands) 46 81 93 101
Estimate the population for the year
66 1925.
Ans.:

Year Population ƒ(x) 2 ƒ(x) 3 ƒ(x) ƒ(x)


4
(x) (in thousand)
ƒ(x)

1891 46
20
1901 66 -5
15 2
1911 81 -3 -3
12 -1
1921 93 -4
8
1931 101
Here x = 1925, h = 10 , k=5
x xk
u =1925 – 1931/10 = -0.6
h
Now using Newton’s Backward interpolation formula :
k
y(x) yk yk u
2
y u u 1 .....
k1
y 1 ......(u ((k 1) 1))
2! k
u
u k 1!
Put all the values we get
= 96.6352 thousand (approximately)
16
□□□

Divided Difference Interpolation

Q1. Construct a divided difference table from the following data :


x 1 2 4 7 12
ƒ(x) 22 30 82 106 216

Ans.:
x ƒ(x) ƒ(x) 2 ƒ(x) 3 ƒ(x) 4 ƒ(x)

1 22

30 22 = 8
2 1

2 30 26 8
=6
4 1

82 30 ( 3.6 6)
= 26 = -1.6
4 2 7 1

4 82 8 26
=- 0.535 ( 1.6)
3.6 12 1
7 2
= 0.194

106 82 1.75 ( 3.6)


=8 =
7 4 12 2
0.535

17
x ƒ(x) ƒ(x) 2 ƒ(x) 3 ƒ(x) 4 ƒ(x)

7 106 22 8
=
12 4
1.75

216 106
12 7
= 22

12 216

Q .2. By means of Newton’s divided difference formula find the value of ƒ(2), ƒ(8)
and ƒ(15) from the following table :

x 4 5 7 10 11 13

ƒ(x) 48 100 1210294 900


2028
Ans.: Newton’s divided difference formula for 4, 5, 7, 10, 11, 13 is :
ƒ(x) = ƒ(4) + (x – 4) ƒ(x) + (x – 4) (x – 5) 2 ƒ(4) + (x – 4) (x – 5) (x – 7) 3
ƒ(4)
5 5,7 5,7,10

4
+ (x – 4) (x – 5) (x – 7)(x – 10) ƒ(4) + _ _ _ _ _ _ _ ___ (1)
5,7,10,11

So constructing the following divided difference table :


x ƒ(x) ƒ(x) 2 ƒ(x) ƒ(x)
3 4 ƒ(x)

4 48
100 48 = 52
5 4

5 100 97 52 = 15
7 4
294 100 21 15
= 97 =1
7 4 10 4

18
x ƒ(x) ƒ(x) 2 ƒ(x) 3 ƒ(x) 4 ƒ(x)

7 294 202 97 0
= 21
10 5

900 294 27 21
= 202 =

1
10 7 11 5

10 900 310 202 0


= 27
11 7

1210 900 33 27
= 310 =1
11 10 13 7

11 1210 409 310


= 33
13 10

2028 1210
= 409
Substituting the
13values
11 from above table in equation (1)

13 ƒ(x) = 48 + 52 (x – 4) + 15 (x – 4) (x – 5) + (x – 4) (x – 5) (x – 7)
2028
= x2 (x – 1) __ _(2)

Now substituting x = 2, 8 and 15 in equation (2)


ƒ(2) = 4 (2 -1) = 4
ƒ(8) = 64 (8 – 1) = 448

ƒ(15) = 225 (15 – 1) = 3150

Q .3. Find the polynomial of the lowest possible degree which assumes the values 3,
12, 15, -21 when x has values 3, 2, 1, -1 respectively.

19
Ans.: Constructing table according to given data
x ƒ(x) ƒ(x) 2 ƒ(x) ƒ(x)
3

-1 -21
18
1 15 -7
-3 1
2 12 -3
-9
3 3

Substituting the values in Newton’s divided difference formula :

ƒ(x) = ƒ(x0) + (x –x0) ƒ(x0, x1) + (x –x0) (x –x1) ___(x –xn-1) + ƒ(x0, x1, x2 ..xn)

= -21 + {x – (-1)} 18 + { x – (-1)} (x – 1) (-7) + {x – (-1)} (x – 1) (x – 2) (1)


= x3 – 9x2 + 17x + 6

□□□

20
= 1 y 9
y1
9 1 1 3
16 y 16 y
3
16
16
1
1 y1 y1 y 3- y 1 y -1 y
= 2 16
3

1 1 1
1 y1 y y 3- y 1 y -1 y
= 2 1
8 2 2
3

Hence proved.
□□□

21
Unit 2

Central Difference

22
Gauss Forward Interpolation Formula

By Newton Interpolation Formula

(1)
From central difference table we have

This is called Gauss Forward Interpolation Formula.

23
Gauss Backward Interpolation Formula

We have

By Newton Forward Formula

This is called Gauss Backward Interpolation Formula.

Stirling’s Formula

Gauss Forward Interpolation Formula

Gauss Backward Interpolation Formula

24
Taking the mean of these formula

Q.1 Apply the central difference formula to obtain f(32)

Ans
U= ( 32- 30)/5 = 0.4

Q.2

25
Ans

Q.3

26
Ans

Q.

Ans

27
Q.2

Ans

28
Q.3

Ans

29
30
Differention

31
32
33
34
35
36
37
38
Q.1

Ans

39
40
Q.2

Ans

41
Q.

Ans

42
43
44
45
46
Q .1. Compute the value of following integral by Trapezoidal rule.
1.4
(sin x log x + ex )
e
dx
0.2
Ans.: Dividing the range of integration in equal intervals in the interval [0.2, 1.4]

47
1.4 0.2 1.2
0.2 h
6 6
x sin x log x ex y = sin x –log +ex
e

0.2 0.19867 -1.6095 1.2214 y0 = 3.0296


0.4 0.3894 -0.9163 1.4918 y 1 = 2.7975
0.6 0.5646 -0.5108 1.8221 y2 = 2.8975
0.8 0.7174 -0.2232 2.2255 y3 = 3.1661
1.0 0.8415 0.0000 2.7183 y4 = 3.5598
1.2 0.9320 0.1823 3.3201 y 5 = 4.0698
Using
1.4following trapezoidal
0.9855 rule
0.3365 4.0552 y6 = 4.7042
1.4
I= (sin x log x + ex ) dx
e
0.2

h
= 2[(y0 + y6) + 2 (y 1 + y2 + y3 +y4 +y5)]

0.2
= 2 [7.7338 + 2 (16.4907)]

= 4.07152

5.2
1
Q.2. Calculate the value of the integral log x dx by Simpson’s ‘ ’ rule.
4
e 3

Ans.: First of all dividing the interval [4 5.2] in equal parts.


5.2 4 1.2
0.2 h
6 6
xi yi = log x = log x 2.30258
e 10

4.0 y0 = 1.3862944

4.2 y 1 = 1.4350845

4.4 y2 = 1.4816045

4.6 y3 = 1.5260563

4.8 y4 = 1.5686159

5.0 y 5 = 1.6049379

48
5.2 y6 = 1.6486586

1
Using following Simpson’s ‘ ’
rule : 3
h
I=
[(y0 + y6) + 4 (y 1 + y3 + y5) +2 (y2 +y4)]
3
0.2
= 3 [3.034953 + 18.232315 + 6.1004408]

0.2
= 3 [27.417709] = 1.8278472

1
dx
Q.3. Evaluate 3 using Simpson’s ‘ ’ rule :
0 1 + x2 8
Ans.: Dividing the interval [0, 1] into six equal intervals.
1 0 1
h
6 6

x 1
y= h
(1 x2 )
x0 = 0 y0 = 1.000

x0 + h = 1/6 y 1 = (36/37) = 0.97297

x0 + 2h = 2/6 y2 = (36/40) = 0.90000

x0 + 3h = 3/6 y3 = (36/45) = 0.80000

x0 + 4h = 4/6 y4 = (36/52) = 0.69231

x0 + 5h = 5/6 y 1 = (36/61) = 0.59016

x0 + 6h = 1 y6 = (1/2) = 0.50000

Using following Simpson’s ‘3/8’ rule.


x0 +nh
3h
ydx= (y0 + yn )+3(y1 + y2 + y4 + y5 +......)+2(y3 + y6
x0 +.......) 8
1
1
ydx = (1+ 0.5) + 3 (0.97297 + 0.9 + 0.69231 + 0.59016) + 2
0 (0.8)
16

49
1
= [1.5 + 9.46632 + = 0.785395
16
1.6]

□□□
Gauss two point

50
Newton Raphson Method

Newton Rapson’s method is a method for finding successively approximation to the


roots.

Derivation of Newton Rapson’s Method

We have the Taylor series expansion


f '' x i 2
f n xi
f xi 1 f xi f ' xi h n
h ....... 2! n! h
Where h xi 1
x1
f '' x i 2 f n xi n
f x i 1 f xi f ' xi xi 1 x1 xi 1 x1 ....... xi 1 x1
2! n!

Truncate the series


We get
f f xi f ' xi xi
xi 1 xi 1
At the intersection of the x axis f =0 so we have
xi 1
0 f xi f ' xi xi
xi 1
Solving this we get
f xi
xi 1 xi
f'xi

Q .1. Find the root of the equation x2 – 5x + 2 = 0 correct upto 5 decimal places. (use
Newton Raphson Method.)
Ans.: : Given ƒ(x) = x2 – 5x + 2 = 0
Taking x = 0

51
ƒ(0) = 2 (which is positive)
Taking x = 1
ƒ(1) = 1 – 5 + 2 = – 2 (which is negative)
ƒ(0) . ƒ(1) < 0
The root of the given equation lies between 0 and 1
Taking initial approximation as
01
= 0.5
x1 = 2
ƒ(x) = x2 – 5x + 2
f' (x) = 2x – 5

Since x 1 = 0.5

ƒ(x1) = (0.5)2 –5(0.5)

+ 2

= 0.25 – 2.5
+2
= – 0.25

f' (x1) = 2(0.5) –5

= 1 –( 50.25)
x2 = 0.5=–– 4 4

Now finding x2 0.25


= 0.5 – 4
= 0.4375

ƒ(x2) = (0.4375)2 –5(0.4375) + 2

= 0.19140 – 2.1875 + 2
= 0.003906

f' (x2) = 2(0.4375) –5

= – 4.125

Now finding x3 f (x 2 )
x3 = x2 – f 1 (x2 )

52
= 0.4375 0.003906
– ( 4.125)
= 0.4375 + 0.0009469
= 0.43844

ƒ(x3) = (0.43844)2 –5(0.43844) + 2

= 0.19222 – 2.1922 + 2
= 0.00002

f'(x3) = 2 x (0.43844) – 5

= – 4.12312
f (x3 )
x4 = x3 – f 1 (x )
3

0.00002
= 0.43844
– ( 4.12312)
= 0.43844 + 0.00000485
= 0.43844
Hence the root of the given equation is 0.43844 which is correct upto five decimal
places.

Q .2. Apply Newton Raphson Method to find the root of the equation 3x – cos x – 1
= 0 correct the result upto five decimal places.
Ans.: Given equation is
ƒ(x) = 3x – cos x – 1
Taking x = 0
ƒ(0) = 3(0) –
cos 0 – 1
=–2
Now taking x = 1
ƒ(1) = 3(1) –
cos (1) – 1
=3–
0.5403 – 1
01 =
= 0.5
x 1 = 1.4597
2
Taking initial
approximation as 53
ƒ(x) = 3x – cos x – 1
f'(x) = 3 + sin x
At x1= 0.5

ƒ(x1) = 3 (0.5) –

cos (0.5) –1

= 1.5 – 0.8775
–1
= – 0.37758

f'(x1) = 3 –sin (0.5)


f (x1 )
x2 = x 1 – = 3.47942
f '(x1 )
Now to find x2 using following
(
= 0.5
0.37758)
(3.47942)
formula

= 0.5 + 0.10851
= 0.60852

ƒ(x2) = 3 (0.60852) –cos (0.60852) – 1

= 1.82556 – 0.820494 – 1
= 0.005066

f'(x2) = 3 + sin (0.60852)

= 3.57165

Now finding x3 (0.005066)


x3 = 0.60852 – (3.57165)
= 0.60852 – 0.0014183
= 0.60710

ƒ(x3) = 3 (0.60710) –cos (0.60710) –1

= 1.8213 – 0.821305884 – 1
= – 0.00000588

f' (x3) = 3 + sin (0.60710)

= 3 + 0.57048
= 3.5704
54
Now to find x4 using following formula
f (x3 )
x4 = x3 – f '(x3 )

( 0.00000588)
= 0.60710
– 3.5704
= 0.60710 + 0.00000164
= 0.60710

Which is same as x3

Hence the root of the given equation is x = 0.60710 which is correct upto five
decimal places.

□□□

55
Iterative Method

Q .1. Find a root of the equation x3 + x2 – 1 = 0 in the interval (0,1) with an accuracy of
10-4.
Ans.: Given equation is ƒ(x) = x3 + x2 – 1 = 0
Rewriting above equation in the form
x= (x)
The given equation can be expressed in either of the form : (i)x3 +
x2 – 1 = 0
x3 + x2 = 1 x2 (x + 1)
=1
1
x2 =
1+x
1
x= ___ (1)
(1
x)
(ii) x3 + x2 – 1 = 0
x2 = 1 – x3
(1/2)
x = (1 + x3) ___ (2)
(iii) x3 + x2 – 1 = 0
x3 = 1 – x2
x = (1 – x2) 1/3 ___ (3)
Comparing equation (1) with x – g (x) = 0 we find that
1
g(x) =
(1
x)
g(x) = (1 + x) -1/2
g'(x) = – ½ (1 + x)-3/2
│g'(x)│= ½ (1 + x)3/2

56
1 = <1
2(1 + x) 3/ 2

Now comparing equation (2) with x – g(x) = 0


We find that g(x) = (1 – x3)1/ 2
g'(x) = ½ (1 + x3) -1/2 x (- 3x2)

-3 0 1
=
2 2
3
│g'(x)│= x2
(1 - 2
Which is not less xthan
) one. 2 1/2

Now comparing equation (3) with x – g(x) = 0


g(x) = (1 – x2) 1/3

1
g'(x) = 3(1 – x2)-2/3 x (– 2x )
2 x
=
3 (1 - x2 ) 1/2

2 x
│g'(x)│= 3 (1 2 2/3
x )
Which is not less than one.
Hence this method is applicable only to equation (1) because it is convergent for
all x (0, 1)
Now taking initial approximation
0 1
x1 = = 0.5
2
1 1
So x2 = (1+ x 1 ) [using iteration scheme x n+1 = (xn ]
1)
1
= =
x2 = 0.51 1 0.81649
1.5
Similarly
1 1
= = 0.7419
x3 = (x2 0.81649 1
1)

57
1 = 1 = 0.7576
x4 =
(x3 1) 0.7419 1
1 1
= = 0.7542
x5 = (x4 1) 0.7576 1
1 1
= = 0.7550
x6 = (x5 1) 0.7542 1
1 1
= = 0.7548
x7 = (x6 1) 0.7550 1
1 1
= =
x8 =
(x7 1) 0.7548
0.7548 1
Hence the approximate root of the given equation is x = 0.7548

Q.2. Find the root of the equation 2x = cos x + 3 correct upto 3 decimal places.
Ans.: Given equation is
ƒ(x) = 2x – cos x – 3 = 0
Rewriting above equation in the form x = g(x)
2x = cos x + 3

cos x + 3 ___ (1)


x= 2
Comparing above equation with the following equation x = g(x) we find the

cos x + 3 cos x 3
g(x) = =
2 sin x 2 2
g'(x) =
2

sin x
│g'(x)│= 2
For x (1, 2)
│sin x│< 1

cos (x n ) + 3
Hence the iterative scheme xn+1 = 2is convergent.

Now taking initial approximation x 1 = 1.5


cos x1 + 3 cos (1.5) + 3
x2 = = = 1.5353
2 2

58
x3 = cos (x2 ) + 3 = cos (1.5353) + 3 = 1.5177
2 2
cos (x3 ) + 3 cos (1.5177) + 3
x4 = 2 = 2 = 1.5265

cos (x4 ) + 3 cos (1.5265) + 3


x5 = 2 = 2 = 1.5221

cos (x5 ) + 3 cos (1.5221) + 3


x6 = 2 = 2 = 1.5243

cos (x6 ) + 3 cos (1.5243) + 3


x7 = 2 = 2 = 1.5230

cos (x7 ) + 3 cos (1.5230) + 3


x8 = 2 = 2 = 1.523

Which is same as x7

Hence the root of the given equation is x = 1.523 (which is correct upto 3
decimals)
Q.3. Find the root of the equation xex = 1 in the internal (0, 1) (use iterative
Method) Ans.: Given equation is xex – 1 = 0
Rewriting above equation in the form of x = g (x)
xex – 1 = 0
xex = 1 x = e-
x

Comparing it with the equation x = g (x) we find that


g(x) = e-x
g' (x) = -e-x
│g' (x)│ = e-x < 1
Hence the iterative scheme is

xn
xn+1 = e

Now taking initial approximation


x1= 0.5

x2 = e x1 = e (0.5)
= 0.60653 x3 = e x2
=e
(0.6065)
= 0.5452
59
x3
x4 = e =e (0.5452)
= 0.5797

x4
x5 = e =e 0.5797
= 0.5600 x6 = e

x5 x6
=e 0.5600
= 0.5712 x7 = e =

e (0.5712)
= 0.5648

x7 (0.5648)
x8 = e =e = 0.5684 x9 = e

x8 (0.5684) x9
=e = 0.5664 x10 = e =e

(0.5664)
= 0.5675

Now

x10
x 11 = e =e 0.5675
= 0.5669 x12 = e

x11 0.5669 x12


=e = 0.5672 x13 = e =e
□□□
x13 (0.5671)
(0.5672)
= 0.5671 x14 = e =e

= 0.5671

Hence the approximate root the


given equation is x = 0.5671

60
Gauss Elimination Method

Q .1. Use gauss elimination method to solve :


x+y +z = 7
3x + 3y + 4z = 24 2x + y
+ 3z = 16
Ans.: Since in the first column the largest element is 3 in the second equation, so
interchanging the first equation with second equation and making 3 as first pivot.

3x + 3y + 4z = 24 _ _ _ (1)
x+y +z =7 ___
(2)
2x + y + 3z = 16 ___ (3)
Now eliminating x form equation (2) and equation (3) using equation (1)
-3 equation (2) + equation (1), 3 equation (3) – 2
2
equation (1) we get
-3x - 3y - 3z = -21 6x 3y 9z
3x + 3y + 4z = and 48
24 6x 6 y 8z 48
z 3 3y z
= 3y - z = 0
0
3x + 3y + 4z = 24 _ _ _ (4)
z =3 _ _ _ (5)
3y – z = 0 _ _ _ (6)
Now since the second row cannot be used as the pivot row since a22 = 0 so interchanging
the equation (5) and (6) we get
3x + 3y + 4z = 24 ___ (7)
3y – z = 0 ___ (8)
z =3 ___ (9)
Now it is upper triangular matrix system. So by back substitution we obtain.
z=
3
61
From equation (8)
3y – 3 = 0
3y = 3
y =1
From equation (7)
3x + 3(1) + 4 (3) = 24
3x + 3 + 12 = 24
3x + 15 = 24
3x = 9
x=
3
Hence the solution fo given system of linear equation is
x=3 , y=1 , z =3

Q .2. Solve the following system of linear equation by Gauss Elimination Method :

2x1 + 4x2 + x3 = 3

3x1 + 2x2 – 2x3 = – 2 x1 – x2 +


x3 = 6
Ans.: Since in the first column the largest element is 3 in the second row, so
interchanging first equation with second equation and making 3 as first pivot.
___
3x1 + 2x2 –2x3 = –2
(1)
2x1 + 4x2 + x3 = 3 x 1 ___
(2)
–x2 +
Eliminating x 1xform
3 = 6 equation (2) and equation (3) using _ __
equation (1)
(3)
-3 equation (2) + 2 equation (1) and + 3 equation (3) – equation (1)
6x1 3x3 = 9 3x1 3x2 + 3x3 = 18
12x2
4x3 = 4 and 3x1 + 2x2 2x3 =
6x1 + 4x8x
2 2
2 5x2 + 5x3 = 20

7x3 = 13 x2 –x3 = -4

8x2 + 7x3 = 13
___
So the system now becomes : (4)

3x1 + 2x2 –2x3 = –2 ___


62 (5)
8x2 + 7x3 = 13
x2 –x3 = –4 ___ (6)

Now eliminating x2 from equation (6) using equation (5) {8 × equation (6) –equation (5)}

8x2 - 8x3 = -32


8x2 + 7x3 = -13
-15x3 = -45

x3 = 3

So the system of linear equation is


___
3x1 + 2x2 –2x3 = –2 (7)

8x2 + 7x3 = 13 ___


(8)
x3 = 3 it is upper triangular system so by back substitution we obtain
Now ___
(6)
x3 = 3

From equation (8)

8x2 + 7(3) = 13

8x2 = 13 – 21

8x2 = –8

x2 = –1
From equation
(9)

3x1 +2(–1)

–2 (3) = –

3x1 = –2 +

2+ 6
□□
3x1 = 6

x1 = 2

Hence the solution of the given system of linear equation is :


x1 = 2 , x2 = – 1 , x3 = 3
63


Gauss-Jordan Elimination Method

Q .1. Solve the following system of equations :

_ _ _ (1)
10x1 + 2x2 + x3 = 9
_ _ _ (2)
2x1 + 20x2 – 2x3 = – 44
_ _ _ (3)
-2x1 + 3x2 + 10x3 = 22

Use Gauss Jordan Method.


Ans.: Since in the given system pivoting is not necessary. Eliminating x 1 from equation
(2) and equation (3) using equation (1)
5 equation (2) – equation (1) , equation (3) + equation (1)
5
10x1 100x2 10x3 = 10x1 + 15x2 + 50x3 = 110
220 and 10x1 + 2x 2 + x3 = 9
10x1 + 2x2 + x3 = 9 17x2 + 51x3 = 119
98x2 11x3
= x 2 + 3x 3 = 7
= 229
Now the system of equation becomes
___
10x1 + 2x2 + x3 = 9 (4)

98x2 –11x 3 = –229 x2 + 3x3=


___
(5)
Now eliminating
7 _ _ _ (5)
x2 from equation (4) and (6) using equation
98 equation (6) – equation (5) , 49 equation
(6) (4) - equation (5)
98x2 +294x3 = 686 490x1 + 98x2 + 49x3 = 441
98x 2 11x3 = 229 98x2 11x3 =
305x3 = 915 9
490x1 + 60x3 =
x3 = 3 670
Now the system of equation becomes : = 49x + 6x3 = 67
___ (7) 1
49x1 +0 + 6x3 = 67

64
___
98x2 –11x 3 = –229 x3
(8)
it 3reduces to upper triangular system now_ by
Hence = _ _back substitution.
(9)
x3 = 3
From equation (8)

98x2 –1 1 × 3 = – 229

98x2 = –229 + 33

98x2 = –196 x2 = – 2
From equation (7)

49x1 + 6(3) = 67

49x1 = 67 – 18

49x1 = 49

x1 = 1
Thus the solution
of the given
system of linear
equation is

x1 = 1

x2 = – 2

x3 = 3

65

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy