Stucor Ma3251 Aq

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

MA3251

DOWNLOADED FROM STUCOR APP

P
AP
R
CO
Conclusion:

Since |Z| > 1.96, H is rejected at 5% Los.


0

The sample cannot be regards as drawn from the same population.


U
ST

4. What are the uses of t-distribution?

(i) To test if the sample mean x differs significantly from the hypothetical value  of
the population mean.
(ii) To test the significance of the difference between two sample means.
(iii) To test the significance of an observed sample correlation coefficient and sample
regression coefficient.

5. Given n1  n2  20, x1  220, x 2  250, s1  20, s2  25 . Compute the standard error for x1  x2

s12  s22
S .E ( x1  x 2 ) 
n 1
400  625
  7.345
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

6. A random sample of size 16 has 53 as mean and the sum of the squares of the deviation taken
from Mean is 150. Can this sample be regarded as taken from the population having 56 as mean?
( t for 15 d.f at 5% level=2.13)

the test statistic,


x
t        (1)
S/ n
1 150
where S 
n 1
 ( x  x)2 
15
S  3.162

P
(53  56) 2
(1)  t   3.8
3.162

AP
t  3.8
Since t  2.13, H 0 is rejected .  The sample is not drawn from the population
Having 56 as mean

7. Two independent samples from normal pop's with equal variances gave the following results
R
Samp Size Mean S.D
CO

1 16 23.4 2.5

2 12 24.9 2.8
Test for the equations of means.
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
.
R
CO
U
ST

8. State the conditions for applying  2 -test


(iv) The sample observations should be independent.
(v) The constraints on cell frequencies must be linear
(vi) Total frequency N>30
(vii) No theoretical frequency should be less than 5.

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

9. What is goodness of fit test?


Chi-Square test enables us to ascertain how well the theoretical distributions such as Binomial,
Poisson or Normal etc, fit empirical distributions. If calculated  2 < tabulated value, the fit is

considered to be good. If the calculated  2 >table value, the fit is considered to be poor.

The value of  2 
 (O  E )
i i
2

Ei
Oi : Observed frequency
Ei : Expected frequency

10. Calculate  2 for the following data

P
Oi : 37 44 19
Ei : 31 38 31

AP
 2

 (O  E )
i i
2


36 36 144
   6.76
Ei 61 38 31
a b
11. For 2x2 consistency table
c d
Write the formula for  2
R
(a  b  c  d )(ad  bc)2
2 
(a  c)(b  d )(a  b)(c  d )
CO

12 Find the value of  2 for the data in the consistency table.


2 10
8 4
U

(8  80)2 (24)
2   6.17
(10)(14)(12)(12)
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
CO
U

14. What do you mean by Level of Significance?


In testing the given hypothesis, the maximum probability with which we
ST

Conclude be willing to risk is called Level of Significance of the test

15. Write the applications of F-test and chi-square test.


Application of F-test
(i) To test whether there is any significant difference between two estimates of
population variance
(ii) To test if the two sample have come from the same population.
Application of Chi-square test:
(i) To test the significance of discrepancy between experimental values and the
theoretical values

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

16. Two samples of sizes 9 and 8 give the sum of squares of deviations from their
respective means equal to 160 and 91 respectively. Compute the value of F.
160 91
S12   20; S22   13
8 7
here S1  S 2 ,
2 2

S12 20
F   1.5385
S 22 13
F  1.5385

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

UNIT-II
DESIGN OF EXPERIMENTS

Design of experiments:

Design of experiments may be defined as the logical construction of the experiment in which
the degree uncertainty with which the inference as drawn may be well defined.
The purpose of experimental design is to obtain maximum information of an experiment with
the minimum experimental error, cost and labour.

Basic principles of experimental design:

P
AP
The following three basic principles are adopted when the experiments are designed.
1. Randomization.
2. Replication.
3. Local control.
Randomization
R
Randomization is a technique by which two or more treatments are applied to different group
CO
of the sample, the treatments to be applied to any group being decided by random sampling technique.
Replication
Replication means the repetition of an experiment. It means the repetition of the treatment
under investigation. It helps us in estimating the experimental error. Thus, the repetition of treatments
U

results in more reliable estimate than is possible with single observation.


Local control
ST

The process of reducing the experimental error by dividing the relatively the heterogeneous
experimental area into homogeneous is known as local control.
we use local control which involves “grouping”(combining homogenous set of plots) ,
“blocking”(assigning same number of plots in different blocks) and “balancing”(adjusting
grouping and blocking procedure) of experimental units.
ANALYSIS OF VARIANCE
Analysis of variance is technique, which is used to test the equality of three or more population
means by comparing the sample variances using F-distribution. This technique split up the variance
into its various components, usually into two parts
i. Variance between the samples.
ii. Variance within the samples.

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Completely Randomized Design (C.R.D):


Suppose that there are N plots available & we wish to compare h treatments for an experiment and let
the ith treatment be repeated (replicated) ni times such that n1 +n2+…+ nh= N. The N plots are selected
randomly and each given a treatment to get the design which is completely random. This design is
used only if plots used are homogenous.
Analysis of variance (ANOVA) for one way classification (or) one factor experiments:
Procedure:
Let N-Total number of items in the given data.
K- Number of treatment.

P
n-Number of samples in each treatment.
STEP 1: Set up Null Hypothesis H0

AP
Set up Alternative Hypothesis H1
Prepare Table – I using the following steps:
STEP 2: Find Sum of all the items of the sample where K isnumber of
Treatments, T-total and G-Grand total.
R
STEP 3: FindSum of squares of all the items of eachtreatment

STEP 4: Find the Correction Factor (C.F) = (G-Grand total, N-Total number of obsevations)
CO

Table – I (calculations for ANOVA):


STEP 5:Find Total sum of squares (T.S.S) = Sum of squares of all the
items - Correction Factor
U

STEP 6: Find Sum of squares between samples (SSB)


ST

STEP 7:Find Degrees of freedom ,

STEP 8:Find Mean square between samples


(MSB)=

STEP9:Find Sum of squares within samples (SSW) = Total sum of squares (T.S.S) - Sum of squares
between samples(SSB)
STEP 10:FindMean square within samples
(MSW) =

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

STEP 11:Table-II (ANOVA Table):


Sum of
Source of Degree of
square Mean squares F-Ratio
variation freedom
s
Between
SSB
samples
Within
SSW
samples
Where,
SSB = Sum of squares between samples
SSW = Sum of squares within samples

P
MSB = Mean square between samples
MSW= Mean square within samples

AP
Calculated F – value

If (or)

If
R
Type-1:Reframe the table by applying the principles of experimental design.
CO

1. A completely randomized design experiment with 10 plots and 3 experiments gave


the following result.
U

Analyse the result for treatment effects.


Solution:
ST

Let us reframe the table by applying the principles of experimental design.


Given data
Total number of items N = 10. N umber of Treatments K = 3.
n- Number of samples in each treatment (not equal in this problem).

Null Hypothesis H0: There is no significant difference among the average yields in the 3 treatments.
AlternativeHypothesis H1: There is significant difference among the average yields in the 3
treatments.
Table – I (calculations for ANOVA):
Total sum of squares (T.S.S) =
Sum of squares between samples (SSB)

Sum of squares within samples (SSW)

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Yield of the plots


Treatments Row total
Number of Blocks
K=3 Ti
1 2 3 4
A 5 7 3 1 84

B 4 4 7 - 81

C 3 5 1 - 35
Grand total
C.F = 200

P
AP
Source of Sum of Degree of
Mean squares F-Ratio
variation squares freedom
Between
SSB = 6
samples

Within
SSW = 34 1.
samples
R
)
CO
Calculated value of is 1.62
There is no significant difference among the average yields in the 3 treatments.

Two Way Classifications:


Randomized block design (R.B.D):
ANOVA – Table:
U

Sum of
Source of Degree of
square Mean squares F-Ratio
variation freedom
s
ST

Column
treatment SSC
s
Row
treatment SSR
s

Error (or)
SSE
Residual

Where,
SSC = Sum of squares between blocks (columns)
SSR = Sum of squares between varieties (rows)
MSC = Mean square between blocks (columns)
MSR = Mean square between varieties (rows)
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

SSE = Residual Sum of squares = T.S.S – (S.S.C + S.S.R)


MSE = Mean square error

1. The yield of four strains of a particular variety of wheat was planted in five
randomized blocks in Kgs per plot is given below.
Blocks
Strains
1 2 3 4 5
A 32 34 34 35 36
B 33 33 36 37 34
C 30 35 35 32 35
D 29 22 30 28 28
Test for difference between blocks and difference between strains.

P
ANOVA table

AP
R
CO

Conclusion: (i)For Blocks:


Tabulated value of for (4, 12)at 5% l.o.s is 3.26.
U

Calculated value of is
Fc <Null hypothesis H0 (i) is accepted.
ST

(ii) For Strains:


Tabulated value of for (3, 12)at 5% l.o.s is 3.49.
Calculated value of is
FR >Null hypothesis H0(ii)is rejected.

Latin square design:


Advantages:
1. Latin square arrangement design controls more of the variation than the CRBD
with a two way stratification.
2. The analysis is simple.
3. Even with missing data the analysis remains relatively simple.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

ANOVA TABLE

Where,
SSC = Sum of squares between columns

P
SSR = Sum of squares between rows
SST = Sum of squares between rows

AP
MSC = Mean square between treatments
MSR = Mean square between rows
MST = Mean square between treatments
SSE = Residual Sum of squares = T.S.S – (S.S.C + S.S.R+S.S.T)
MSE = Mean square error
R
Problems:
1. Analyze the following results of a Latin square experiments:
CO

1 2 3 4
1 A(12) D(20) C(16) B(10)
2 D(18) A(14) B(11) C(14)
3 B(12) C(15) D(19) A(13)
4 C(16) B(11) A(15) D(20)
U

The letter A, B, C, D denotes the treatments and the figures in brackets denote the observations
Solution:
ST

Total number of items in the given data N = 16.Number of columns c= 4.Number of


rows r = 4.
Null Hypothesis H0:
(i) There is no significant difference betweencolumns.
(ii)There is no significant difference betweenrows and
(iii) There is no significant difference betweentreatments.
AlternativeHypothesis H1: :
(i) There is significant difference betweencolumns.
(ii)There is significant difference betweenrows and
(iii) There is significant difference betweentreatments

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
Conclusion:(i)For Columns:Tabulated value of for (6, 3) at 5% l.o.s is 8.94. Calculated value of
is .24. < Null hypothesis H0 (i)is accepted.

AP
(ii)For Rows:Tabulated value of for (3, 6) at 5% l.o.s is 4.76. Calculated value of is
< Null hypothesis H0 (ii)is accepted.
(iii)For Treatments:Tabulated value of for (3, 6) at 5% l.o.s is 4.76. Calculated value of is
> Null hypothesis H0 (iii)is rejected.
R
22-Factorial Design:
CO

In the 22-Factorial Design we will have 2 factors each at two levels (0, 1) (say). Then there are 2×2 i.e.,
4 treatment combinations in all. This 22-Factorial Design can be performed in the form of CRD,
RBD, LSD.By Yate‟s notation “K” and “P” denote the 2 factors under study and „k‟ and „p‟ denote
U

one of the 2 levels of each corresponding factors and this is called second level. The first level of “K”
and “P” is generally expressed by the absence of the corresponding letter in the treatment
ST

combinations.
The four treatment combinations are,
– Factors “K” and “P” both at first level.
– “K” at second level and “P”at first level.
– “K” at first leveland “P”at second level
– Factors “K” and “P” both at second level.
NOTE:
1.
2.
3.

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

1. An experiment was planned to study the effect of sulphate of potash & super phosphate
on the yield of potatoes. All the combinations of 2 levels of super phosphate ( 0 cent (p 0) &
0 cent (p1) / acre) were studied of potash ( 0 cent (k0) and 0 cent (k1) / acre) were studied in
a randomized block design with 4 replications for each.The (1 / 70) obtained are given in
the following table. Analyze the data & give your conclusions at 1% level
Block Yields (lb per plot)
I (1)
23 25 22 38
II (1)
40 26 36 38
III (1)
29 20 30 20
IV (1)

P
34 31 24 28

AP
R
CO
U
ST

Conclusion:

for (1, 9) at 1% l.o.s is 10.56.


Since < in all three cases H0 is accepted. ie., There is no significant difference
between blocks and treatments.

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

UNIT – III SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS

NEWTON'S METHOD
The Newton-Raphson method in one variable is implemented as follows:

Given a function ƒ defined over the reals x, and its derivative ƒ ', we begin with a first
guess x0 for a root of the function f. Provided the function is reasonably well-behaved a better
approximation x1 is

Geometrically, (x1, 0) is the intersection with the x-axis of a line tangent to f at (x0, f (x0)).

P
The process is repeated as

AP
until a sufficiently accurate value is reached.
ITERATIVE FORMULA:
R
f ( xn )
xn1  xn  Where n=0, 1, 2, 3.............
f ' ( xn )
CO

PROBLEMS RELATED TO NEWTON-RAPHSON METHOD


1. Apply Newton‟s method to find the positive root of x 2  6 x  4 to two decimal places.
SOLUTION:
STEP1: Given, x 2  6 x  4 .
U

Let f(x) = x 2  6 x  4 & f ' ( x ) = 2 x  6


STEP2: To find the positive root of x 2  6 x  4 .
STEP3: Intervel of roots:
ST

f(x) = x 2  6 x  4
f(0) = 4
f(1) = -1
Therefore , the root lies between 0 and 1.
Let x0=1

f ( x0 )
STEP4: 1st iter eation: x1  x0 
f ' ( x0 )
Here, x0=1, f ( x0 ) = x0 2  6 x0  4 = -1, f ' ( x0 ) = 2 x0  6 =-3
x1 = 0.67
f ( x1 )
2nd itereation: x2  x1 
f ' ( x1 )
Here, x1 = 0.67, f ( x1 ) = x1 2  6 x1  4 = .28, f ' ( x1 ) = 2 x1  6 =-4.65
x2 = 0.73
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

f ( x2 )
3rd itereation: x3  x2 
f ' ( x2 )
Here, x2 = 0.73, f ( x2 ) = x2 2  6 x2  4 = .009, f ' ( x2 ) = 2 x2  6 =-4.4013
x1 = 0.73
Therfore, x1 = x2 = 0.73
RESULT: x=0.73
Show that the Newton Raphson formula to find a can be expressed in the
1 a
form x n 1 =  x n   ,n=0,1,2,3…..
2 xn 
Sol:
If x = a

P
x2 = a
x2 - a = 0

AP
f(x) = x 2 -a
f ( x)  2 x
f ( xn )
xn 1  x n 
f ( x n )
xn  a xn  a
2 2

x n 1  x n  =
R 2 xn 2 xn
1 a
x n 1 =  x n   , n = 0, 1, 2, 3…..
CO
2 xn 

3. Show that the iterative formula for finding the reciprocal of N is


x n 1 = x n (2-N x n ).
Sol:
U

1
Let x =
N
1
ST

N =
x
1
f(x) = -N
x
1
f ( x)   2
x
f ( xn )
xn 1  x n 
f ( x n )
1
N
xn
= xn -
1
 2
xn
1
= x n +x n 2 (  N )
xn
= 2x n -N x 2n
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

x n 1 = x n (2-N x n ).

GAUSSIAN ELIMINATION
PROBLEMS RELATED TO GAUSS ELIMINATION METHOD
1.Apply Gauss elimination method to solve the equation 10x-2y+3z=23,2x+10y-5z=-33,3x-4y+4z=41.
SOLUTION:

STEP1: Given, 10x-2y+3z=23,


2x+10y-5z=-33,
3x-4y+4z=41.
STEP2: To solve 10x-2y+3z=23, 2x+10y-5z=-33, 3x-4y+4z=41 using Gauss elimination
method.
10  2 3 23 

P
STEP3: [A,I] =  2 10  5  33
 3  4 10 41 

AP
10  2 3 23 
  0 52  28  188 R2-5R2-R1

 3  4 10 41 
10  2 3 23 
R
  0 52  28  188 R3-10R3-3R1

 0  34 91 341 
CO
10 2 3 23 
0 52  28  188  R -52R3+34R2
  3

0 0 378011340 
This is an upper triangular matrix.
Therfore, 3780z = 11340
U

z = 3,
52y-28z=-188,
y =-2.
ST

10x-27+3z=23,
x =1
RESULT: x =1 y =-2. z = 3,

APPLICATION TO FINDING INVERSES:

If Gauss–Jordan elimination is applied on a square matrix, it can be used to calculate the


matrix's inverse. This can be done by augmentingthe square matrix with the identity matrix of the same
dimensions and applying the following matrix operations:

If the original square matrix, A, is given by the following expression:

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Then, after augmenting by the identity, the following is obtained:

By performing elementary row operations on the [AI] matrix until it reaches reduced row echelon
form, the following is the final result:

P
AP
The matrix augmentation can now be undone, which gives the following:

R
A matrix is non-singular (meaning that it has an inverse matrix) if and only if the identity matrix can
be obtained using only elementary row operations.
CO

GAUSS –JORDAN METHOD


WORKING PROCEDURE:
Consider, a1x+b1y+c1z=d1,
U

a2x+b2y+c2z=d2,
a3x+b3y+c3z=d3,
 a1 c1   d1   x
ST

b1
It is equivalent to AX=B where A= a 2 b2 c 2  , B=  d 2  , X=  y 
 a3 b3 c3   d 3   z 

Step: 1 To write the augmented matrix [A,I]

Step: 2 To reduce the augmented matrix [A,I] into a diagonal matrix using the elementary
row operations
Step: 3 To solve the matrix without using back substitution method
PROBLEMS RELATED TO GAUSS JORDAN METHOD
1.Solve the system of equations10x-2y+3z=23, 2x+10y-5z=-33, 3x-4y+4z=41.By Gauss Jordan
method.
SOLUTION:
STEP1: Given, 10x-2y+3z=23,
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

3x-4y+4z=41.
STEP2: To solve 10x-2y+3z=23, 2x+10y-5z=-33, 3x-4y+4z=41 using Gauss Jordan method.
10  2 3 23 
STEP3: [A,I] =  2 10  5  33
 3  4 10 41 
10  2 3 23 
  0 52  28  188 R2-5R2-R1

 3  4 10 41 
10  2 3 23 
  0 52  28  188 R3-10R3-3R1

 0  34 91 341 

P
10 2 3 23 
  28  188  R3-52R3+34R2
0 52

AP
 0 0 378011340
12600  2520 0 17640
  28  188  R1-1260R1-R3
 0 52
 0 0 378011340
R
12600  2520 0 17640 
 0 7020 0  14040

CO
R2-135R2+R3
 0 0 3780 11340 
88452000 0 088452000
  14040 
 0 7020 0  R1-7020R1+2520R2
 3780 11340 
U

 0 0 
This is a diagonal matrix.
z = 3,
ST

y =-2.
x =1
RESULT: x =1 y =-2. z = 3,

2. Solve the principle used in Gauss Jordan method 5x+4y = 15, 3x+7y = 12.
Sol:
5 4  x  15
The given system is equivalent to    =  
3 7  y  12
A X=B
5 4 15
[A, B] =   
3 7 12
5 4 15 
[A, B] ~    R2   5R2  3R1
0 2315 

115
0   285 
0 DOWNLOADED  
~   R1   23R1  4R2
23 FROM STUCOR15APP
DOWNLOADED FROM STUCOR APP

115 x = 285
x = 2.4783
23 y = 15
y = 0.6522.

JACOBI METHOD
DESCRIPTION:

Given a square system of n linear equations:

where:

P
AP
Then A can be decomposed into a diagonal component D, and the remainder R:
R
CO

The element-based formula is thus:


U

Note that the computation of xi(k+1) requires each element in x(k) except itself. Unlike the Gauss–
Seidel method, we can't overwrite xi(k) withxi(k+1), as that value will be needed by the rest of the
ST

computation. The minimum amount of storage is two vectors of size n.


WORKING PROCEDURE:
Consider the system of equations
a1 x  b1 y  c1 z  d 1 

a 2 x  b2 y  c 2 z  d 2 ........................( I )
a 3 x  b3 y  c3 z  d 3 
(Check the dominance condition)This system of equations can also be written as

x
1
d 1  b1 y  c1 z  
a1 

y  d 2  a 2 x  c 2 z ..........................(2)
1
b2 

z  d 3  a 3 x  b3 y  
1
c3 
( 0) ( 0) ( 0)
e the init ial values of x, y, z respectively.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP


x (1) 
1
a1
d 1  b1 y ( 0 )  c1 z ( 0)  


y (1)  d 2  a 2 x ( 0 )  c 2 z ( 0 ) ..........................(3)
1
b2 

z (1)  d 3  a 3 x ( 0 )  b3 y ( 0 )  
1
c3 

Again using these values x (1) , y (1) , z (1) in equation (2)

This process may be repeated till the difference between two consecutive approximations is
negligible.
PROBLEMS RELATED TO GAUSS JACOBI METHOD

P
1. Solve by Jacobi iteration method correct to two decimal places 27x+6y-
z=85,x+y+54z=110,6x+15y+2z=72.

AP
SOLUTION:

STEP1:Given, 27x+6y-z=85,
x+y+54z=110, (1)
R
6x+15y+2z=72.
This is not a diagonally dominant.
CO

So, rearrange the given equations,


27x+6y-z=85,………………………(1)
6x+15y+2z=72, ……………………(2)
x+y+54z=110, ……………………..(3)
U

This is a diagonally dominant.


From (1), x=(85-6y+z)/27,
ST

From (2), y=(72-6x-2z)/15


From (3), z=(110-x-y)/54.
Let, x=y=z=0
STEP2: (1st iteration)
X(1) =(85-6y+z)/27=85/27=3.148.
Y(1)= (72-6x-2z)/15=72/15=4.8.
Z(1)=(110-x-y)/54=110/54=2.037.
STEP3: (2nd iteration)
X(2) =(85-6y(1) +z(1))/27=2.157.
Y(2)= (72-6x(1) -2z(1))/15=3.269
Z(2)=(110-x(1) -y(1))/54=1.890
rd
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

X(3) =(85-6y(2) +z(2))/27=2.492


Y(3)= (72-6x(2) -2z(2))/15=3.685
Z(3)=(110-x(2) -y(2) 54=1.9
STEP5: (4th iteration)
X(4) =(85-6y(3)+z(3))/27=2.401.
Y(4)= (72-6x(3)-2z(3))/15=3.545
Z(4)=(110-x(3)-y(3))/54=1.923
STEP6: (5th iteration)
X(5) =(85-6y(4)+z(4))/27=2.432
Y(5)= (72-6x(4)-2z(4))/15=3.583

P
Z(5)=(110-x(5)-y(5))/54=1.927
(6th iteration)

AP
STEP7:
X(6) =(85-6y(5) +z(5))/27=2.425
Y(6)= (72-6x(5) -2z(5))/15=3.570
Z(6)=(110-x(5) -y(5))/54=1.926
Here, x5=x6=2.43,( correct to 2 decimal places)
R
Y5=y6=3.57,( correct to 2 decimal places),
Z5=z6=1.93,( correct to 2 decimal places).
CO

RESULT: x=2.43,y=3.57,z=1.93
2. Solve the system of equation by
2x-3y+20z = 25,20x+ y - 2z =17, 3x+20y –z = -18 by Gauss Jacobian method
[Only two iteration].
U

Sol:
As the coefficient matrix is not diagonally domain as it is we rewrite the equation.
20x + y - 2z = 17
3x + 20y – z = -18
ST

2x - 3y + 20 z = 25
Now the diagonal element is domain in the coefficient matrix,
We write x, y, z as following:
x=
1
17  y  2 z 
20
y=
1
 18  3x  z 
20
z=
1
25  2 x  3 y
20
Let the initial condition be x = 0, y = 0, z = 0.

First iteration:

x1 
1
17  y0  2 z 0 =0.85
20.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

y1 =
1
 18  3x0  z 0   1 (18)   0.9
20 20
z1 =
1
25  2 x0  3 y0   1 (25)  1.25
20 20

Second Iteration:

x 2 =1.02
y 2 = -0.965
z 2 = 1.03.

GAUSS–SEIDEL METHOD

P
DESCRIPTION:
Given a square system of n linear equations with unknown x:

AP
where:

R
CO

Then A can be decomposed into a lower triangular component L*, and a strictly upper
triangular component U:
U
ST

The system of linear equations may be rewritten as:

The Gauss–Seidel method is an iterative technique that solves the left hand side of this expression
for x, using previous value for x on the right hand side. Analytically, this may be written as:

However, by taking advantage of the triangular form of L*, the elements of x(k+1) can be computed
sequentially using forward substitution:

Note that the sum inside this computation of xi(k+1) requires each element
in x(k) except x (k) itself.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

The procedure is generally continued until the changes made by an iteration are below some tolerance.
WORKING PROCEDURE:

This is only refinement of Gauss – Jacobi Method. As before

x
1
d 1  b1 y  c1 z 
a1

y
1
d 2  a 2 x  c 2 z 
b2

z
1
d 3  a 3 x  b3 y .
c3

P
1
We start with the initial values y , z  0 and get x , y , z
( 0) ( 0) (1) (1)

AP
First iteration

x (1) 
1
a1
d1  b1 y ( 0)  c1 z ( 0) 

y (1) 
1
d 2  a2 x (1)  c2 z ( 0) 
R
b2

d 3  a3 x (1)  b3 y (1) 
CO
1
z (1) 
c3

Second iteration

d 1  b1 y (1)  c1 z (1) 
U

1
x ( 2) 
a1

y ( 2) 
1
d 2  a 2 x ( 2 )  c2 z (1) 
ST

b2

z ( 2) 
1
c3
d 3  a3 x (2)  b3 y ( 2) 

The above process may continue for third, fourth etc..., iterations.

PROBLEMS RELATED TO GAUSS- SEIDEL METHOD


1.Solve by Gauss- Seidel Method ,correct to two decimal places 27x+6y-z=85, x+y+54z=110,
6x+15y+2z=72.
SOLUTION:
STEP1:Given, 27x+6y-z=85,
x+y+54z=110, (1)
6x+15y+2z=72.
This is not a diagonally dominant.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

27x+6y-z=85,………………………(1)
6x+15y+2z=72, ……………………(2)
x+y+54z=110, ……………………..(3)
This is a diagonally dominant.
From (1), x=(85-6y+z)/27,
From (2), y=(72-6x-2z)/15
From (3), z=(110-x-y)/54.
Lety=z=0
st
STEP2: (1 iteration)
X(1) =(85-6y(0)+z(0))/27=85/27=3.148.
Y(1)= (72-6x(1) -2z(0))/15=72/15=3.541.
Z(1)=(110-x(1) -y(1))/54=110/54=1.913
STEP3: (2nd iteration)

P
X(2) =(85-6y(1) +z(1))/27=2.157.
Y(2)= (72-6x(2) -2z(1))/15=3.269

AP
Z(2)=(110-x(2) -y(2))/54=1.890
STEP4: (3rd iteration)
X(3) =(85-6y(2) +z(2))/27=2.432
Y(3)= (72-6x(3) -2z(2))/15=3.572
Z(3)=(110-x(3) -y(3) 54=1.926
STEP5:
R
(4th iteration)
X(4) =(85-6y(3)+z(3))/27=2.401.
Y(4)= (72-6x(4)-2z(3))/15=3.545
CO

Z(4)=(110-x(4)-y(4))/54=1.923
STEP6: (5th iteration)
X(5) =(85-6y(4)+z(4))/27=2.426
Y(5)= (72-6x(5)-2z(4))/15=3.573
Z(5)=(110-x(5)-y(5))/54=1.926
U

STEP7: (6th iteration)


X(6) =(85-6y(5) +z(5))/27=2.426
Y(6)= (72-6x(6) -2z(5))/15=3.573
ST

Z(6)=(110-x(6) -y(6))/54=1.926
Here, x5=x6=2.43,( correct to 2 decimal places)
Y5=y6=3.57,( correct to 2 decimal places),
Z5=z6=1.93,( correct to 2 decimal places).
RESULT: x=2.43,y=3.57,z=1.93
2. Solve by Gauss Seidel method x-2y =-3, 2x+25y = 15 correct to four decimal
places.
Sol:
x- 2y = - 3
2x + 25y = 15
x = -3 +2y
1
y= (15-2x)
25
Let be the initial value y 0 = 0
First iteration:
y DOWNLOADED
=- FROM STUCOR APP
3 + 2 (0) = -3
DOWNLOADED FROM STUCOR APP

y1 =
1
15  2 x1  =0.84
25
2 nd iteration:
x 2 = -1.32
y 2 = 0.7056
3 iteration:
x 3 = -1.5888
y 3 = 0.7271
4 iteration:
x 4 = -1.5458
y 4 = 0.7237
5 iteration:

P
x 5 = -1.5526
y 5 = 0.7242

AP
6 iteration:
x 6 = -1.5516
y 6 = 0.7241
7 iteration:
x 7 = -1.5518
y 7 = 0.7241
R
8 iteration:
x 8 = -1.5518
CO
y 8 = 0.7241
Hence x = -1.5518 and y = 0.7241
U

INVERSE OF A MATRIX BY GAUSS JORDAN METHOD


WORKING PROCEDURE:
ST

 a1 b1 c1 
Consider, A= a 2 b2 c 2  .
 a3 b3 c3 

Step: 1 To write the augmented matrix [A,I]

Step: 2 To reduce the augmented matrix [A,I] into [A,X] using the elementary row
operations
Then , X=A-1

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

PROBLEMS RELATED TO INVERSE OF THE MATRIX BY GAUSS-JORDAN METHOD

 2 2 3
 
1. Find the inverse of A   2 1 1  by Gauss-Jordan method.
 1 3 5
 
SOLUTION:
 2 2 3
 
STEP1: Given, A   2 1 1 
 1 3 5
 

 2 2 3
 
To Find the inverse of A   2 1 1  by Gauss-Jordan method.

P
STEP2:
 1 3 5
 

AP
 2 2 3 1 0 0
STEP3: [A,I] = 2 1 1 0 1 0
1 3 5 0 0 1
1 1 3 / 2 1 / 2 0 0 
 2 1 1 0 1 0 R1=R1/2
R
1 3 5 0 0 1
CO
1 1 3 / 2 1 / 2 0 
 0  1  2  1 1 0
0 2 7 / 2  1 / 2 0 1
1 1 3 / 2 1 / 2 0 

 0 1  1 0
U

2 1
0 2 7 / 2  1 / 2 0 1
1 0 1 / 2  1 / 2 1 0
ST

 0 1 2 1  1 0
0 0  1 / 2  5 / 2 2 1
1 0 1 / 2  1 / 2 1 0

 0 1 2 1  1 0 
0 0 1 5  4  2
1 0 0 2  1  1
 0 1 0  9 7 4 
0 0 1 5  4  2
 2  1  1
-1 
Hence, A =  9 7 4 
 5  4  2

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

 2  1  1
RESULT: A =  9 7
-1
4 
 5  4  2

EIGEN VALUE – POWER METHOD

WORKING PROCEDURE:

Let the initial arbitrary vector of the matrix A whose order is 3 by 3

1 0 0

X1  0 (or) X 2  1 (or) X 3  0

P
0 0 1

AP
STEP1: To write the Given matrix A
STEP2: To find AX1= 1 X2
STEP3: A X2= 1 X3
STEP4: A X3= 1 X3
STEP5: A X4= 1 X5
R
……………………………………………………………
CO
…………………………………………………………..

……………………………………………………………

The above process may continue for third, fourth etc..., upto getting required values.
PROBLEMS RELATED TO POWER METHOD
U

1. Using Power method find the largest Eigen value and its corresponding Eigen
1  3 2 
 
vector  4 4  1 .
ST

6 3 5 

SOLUTION:
1  3 2 
 
STEP1: Given, A=  4 4  1
6 3 5 

1 
Let, X1= 0 
0 
1  0.167 
STEP2: AX1=  4  =6  .667  =6 X2
6   1 

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

0.166 .021
STEP3: A X2= 2.336 =8.003 .292 =8.003 X3
 
8.003  1 
1.145  .191
STEP4: A X3=  .252  =6.002 .042 =6.002X4
 
6.002  1 
 2.065   .329 
STEP5: A X4=  .068 =6.272  .011 =6.272 X5
 
 6.272   1 
2.362  .34 
STEP6: A X5=  .272  =6.941 .039 =6.941 X6
 

P
 6.941  1 
 2.223 .311

AP
STEP7: A X6=  .516  =7.157 .072 =7.157 X7
 
7.157   1 
2.095 .296
STEP8: A X7=  .532  =7.082 .075 =7.082 X8
R
7.082  1 

2.071 .296
CO

STEP9: A X8=  .484  =7.001 .069 =7.001 X9


 
7.001  1 
2.089 .296
STEP10: A X9=  .46  =6.983 .066 =6.983 X10
 
U

 6.983  1 
 2 .1 .1   .3 
ST

STEP11: A X10=  .46  =6.992 .066 =6.992 X11


 
6.992  1 
 2.101  .3 
STEP12: A X11=  .464  =6.998 .066 =6.998 X12
 
6.998  1 
2.102  .3 
STEP12: A X12=  .464  =6.998 .066
 
6.998  1 
 .3 
Here,A X11= A X12=6.998 .066
 1 

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

UNIT IV

INTERPOLATION, NUMERICAL DIFFERENTIATION AND


NUMERICAL INTEGRATION
PROBLEMS BASED ON LAGRANGE’S INTERPOLATION FORMULA
1.Use Lagreange‟s formula to find the quadratic polynomial that takes these values.
x : 0 1 3
y : 0 1 0
SOLUTION:
Step 1: Given, x 0 = 0, x 1 = 1, x 2 = 3

P
y 0 = 0, y 1 = 1, y 2 = 0

AP
Step 2: To find find the quadratic polynomial Using Lagreange‟s formula
Step 3: Required formula,
y =
( x  x1) ( x  x 2 ) ( x  x 0) ( x  x2 ) ( x  x 0) ( x  x1 )
y0  y1  y2 
 (1)
( x0  x1 ) ( x0  x2 )
R ( x1  x0 ) ( x1  x2 ) ( x2  x0 ) ( x2  x1 )
Step 4: Calculations,
CO

Substitute the values of x 0 = 0 , x 1 = 1 , x 2 =3,y 0 = 0 , y 1 = 1 , y 2 = 0 in eqn. (1)

( x  1) ( x  3) ( x  0) ( x  3) ( x  0) ( x  1)
Y = 0 1 0
(0  1) (0  3) (1  0) (1  3) (3  0) (3  1)
U

 x 2 3x
= 
2 2
x 2
3x
ST

RESULT : y = 
2 2
2. Find the polynomial f(x) by using Lagrange formula and hence find f(3) for

x0 x1 x2 x3
x 0 1 2 5
f(x) 2 3 12 147
y0 y1 y2 y3

Solution:

By Lagrange‟s interpolation formula


( x  x1 ) ( x  x2 )( x  x3 ) ( x  x0 ) ( x  x2 )( x  x3 )
y = f(x) = y0 + y1 
( x  x )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )
DOWNLOADED FROM STUCOR APP
1
DOWNLOADED FROM STUCOR APP

( x  x0 ) ( x  x1 )( x  x3 ) ( x  x0 ) ( x  x1 )( x  x2 )
y2  y3
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x3  x2 )

( x  1) ( x  2)( x  5) ( x  0) ( x  2)( x  5)
y = f(x) = (2) + (3) +
(0  1)(0  2)(0  5) (1  0)(1  2)(1  5)
( x  0) ( x  1)( x  5) ( x  0) ( x  1)( x  2)
(12)  (147)
(2  0)(2  1)(2  5) (5  0)(5  1)(5  2)

(3  1) (3  2)(3  5) (3  0) (3  2)(3  5)
y = f(3) = (2) + (3) +
 10 4

P
(3  0) (3  1)(3  5) (3  0) (3  1)(3  2)
(12)  (147)
6 60

AP
4 6 147
= (2)  (3)  2(12) 
10 4 10
= 35 R
3. Find the missing term in the following table using Lagrange „s interpolation
CO
x 0 1 2 3 4
y 1 3 9 - 81
Sol:
By Lagrange‟s interpolation formula
U

( x  x1 ) ( x  x2 )( x  x3 ) ( x  x0 ) ( x  x2 )( x  x3 )
y = f(x) = y0 + y1 
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 )
ST

( x  x0 ) ( x  x1 )( x  x3 ) ( x  x0 ) ( x  x1 )( x  x2 )
y2  y3
( x2  x0 )( x2  x1 )( x2  x3 ) ( x3  x0 )( x3  x1 )( x3  x2 )

Let x 0 = 0, y0 = 1

x 1 = 1, y1 = 3
x2 = 2 , y2 = 9

x3 = 4 y 3 = 81

( x  1) ( x  2)( x  4) ( x  0) ( x  1)( x  4) ( x  0) ( x  1)( x  4)


y = f(x) = (1) + (3)  (9) 
(0  1)(0  2)(0  4) (1  0)(1  2)(1  4) (2  0)(2  1)(2  4)
( x  0) ( x  1)( x  2)
(81)
(4  0)(4  1)(4  2)
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

(3  1) (3  2)(3  4) (3  0) (3  2)(3  4)
y = f(3) = (1) + (3) +
8 3
(3  0) (3  1)(3  4) (3  0) (3  1)(3  2)
(9)  (81)
4 24
1 27 81
= 3 
4 2 4
= 31
4.Using Lagrange‟s interpolation formula find y(10) given that y(5) = 12,
y(16) = 13,y(9) = 14, y(11) = 16.
Sol:

P
By Lagrange‟s interpolation formula
y = f(x) =

AP
( x  x1 ) ( x  x2 )( x  x3 ) ( x  x0 ) ( x  x2 )( x  x3 ) ( x  x0 ) ( x  x1 )( x  x3 )
y0 + y1  y2 
( x0  x1 )( x0  x2 )( x0  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 ) ( x2  x0 )( x2  x1 )( x2  x3 )

( x  x0 ) ( x  x1 )( x  x2 )
y3
( x3  x0 )( x3  x1 )( x3  x2 )
R
( x  6) ( x  9)( x  11) ( x  5) ( x  9)( x  11)
y = f(x) = (12) + (13) +
(5  6)(5  9)(5  11) (6  5)(6  9)(6  11)
CO
( x  5) ( x  6)( x  11)
(14) 
(9  5)(9  6)(9  11)
( x  5) ( x  6)( x  9)
(16)
(11  5)(11  6)(11  9)
U

Putting x = 10
(4)(1)(1) (5) (1)(1) (5) (4)(1) (5) (4)(1)
y = f(10) = (12) + (13) + (14)  (16)
ST

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


= 14.666666

4. Obtain the root of f(x) = 0 by Lagrange Inverse interpolation given that


f(30) = -30, f(34) = -13,f(42) = 18.
Sol:
By Lagrange‟s inverse interpolation formula is
( y  y1 ) ( y  y 2 )( y  y3 ) ( y  y 0 ) ( y  y 2 )( y  y3 )
x= x0 + x1 
( y 0  y1 )( y 0  y 2 )( y 0  y3 ) ( y1  y 0 )( y1  y 2 )( y1  y3 )

( y  y 0 ) ( y  y1 )( y  y3 )
x2 
( y 2  y 0 )( y 2  y1 )( y 2  y3 )

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

( y  y 0 ) ( y  y1 )( y  y 2 )
x3
( y3  y 0 )( y3  y1 )( y3  y 2 )

( y  13) ( y  3)( y  18) ( y  30) ( y  3)( y  18)


= (30) + (34) +
(30  13)(30  3)(30  18) (13  30)(13  3)(13  18)
( y  30) ( y  13)( y  18) ( y  30) ( y  13)( y  3)
(38)  (42)
(3  30)(3  13)(3  18) (18  30)(18  13)(18  3)

( y  13)( y 2  21y  54) ( y  30) ( y 2  21y  54)


= (30) + (34) +
 26928 8432

P
( y  18) ( y 2  43 y  390)
(38)
 7920

AP
( y  3) ( y 2  43 y  390)
+ (42)
22320
at f(x) = 0 ,y = 0 we get
21060 55080 266760 49140
=    
R
26928 8432 7920 22320
= 37.230
CO
DIVIDED DIFFERENCES
Definition:
Let the function y = f(x) take the values f(x 0 ) , f(x 1 ), ……….f(x n ) Corresponding to the

values x 0 , x1 .....xn of the argument x where x1  x0 , x2  x1 , x3  x2 ,...... xn  xn1 need not


U

necessarily be equal.
f ( x1 )  f ( x0 )
ST

f ( x0 , x1 ) 
x1  x0

f ( x2 )  f ( x1 )
f ( x1 , x2 , ) 
x2  x1

f ( x1 , x2 )  f ( x0 , x1 )
f ( x0 , x1 , x2 ) 
x 2  x0

f ( x2 , x3 )  f ( x1 , x2 )
f ( x1 , x2 , x3 )  and so on.
x3  x1

1.Find the divided difference table for the following data


x : 2 5 10
y : 5 29 109
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

SOLUTION:
Step 1: Given, x : 2 5 10
y : 5 29 109
Step 2: To Find the divided difference table for the following data
Step 3: CALCULATIONS:
The divided difference table
x f(x)  f(x)  2
f(x)
2 5

29  5
8
52 16  8

P
1
5 29 10  2

AP
109  29
 16
10  5

10 109

NEWTON’S DIVIDED DIFFERENCE INTERPOLATION


R
CO
DEFINITION:
The Newton‟s divided difference interpolation formula is
f(x) = f(x 0 ) + ( x  x0 ) f ( x0 , x1 )  ( x  x0 )( x  x1 ) f ( x0 , x1 , x2 )  .........
 ( x  x0 )( x  x1 )( x  x2 ).........( x  xn1 ) f ( x0 , x1 , x2 ,........xn )
U

1.Using divided difference formula determine f(3) from the data


ST

x : 0 1 2 4 5
f(x) : 1 14 15 5 6
SOLUTION:
STEP 1: Given x0 = 0 , x 1 =1 , x 2 = 2 , x 3 = 4 , x 4 =5

y 0 =1 , y 1 =14 , y 2 =15 , y 3 =5, y 4 =6


STEP 2: To determine f(3) from the given data Using divided difference formula
Step 3: REQUIRED FORMULA:
f(x) = f(x 0 ) + ( x  x0 ) f ( x0 , x1 )  ( x  x0 )( x  x1 ) f ( x0 , x1 , x2 ) 
 ( x  x0 )( x  x1 )( x  x2 ) f ( x0 , x1 , x2 , x3 )  ( x  x0 )( x  x1 )( x  x2 )( x  x3 ) f ( x0 , x1 , x2 , x3 , x4 ) (1)

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Step 4: CALCULATIONS:

Newton‟s divided difference table

X f(x)  f(x)  2
f(x)  3
f(x)  4
f(x)
0 1
14  1
 13
1 14 1 0 1  13
 6
20 26
1
15  14 40
1

P
2 1  5 1
2 15  2 11
4 1 0
50

AP
5  15 22
 5 1
42 5 1
4 5
1 5
2
65 52
1
5 6 54
R
CO

Here x 0 =0 , f(x 0 ) =1

x1 =1 f ( x0 , x1 ) =13

x 2 =2 , f ( x0 , x1 , x2 ) =-6
U

x3 =3 , f ( x0 , x1 , x2 , x3 ) =1
ST

x 4 =4 , f ( x0 , x1 , x2 , x3 , x4 ) =0

Substitute the above values in equation (1)


f(x) = 0 + ( x  0)1  ( x  0)( x 1)13  ( x  0)( x 1)( x  2)(6)  ( x  0)( x 1)( x  2)( x  3)0

f(x) = - 6x 3  21x 2  11x  13  (2)


Substitute x=3 in equation (2)
f (3) = -29
RESULT: f(x) = - 6x 3  21x 2  11x  13 & f (3) = -29.

2.Using Newton‟s divided difference formula, find u(3).

given u(1)= -26 , u(2)= 12,u(4)=256,u(6)=844.

Sol:
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

We form the divided difference table since the intervals are unequal

x f(x)  f(x)  2
f(x)  3 f(x)
-
1 26
12  26
 38
2 1 122  38
 28
2 12 4 1

43  28
3

P
256  12 6 1
 122
42

AP
4 256 294  122
 43
62
844  256
 294
64
6 844
R
CO

By Newton‟s divided difference interpolation formula


f(x) = f(x 0 ) + ( x  x0 ) f ( x0 , x1 )  ( x  x0 )( x  x1 ) f ( x0 , x1 , x2 )  .........

u(x) = u(x 0 ) + ( x  x0 ) u( x0 , x1 )  ( x  x0 ) ( x  x1 ) u( x0 , x1 , x2 )  .........


U

Here
x0 = 1, x 1= 2, x2 = 4, x3 = 6
ST

u(x0) = -26, u(x0,x1) = 38, u(x 0 ,x1,x2) = 28, u(x0,x1,x2,x3) = 3

 u(x) = -26+(x-1)38+(x-1)(x-2)28+(x-1)(x-2)(x-3)3
u(3) = -26+(2)(38)+(2)(1)(28)+(2)(1)(-1)(3)
= -26 + 76 + 56 – 6 = 100

3. Find f(x) as a polynomial in x for the following data by Newton‟s divided


difference formula.
x -4 -1 0 2 5
f(x) 1245 33 5 9 1335

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Sol:
X f(x)  f(x)  2
f(x)  3 f(x)  4
f(x)
-4 1245
33  1245
 404
(1)  (4)
-1 33  28  (404)
 94
5  33 0  (4) 10  94
 28  14
0  (1) 2  (4)
0 5
2  (28) 13  14
 10 3
2  (1) 5  (4)
95
2 88  10
2 9 20  13
442  2 5  (1)
 88
50

P
5 1335 1335  9
 442
52

By Newton‟s divided difference interpolation formula

AP
R
f(x) = f(x 0 ) + ( x  x0 ) f ( x0 , x1 )  ( x  x0 ) ( x  x1 ) f ( x0 , x1 , x 2 ) 
( x  x0 ) ( x  x1 ) ( x  x 2 ) f ( x0 , x1 , x 2 , x3 ) 
CO
( x  x0 ) ( x  x1 ) ( x  x 2 )( x  x3 ) f ( x0 , x1 , x 2 , x3 , x 4 )
Here x0 = -4, x1 = -1, x2 = 0, x3 = 2, x4 = 5
f(x0) = 1245 , f(x0, x1) = -404, f(x0, x1, x2) = 94,f(x0, x1, x2, x3) = -14
f(x0, x1, x2, x3, x4) = 3
U

f(x) = 1245+(x+4) (-404)+(x+4)(x+1)(94)+


(x+4)(x+1)(x)(-14)+(x+4)(x+1)(x)(x-2)(3)
ST

= 1245-404x-1616+(94)(x2+5x+4)-14x(x2+5x+4)+3x[(x2+5x+4)(x-2)]
= -14x3+24x2+10x+5+3x4+15x3-24x2-24x
= 3x4+x3-14x+5

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

NEWTON FORWARD AND BACKWARD DIFFERENCE FORMULA

DEFINITION: ( Newton forward difference table)


Let the function y=f(x) take the values y0 , y1 ,...... y n at the points x0 , x1 ,.......xn

X Y ΔY Δ2 Y Δ3Y

x0 y0 y1  y0 (Δ y 0 )

Δ y1 - Δ y 0 ( Δ 2 y 0 )
x1 y1 y 2  y1 (Δ y1 ) Δ 2 y1 - Δ 2 y 0 ( Δ 3 y 0 )

P
Δ y 2 - Δ y1 ( Δ 2 y1 )
y3  y 2 (Δ y 2 ) Δ 2 y 2 - Δ 2 y1 ( Δ 3 y1 )

AP
x2 y2

Δ y3 - Δ y2 ( Δ 2 y2 )
x3 y3 y 4  y3 (Δ y 3 )
….. ….. ……..
R
DEFINITION: ( Newton forward difference interpolation formula)

u (u  1) 2 u (u  1)(u  2) 3 u (u  1)(u  2)......u  (n  1) n y


CO
u
y ( x)  y 0 y 0   y0   y 0 +….+ 0
1! 2! 3! n!
x  x0
Where u 
h
U

DEFINITION: (Newton Backward difference interpolation formula)

v(v  1) 2 v(v  1)(v  2) 3 v(v  1)(v  2)....v  (n  1) n


ST

v
y ( x)  y n 
y n   yn   yn +….   yn .
1! 2! 3! n!
x  xn
Where v 
h
PROBLEMS:

1. Using Newton‟s forward interpolation formula, find the polynomial f(x) satisfying the following
data. Hence evaluate y at x = 5.
x 4 6 8 10
y 1 3 8 10

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

SOLUTION:
STEP 1: Given x 0 = 4 , x 1 =6 , x 2 = 8, x 3 = 10

y 0 =1 , y 1 =3 , y 2 =8 , y 3 =10

STEP 2: To find the polynomial f(x) from the following data Using Newton‟s forward
interpolation
formula. Hence evaluate y at x = 5.

STEP 3: REQUIRED FORMULA:

P
u u (u  1) 2 u (u  1)(u  2) 3 x  x0
y ( x)  y 0  y 0   y0   y 0 +…… where u =
1! 2! 3! h

AP
STEP 4: CALCULATIONS
Difference Table :
x Y △y △2 y △3 y
(x0) 4 (y0) 1
3-1 = 2(△y0)
R
(x1) 6 (y1) 3 5-2 =3(△2 y0)
8-3 =5 (△y1) -3-3 = -6(△3 y0)
(x2) 8 (y2) 8 2-5 =-3(△2 y1)
CO

10-8 = 2(△y2)
(x3) 10 (y3) 10

There are only 4 data given. Hence the polynomial will be degree 3
U

Here x0 = 0, h=5- 0 = 5[difference]


x0 x
u= 
5 5
ST

 x  x  x   x  x  x 
     1    1  2 
y(x) = P3 ( x)  14    (365)   
5 5 
(700)   
5 5 5  5  (375)
1! 2! 3!
1
= 14 + x(73) + x(x-5)(14)+ x (x-5)(x-10)(3)
6
1
= 14 + 73x + 14[x 2 -5x] + x[x 2 -15x+50]
2
1
= 14x 2 +3x +14+ [x 3 -15x 2 +50x]
2
1 3
= [x +13x 2 +56x+28]
2
1
y(2) = P 3 (2) = [2 3 +13(2) 2 +56(2)+28]
2
1
= [200] = 10
2
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP

2. Use Newton‟s backward interpolation formula to construct an interpolating


polynomial of degree 3 for the data:
f(-0.75) = -0.07181250, f(-0.5) = -0.024750, f(-0.25) = 0.33493750,
1
f(0) = 1.10100. Hence find f(- ).
3
Sol:
We form the difference table
x Y △y △2 y △3 y
(x0) (y0)
-0.75 - 0.07181250
0.0470625

P
(x1) (y1)
-0.5 - 0.024750 0.312625

AP
0.3596875 (  3 y 3 )0.09375
(x2) (y2) (  2 y 3 )0.400375
-0.25 0.33493750
(  y 3 )0.7660625
(x3) (y3)
R
0 1.10100
CO

Newton‟s backward difference formula is


v v(v  1) 2 v(v  1)(v  2) 3
y ( x)  y 3  y3   y3   y3
1! 2! 3!
U

x  x3
where v =
h
x
ST

Here x 3 = 0, h= 0.25, v =  4x
0.25
4 x(4 x  1)
Y(x) = 1.10100 + 4x(0.7660625) + (0.406375) +
2
4 x(4 x  1)(4 x  2)
(0.09375)
6
= 1.101+3.06425x+ 3.251x 2 +0.81275x+x 3 +0.75x 2 +0.125x
= x 3 +4.001 x 2 +4.002x+1.101
1
To find f(- )
3
1 1 1 1
y(- ) = (- ) 3 +4.001(- ) 2 +4.002(- )+1.101
3 3 3 3
= 0.174518518

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

NEWTON’S DIFFERENTIATION FORWARD FORMULA

u u(u  1) 2 u(u  1)(u  2) 3 x  x0


y( x)  y 0  y 0   y0   y 0  ................ Where u
1 2 6 h

 dy  1 1 1 1 
    y 0  2 y 0  3 y 0  4 y 0  ... 
 dx  x  x0 h  2 3 4 
d2y 1  11 
 2   2  2 y 0  3 y 0  4 y 0  ... 
 dx  x  x0 h  12 
d3y 1  3 
 3   3  3 y 0  4 y 0  ... 
 dx  x  x0 h  2 
PROBLEMS BASED ON NEWTON’S FORWARD DIFFERENCE FORMULA (EQUAL
INTERVALS)

P
1.For the following values of x and y , find the first derivative at x  1.05

AP
x: 1 1.05 1.1 1.15 1.2
y: 1 1.025 1.049 1.072 1.095
SOLUTION:
STEP 1: Given x 0 = 1 , x 1 =1.05 , x 2 = 1.1 , x 3 =1.15, x4 =1.2
R
y 0 =1 , y 1 = 1.025 , y 2 = 1.049 , y 3 = 1.072 , y4 = 1.095

To find Find the first and second derivatives of the function at x  0.4 using Newton‟s
CO
STEP 2:
formula.

STEP 3: REQUIRED FORMULA:


 dy  1 1 2 1 3 1 4 
    y 0   y0   y0   y 0  ... 
U

 dx  x  x0 h 2 3 4 
d2y  1  2 11 4 

 dx 2 
  2 
 y 0  3 y 0   y 0  ... 
  x  x0 h  12 
ST

STEP 4: CALCULATIONS
Difference Table :
X Y △y △2 y △3 y △ 4y
(x0) 1 (y0) 1
(△y0)0.25
(x1) 1.05 (y1) 1.025 (△ 2 y0)-.001
(△ 3 y0)0
(x2) 1.1 (y2) 1.049 (△y1).024 (△ 2 y1)-.001 (△ 4 y0).001
3
(△ y1)0.001
2
(x3) 1.15 (y3) (△y2).023 (△ y2)0
1.072
(x4) 1.2 (△y2).023
(y4) 1.095

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

There are only5 data given. Hence the polynomial will be degree 4
Here x0 = 1.05, h=0.05 [difference]
 dy  1  1 1 1 
    0.024  (.001)  (.001)  (.001)   0.493
 dx  x  x0 .05  2 3 4 

=
d2y 1  11 
 2   2 
(.001)  .001  (.001)   1.1648
 dx  x  x0 (.05)  12 

RESULT: y‟(1.05) = 0.493 & y‟‟(1.05) =  1.1648


dy
2. Find at x = 1 from the following table:
dx

P
x 1 2 3 4
Y 1 8 27 64

AP
Sol: The forward difference table is as follows
x y  2 3
1 1
7
2 8 12
R
19 6
3 27 18
CO
37
4 64
U

 dy  1 2 3 
   
 0y  y0  y0  ........ 
 dx  x  x 0 h  2 3 
ST

 dy 
   3
 dx  x 1

3.Find y ' andy " at x=1.25 for the data given:

x: 1.00 . 1.05 1.10 1.15 1.20


y: 1.00000 1.02470 1.04881 1.07238 1.09544
SOLUTION:
STEP 1: Given x 0 = 1 , x 1 =1.05 , x 2 = 1.1 , x 3 =1.15, x4 =1.2

y 0 =1 , y 1 = 1.025 , y 2 = 1.049 , y 3 = 1.072 , y4 = 1.095

STEP 2: To find Find the first and second derivatives of the function at x  1.25 using Newton‟s

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

STEP 3: REQUIRED FORMULA:

 dy  1 1 1 
    y n   2 y n   3 y n  ...
 dx  x  xn h  2 3 
d2y 1  2 11 4 
 2   2   y n   y n   y n  ...
3

 dx  x  xn h  12 

Difference Table :
X Y y 2y 3y  4y

P
(x0) 1 (y0) 1

AP
(  y0)0.25
(x1) 1.05 (y1) 1.025 (  2 y0)-.001
(  3 y0)0
(x2) 1.1 (y2) 1.049 (  y1).024 (  2 y1)-.001 (  4 y0).001
(  y1)0.001
3

(x3) 1.15 (y3) 1.072 (  y2).023 (  y2)0


2
R
(x4) 1.2 (y4) 1.095 (  y2).023
CO

There are only5 data given. Hence the polynomial will be degree 4
Here x0 = 1.25, h=0.05 [difference]
 dy  1  1 1 1 
    0.023  (0)  (.001)  (.001)   0.4716
 dx  x  x0 .05  2 3 4 
U

=
d2y 1  11 
ST

 2   2 
(0)  .001  (.001)   .764
 dx  x  x0 (.05)  12 

RESULT: y‟(1.2) = 0.4716 & y‟‟(1.2) = .764

4. Find f (3) and f(3) for one following data:

X 3.0 3.2 3.4 3.6 3.8 4.0


F(x) -14 -10.032 -5.296 -0.256 6.672 14
Sol:

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

Since we require f (3) and f(3) we use Newton‟s forward formula.

X Y y 2 y 3 y 4 y 5 y
3.0 -14
3.968
3.2 -10.032 0.768
4.736 -0.464
3.4 -5.296 0.304 2.048
5.04 1.584 -5.12
3.6 -0.256 1.888 -3.072
6.928 -1.488

P
3.8 6.672 0.4
7.328

AP
4.0 14

By Newton‟s forward formula


 dy 
   9.4665
R
 dx  x  x0
 d2y 
CO
 2 184.4075
 dx  x  x0
5. Find f (0) and f(4) for one following data:

X 0 1 2 3 4
U

F(x) 1 2.718 7.381 20.086 54.598


Sol:
ST

Since we require f (3) and f(3) we use Newton‟s forward formula.

X Y y 2 y 3 y 4 y
0 1
1.718
1 2.718 2.945
4.663 5.097
2 7.381 8.042 8.668
12.705 13.765
3 20.086 21.807
34.512
4 54.598

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

By Newton‟s forward formula


 dy 
   0.2225
 dx  x  x0
By Newton ' s backward difference formula
 dy 
   52.1705
 dx  x  xn
 d2y 
 2  43.5177
 dx  x  xn

Formula for Trapezoidal rule

x0  nh

P
 y( x)dx 
h
 y 0  y n   2 y1  y 2  y 3  ............. y n 1 .
2

AP
x0

PROBLEMS BASED ON TRAPEZOIDAL


1
dx
1.Evaluate  using Trapezoidal rule with 6 subintervals.
R
0 1 x
2

SOLUTION:
CO
1
dx
STEP1: Given,y(x) =  & h=1/6
0 1 x
2

x: 0 1/6 2/6 3/6 4/6 5/6 1


So,
Y 1 36/37 9/10 4/5 9/13 36/61 1/2
U

1
dx
STEP2: To Evaluate 1 x 2
using Trapezoidal rule
ST

FORMULA FOR SIMPSON’S ONE THIRD RULE


x0  nh

 y( x)dx  3  y  y n   4 y1  y 3  ............. y n 1   2 y 2  y 4  ............. y n 2 .


h
0
x0
1 1
x 2 dx 1
2.Find the value of log e 2 from  3
using Simpson‟s rule with h=0.25.
0 1 x
3
3
SOLUTION:
1
x 2 dx
STEP1: Given,y(x) =  & h=0.25.
0 1 x
3

x: 0 .25 .5 .75 1
So,
Y 0 .06154 .2222 .3956 .5

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP
1 1
x 2 dx 1
STEP2: To Evaluate Find the value of log e 2 3 from 0 1  x 3 using Simpson‟s 3 rule
STEP3: Required formula:
x0  nh

x y( x)dx  3  y 0  y n   4 y1  y3  ............. y n1   2 y 2  y 4  ............. y n2 .


h
0

STEP4: calculations:
1

0 y( x)dx  3 0  .5  2(.2222)  4(.06154  0.3956).


.25

=0.231046
1 2
x dx 1
0 1  x 3 = 3 log(1  x )
2

P
log(1  x 2 )  0.231046
1
x 2 dx 1
RESULT:  = log(1  x 2 ) log(1  x 2 )  0.231046

AP
0 1 x
3
3 :
1
dx
3. Using Trapezoidal rule , Evaluate  1 x
1
2
taking 8 intervals.

Sol:
1
Here y(x) =
R
1  x2
Length of the interval = 2
CO
So we divided 8 equal interval with h = 0.25
We form the table

X -1 -0.75 -0.5 -0.25 0 0.25 0.5 0.75 1


U

Y 0.5 0.64 0.8 0.9412 1 0.9412 0.8 0.64 0.5


By Trapezoidal Rule
h  Sum of the first and last ordinate  
1
1
 1  x2 2 2(Sum of the remaining ordinates) 

ST

dx
1
0.25
= [(0.5+0.5)+2(0.64+0.8+0.9412+0.8+0.64) ]
2
0.25
= [1+2(5.7624)]
2
0.25
= [12.5248]
2
= 1.5656.

2
4. Dividing the range into 10 equal parts , find the value of  sin x
0
dx

by (i) Trapezoidal rule ii)Simpson’s rule.


Sol:

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

X 0  2 3 4 5 10
6 7 8 9
20 20 20 20 20 20
20 20 20 20
Y= 0 0.1564 0.3090 0.4540 0.5878 0.7071 0.8090 0.8910 0.9511 0.9877 1
sinx
i) By Trapezoidal Rule

h
0 sin x dx  2 ( y0  y11 )  2( y1  y2  .....  y10 )
= 0.9980

ii) By Simpson‟s Rule



2
h
 sin x  y0  y11   4( y1  y3  y5  y7  y9 )  2( y2  ...  y10 

P
dx 
0
2

AP
= 1.0000

6
dx
5. Evaluate  1 x
0
2
by (i) Trapezoidal rule (ii) Simpson’s Rule .Also check up the

result by actual integration.


Sol:
R
Here b – a = 6 – 0 = 6.
CO
Divide into 6 equal parts, h = 1

X 0 1 2 3 4 5 6
1 1.00 0.500 0.200 0.100 0.058824 0.038462 0.27027
F(x)=
1  x2
U

There are 7 ordinate‟s (n = 6) .We use the formula


i) Trapezoidal Rule:
ST

6
dx
I=  = 1/2 [ (1+0.027027)+2(0.5+0.2+0.1+0.058824+0.038462)]
0
1  x2
= 1.41079950.
ii) By Simpson‟s One – Third Rule:

I = 1 / 3[(1+0.027027)+2(0.2+0.058824)+4(0.5+0.1+0.038462)]
= 1/3 (1.027027+0.517648+2.553848)
= 1.36617433.

iii) By Simpson‟s 3 / 8 Rule:


I = 3 / 8 [(1+0.027027)+3(0.5+0.2+0.058824+0.038462)+2*0.1]
= 1.35708188.

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

iv) The actual integration


6
dx
I=
I  1 x
0
2
 [ tan 1 x]06

1.40564765
5
dx
6. Evaluate  4 x  5 by simpson’s 1/3 rule .Hence find the value of
0
log e5 (n = 10)

Sol:
1
Here y(x) = , h =1/2
4x  5

P
X 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Y(x) 0.2 0.1429 0.1111 0.0909 0.0769 0.0667 0.0588 0.0526 0.0476 0.0434 0.04

AP
By simpson‟s 1 / 3 rule :

5 1 (0.2  0.04)  (0.1111  0.0769  0.0588  0.0476)  


0 4 x  5 = 6 4(0.1429  0.0909  0.0667  0.0526  0.0434) 
dx
R
= 0.4045. …………………(1)
CO

 log(4 x  5) 
5 5
dx 1
0 4 x  5 =  4 0  4 log 5 ………………….(2)
from 1 and 2
U

1
log 5  0.4025
4
log 5  1.61.
ST

DOUBLE INTEGRALS BY TRAPEZOIDAL

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

UNIT-V
NUMERICAL SOLUTION OF ORDINARY IDFFERENTIAL EQUATIONS

1.State the disadvantage of Taylor series method.

Solution:
In the differential equation dy  f  x, y  the function f  x, y  may have a
dx
complicated algebraically structure. Then the evaluation of higher order derivatives
may become tedious. This is the demerit of this method.

2.Write down the fourth order Taylor’s series Algorithm.

Solution:

P
h2 '' h3 ''' h4 iv
ym1 ym  h ym 
'
ym  ym  ym

AP
2! 3! 4!
Here ym n denotes the r th derivative of y w.r.to x at the point  xm , ym  .

R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
dy
5. Write down the Euler algorithm to the differential equation  f  x, y  .
dx
CO
Solution:
yn1 yn  h f  xn , yn  When n = 0, 1, 2...
This is Euler algorithm. It can also be written as y( x  h)  y( x)  h f ( x, y)
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

dy
The Runge-Kutta formula of fourth order to solve  f  x, y  with y( xo )  yo
dx
Solution:
Let h denotes the interval between equidistant values of x . If the initial values are
( xo , yo )
the first increment in y is computed from the formulae‟s.
K1  h f ( xo , yo )
 h K 
K 2  h f  xo  , yo  1 
 2 2 
 h K 
K3  h f  xo  , yo  2 
 2 2 
K 4  h f  xo  h , yo  K 3 

P
1
and y   K1  2 K 2  2 K3  K 4 
6

AP
Then y1  yo  y

The increment in y in the second interval is computed in a similar manner using the same
four formulas, using the values x1 , y1 in the place of x0 , y0 respectively.
R
Special advantages of Runge-Kutta method over Taylor series method .
CO

Solution:
Runge-Kutta methods do not require prior calculation of higher derivatives of y(x), as The
Taylor‟s method does. Since the differential equations using in application are often
U

complicated, the calculation of derivatives may be difficult.


ST

Also, the Runge –Kutta formulas involve the computations of f(x,y) at various positions ,
instead of derivatives and this function occurs in the given equations .

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

P
AP
R
CO
U
ST

MILNE’S PREDICTOR AND CORRECTOR FORMULA.

Milne‟s predictor formula is,


4h
yn1  yn3   2 y 'n2  y 'n1  2 y 'n 
3
Milne‟s corrector formula is,
h
yn1  yn1   y 'n1  4 y 'n  y 'n1 
3

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

The error term in Milne’s corrector formula

h 4
The error term is   y 'o .
90

The error term in Milne’s predictor formula ?


14h 4
The error term is  y 'o
45

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

THE ADAMS-BASHFORTH PREDICTOR & CORRECTOR FORMULA.

Adam‟s predictor& corrector formula are


h
yn1, p  yn   55 y 'n  59 y 'n1  37 y 'n2  9 y 'n3 
24
h
yn1, c  yn   9 y 'n1  19 y 'n  5 y 'n1  y 'n2 
24
Compare Runge-Kutta methods and Predictor – Corrector methods for solutionof initial
value problem.
Runge-Kutta methods:

1. Runge-methods are self-starting method , since they do not use information


From previsiously calculated points.
2. As means are self starting an easy change in the step size can be made at any

P
Stage.
3. Since the methods require several evaluations of the function f (x, y), they are

AP
time Consuming.
4. In these methods, it is not possible to get any information about truncation
error.

Predictor – Corrector methods


1. These methods require information about prior points and so they are not self
starting.
R
2. In these methods, it is possible to get easily a good estimate of truncation error.

Predictor – Corrector method of solving a differential equation


CO

Predictor – Corrector methods are method whish require the value of y at

xn , xn1, xn2 ,... for computing the value of y at xn1 . We first use a formula to
U

find the values of y at xn1 and this is known as a predictor formula . The vakue

of y so got is improved or corrected by another formula known as corrector formula.


ST

Adam‟s method Error

251 5 (iv )
Predictor h f ( )
720

19 5 (iv )
Corrector h f ( )
720

DOWNLOADED FROM STUCOR APP


DOWNLOADED FROM STUCOR APP

The method is self – starting and Not self – starting.

Self-starting method Not Self-starting method

1. To find  xn1, yn1  we use only the We need past values , based on that
only we get the next value.
information at  xn , yn 

2. Example Taylor‟s series , Euler Milne‟s , Adam‟s method

P
AP
R
CO
U
ST

DOWNLOADED FROM STUCOR APP

You might also like