Ma SNM Notes
Ma SNM Notes
Ma SNM Notes
3 1 0 4
COURSE OBJECTIVES:
This course aims at providing the necessary basic concepts of a few statistical and
numerical methods and give procedures for solving numerically different kinds of
problems occurring in engineering and technology.
To acquaint the knowledge of testing of hypothesis for small and large samples which
plays an important role in real life problems?
To introduce the basic concepts of solving algebraic and transcendental equations.
To introduce the numerical techniques of interp ation in various intervals and
numerical techniques of differentiation and integration which plays an important role in
engineering and technology disciplines.
To acquaint the knowledge of various techniques an me hods solving ordinary
differential equations.
UNIT I TESTING OF HYPOTHESIS 9+3
Sampling distributions - Tests for single mean, proportion and difference of means (Large
and smallsamples) – Tests for single variance and equality of variances – Chi square test for
goodness of fit - Independence of attributes.
TEXT BOOKS:
REFERENCES:
1. Burden, R.L and Faires, J.D, "Numerical Analysis”, 9th Edition, Cengage Learning,
2016.
2. Devore. J.L., "Probability and Statistics for Engineering and the Sciences”, Cengage
Learning, New Delhi, 8th Edition, 2014.
3. Gerald. C.F. and Wheatley. P.O. "Applied Numerical Analysis” Pearson Education,
Asia, NewDelhi, 7th Edition, 2007.
4. Gupta S.C. and Kapoor V. K., “Fundamentals of Mathematical Statistics”, Sultan
Chand & Sons, New Delhi, 12th Edition, 2020.
5. Spiegel. M.R., Schiller. J. and S nivasa R.A., "cha , Outline on Probability and
Statistics ", Tata McGraw Hill Edition, 4 Edition, 2012.
6. Walpole. R.E., Myers. R.H., Myers. S.L. and Ye. K., “Probability and Statistics for
Engineers and Scientists", 9th Edition, P.
UNIT I TESTING OF HYPOTHESIS 9+3
Sampling distributions - Tests for single mean, proportion and difference of means (Large
and smallsamples) – Tests for single variance and equality of variances – Chi square test for
goodness of fit - Independence of attributes.
10. If two samples are taken from two population of unequal variances can we apply
t-test to test the difference of mean.
Solution.
We can not apply t-test because the assumptions population variances are equal and
unknown.
13. Give the formula for the chi square test of independence A b for
C d
Solution.
A B Total
A a B a+b
B c D c+d
Total a+c b+d
( )
( )( )( )( )
14. Define Critical region.
Solution.
A region corresponding to a statistic t in the sample space S which lead to the
rejection of Ho is called Critical region or Rejection region. Those regions which
lead to the acceptance of Ho are called Acceptance Region.
iii. √ .
19. Write the formula for the Chi-square test of goodness of fit of a random sample
to a hypothetical distribution.
Solution.
Chi square test of goodness of fit is a test to find if the derivation of the experiment
from theory is just by chance or it is due to the inadequacy of the theory to fit the
observed data. By this test, we test whether differences between observed and
expected frequencies are significant or not.
24. What are the non - parametric tests for Hypothesis testing?
Solution.
Chi – square test.
1. In a random of 1000 people from city A, 400 are found to be consumers of rice.
In a sample of 800 from city B, 400 are found to be consumers of rice. Does this
data give a significant difference between the two cities as far as the proportion
of rice consumers is concerned?
Solution.
n1 1000 n2 800
400 400
p1 0.4 p2 0.5
1000 800
1. H 0 : p1 p2
2. H1 : p1 p2
3. 5% table value is 1.96
4.The test statistic
p1 p2
z
1 1
pq
n1 n2
Where =0.444
√ ( )
i.e; ( )
So, H0 is rejected.
Therefore there is significant difference between the consumers of rice in the two
cities A and B.
2. Two random samples of size 400 and 500 have mean 10.9 and 11.5 respectively.
Can the samples be regarded as drawn from the same population with variance
25?
Solution:
√
1.78
| |
3. A sample of 900 members has a mean 3.4 centimeters and standard deviation
2.61 centimeters. Is the sample from a large population of mean 3.25 centimeters
and standard deviation 2.61 centimeters?
Solution.
Given
n 900 3.25
x 3.4 2.61
s 2.61
Null Hypothesis H 0:
Assume that the sample has been drawn from the population with mean 3.25
Alternative Hypothesis H 1 :
3.25
The Test Statistic is
x 3.4 3.25
z
s 2.61
n 900
1.724
z 1.724 1.96
Therefore we accept the null hypothesis H o at 5% level of significance.
i.e., The sample has been drawn from the large population with mean 3.25
4. A die was thrown 400 times and 6 resulted 80 times. Do the date justify the
hypothesis that the die is unbiased?
Solution:
Given n = 400
√
√
5. A random sample of 100 bulbs from a company P shows a mean life 1300 hours
and standard deviation of 82 hours. Another random sample of 100 bulbs from
company Q showed a mean life 1248 hours and standard deviation of 93 hours
.Are the bulbs of company P supe rior to bulbs of company Q at 5% level of
significance?
Solution.
Given : n1 100 x1 1300 s1 82
n2 100 x2 1248 s2 93
1. H 0 : 1 2
2. H1 : 1 2 (Use one-tailed right)
3. 5%
4. The test statistic
x1 x 2 1300 1248
Z=
2 2
s s (82) 2 (93) 2
1
2
n1 n2 100 100
52
4.19
67.24 86.49
5. Conclusion:
If Z<Zα , then we accept H 0 ;otherwise, we reject H 0 .
Here, 4.19 >1.645
So, we reject H 0 .
6. The sales manager of a large company conducted a sample survey in states A
and B taking 400 samples in each case. The results were
State A State B
Average Rs. 2,500 Rs. 2,200
Sales
S.D. Rs. 400 Rs. 550
Test whether the average sales is the same in the 2 states at 1% level of
significance.
Solution.
Given : n1 400 x1 2500 s1 400
n2 550 x2 2200 s2 550
1. H 0 : 1 2
2. H1 : 1 2 (Use two-tailed test)
3. 1%
4.The test statistic
x1 x 2 2500 2200
Z=
2 2
s s (400)2 (550)2
1
2
n 1 n2 400 400
300
8.82
400 756.25
Conclusion:
If Z /2 < Z < Z /2 , then we accept H 0 ;otherwise, we reject H0 .
Here,8.82 2.58
So, we reject H0 .
7. A random sample of 10 boys has the following I.Q‟s: 70, 120, 110, 101, 88, 83,
95, 98, 107 and 100. Do these data support the assumption of a population mean
I.Q of 100 at 5% level of significance?
Solution.
H 0 : 100 & H1 : 100
Level of Significance :
0.05
Test Statistic :
x 2 x
2
x
t , where S 2
S n n
n
Analysis:
X X2
70 4900
120 14400
110 12100
101 10201
88 7744
83 6889
95 9025
98 9604
107 11449
100 10000
x = 972 x 2 = 96312
( ) ( ( )) =9631.2-9447.84=183.36.
Conclusion:
The table value is greater than the calculated value; hence we accept the null
hypothesis and conclude that the data are consistent with the assumption of mean I.Q
of 100 in the population.
x x
2 2
S 2
=
( )
n n
Table value:
t ,n1 t5%,101 t0.05,9 2.262
Conclusion:
t 2.632 2.26
Therefore the difference is significant and the medicine is responsible for increase of
BP.
9. The height of 10 males of a given locality are formed to be 70, 67, 62, 68, 61, 68,
70, 64, 64, 66, inches. Is it reasonable to believe that the average height is greater
than 64 inches?
Solution:
Given
( ̅)
i.e., √
̅
⁄
√
√
√
=2
10. The average breaking strength of the streel rods is specified to be 18.5 thousand
pounds. To test this a sample of 14 rods was tested. The mean and S.D obtained
were 17.85 and 1.955 respectively at 5% level of significance.
Solution:
Given ̅
| |
d.o.f = n-1 = 13
table vaule = 2.16
=1.199
table value.
.
11. The following data relate to the marks obtained by 11 students in two tests, one
held at the beginning of the year and other at the end of the year, after intensive
coaching.
Test I: 19 23 16 24 17 18 20 18 21 19 20
Test II: 17 24 20 24 20 22 20 20 18 22 19
Do the data indicate that the students have benefited by coaching?
Solution.
The given data relate to the marks obtained in two tests by the same set of students.
Hence the marks in the two tests can be regarded as correlated.
Null Hypothesis H 0 : x1 x2 The coaching is not useful
Alternative Hypothesis H 1 : x1 x2 The coaching is useful
x1 x2 d x1 x2 d d (d d ) 2
19 17 2 3 9
23 24 -1 0 0
16 20 -4 -3 9
24 24 0 1 1
17 20 -3 -2 4
18 22 -4 -3 9
20 20 0 1 1
18 20 -2 -1 1
21 18 3 4 16
19 22 -3 -2 4
20 19 1 2 4
-11 58
t
d
where S 2
(d d ) 2
S/ n n 1
d
d 11 1
n 11
S2
(d d ) 58 5.8
2
n 1 11 1
S 2.41
d 1
t 1.38
S / n 2.41/ 11
t 1.38
Degrees of freedom = n-1 = 11-1 = 10
Tabulated value for 10 degrees of freedom at 5% level for one tail test is
1.812.
1.38<1.812
Calculated t < tabulated t
H 0 is accepted. The course is not useful.
12. A group of 10 rats fed on diet A and another group of 8 rats fed on diet B
recorded the following increase in weight
Diet A 5 6 8 1 12 4 3 9 6 10
Diet B 2 3 6 8 10 1 2 8 - -
Does it show superiority of diet A over diet B.
Solution.
Given n1 10, n2 8
Null Hypothesis H 0: 1 2
Sample I Sample II
x1 x 12 x2 x22
5 25 2 4
6 36 3 9
8 64 6 36
1 1 8 64
12 144 10 100
4 16 1 1
3 9 2 4
9 81 8 64
6 36
10 100
64 512 40 282
2 2
To find S1 and S 2
x x
2
n1 10, n2 8, 1 64, 1 512
x x
2
2 40, 2 282
x1 x 1
64
6.4, x2 x 2
40
5
n1 10 n2 8
s12 x x 2
1
1
2
512
6.4 10.24,
2
n 1 10
s
2
2
x x 2
2
2
2
282
5 10.25
2
n 2 8
n s n2 s22 10(10.24) 8(10.25)
2
S2 1 1
11.525
n1 n2 2 10 8 2
̅̅̅̅ ̅̅̅̅
= = 0.869
√ ( ) √ ( )
Conclusion:
Since the calculated value of t = 0.869 < the table value of t =1.75, H 0 is
accepted at 5% level of significance. Hence, the difference is not significant, so we
cannot conclude the diet A is superior to diet B.
13. Two independent samples of 8 and 7 items respectively had the following values.
Sample I 9 11 13 11 15 9 12 14
Sample II 10 12 10 14 9 8 10 -
*∑( ̅) ∑( ̅) +
[ ]
̅ ̅
S 2
(x 1 x1 ) 2
S 2
(x 2 x2 ) 2
n1 1 n2 1
1 2
90 108
10 9.82
9 11
S12 10
F 2
1.018
S 2 9.82
Calculated F=1.018
Tabulated F at 5% level for (9, 11) degrees of freedom is 2.90.
F0.05 (9,11) 2.90
Since calculated F < tabulated F, we accept the null hypothesis H0.
1 2
The samples come from the same normal population.
1
s2 ( x1 x1 ) 2 ( x2 x2 ) 2
n1 n2 2
1
90 108
10 12 2
9.9
s 3.15
x1 x2 15 14
The test statistic is t 0.74
1 1 1 1
s 3.15
n1 n2 10 12
Calculated value t 0.74
Tabulated value of t for 20 degrees of freedom (n1 n2 2) at 5% level of
significance is 2.086.
Since calculated value of t < tabulated value of t. We accept the null hypothesis
H 0 . i.e., 1 2 .
Hence from (i) and (ii), the given samples have been drawn from the same
normal population.
16. From the following data test if the difference between variances is significant at
5% level of significance.
Sum of squares of
Sample Size
deviations from the mean
A 8 84.4
B 10 102.6
Solution.
H 0 : 12 22
H1 : 12 22
Given n1 8 n2 10
( x x ) 84.4
1 1
2
( x x ) 102.6
2 2
2
S S
2 (x x ) 1 1
2
2 (x x ) 2 2
2
n1 1 n2 1
1 2
84.4 102.6
12.06 11.4
7 9
S12 12.06
F 1.058
S22 11.4
Calculated F=1.058
F0.05 ( 7 ,9 ) 3.29
Since calculated F < tabulated F, we accept the null hypothesis H0
Hence variances of the two populations are equal.
17. In one sample of 8 observations, the sum of the square of deviations of the
sample values from the sample mean was 84.4 and in the other sample of 10
observations it was 102.6. Test whether this difference is significant at 5% level,
given that the 5% point of F for and , degrees of freedom is 3.29.
Solution:
Given
∑( ̅̅̅ )
∑( ̅̅̅ )
∑( ̅̅̅ )
∑( ̅̅̅ )
( )
( )
is accepted.
18. It is believed that the precision of an instrument is no more than 0.16. Write
down the null and alternative hypotheses for testing this belief. Carry out the test
at 1% level of significance, given 11 measurements of the same subject on the
instrument. 2.5, 2.3, 2.4, 2.3, 2.5, 2.7, 2.5, 2.6, 2.6, 2.7, 2.5.
Solution.
Given : 2 0.16
∑
̅
̅ ( ̅)
2.5 -0.01 0.0001
2.3 -0.21 0.0441
2.4 -0.11 0.0121
2.3 -0.21 0.0441
2.5 -0.01 0.0001
2.7 0.19 0.0361
2.5 -0.01 0.0001
2.6 0.09 0.0081
2.6 0.09 0.0081
2.7 0.19 0.0361
2.5 -0.01 0.0001
0.1891
Table value
∑( ̅)
Test statistic =
If χ 2 < table χ 2 , then we accept H 0 ;otherwise, we reject H 0 .
Here,1.182 23.2
So, we accept H 0 .
Thus the data are consistent with the hypothesis that the precision of the instrument is
0.16.
19. The following data gives the number of aircraft accidents that occurred during
the various days of a week. Find whether the accidents are uniformly distributed
over the week.
Days: Sun Mon Tue Wed Thu Fri Sat
No. of
14 16 8 12 11 9 14
accidents:
Solution.
Null Hypothesis H 0: The accidents are uniformly distributed over the week.
Alternative Hypothesis H 1: The accidents are not uniformly distributed over the
week.
= 0.05,d.f = n-1 = 7-1= 6
Table value 2 12.592
O E x 84 12
2
2
where E x
E n 7
O E
2
O E
E
14 12 0.333
16 12 1.333
8 12 1.333
12 12 0
11 12 0.083
9 12 0.75
14 12 0.333
TOTAL 4.165
O E
2
2
4.165 12.592
E
Hence, we accept H 0.
20. The theory predicts that the proportion of beans in four given group should be 9:
3: 3: 1. In an examination with 1600 beans, the numbers in the four groups were
882, 313, 287 and 118. Does the experimental result support the theory?
Solution.
H0: The proportion of beans in the four groups are in the ratio 9 : 3 : 3: 1.
H1: The proportion of beans in the four groups are not in the ratio 9 : 3 : 3: 1.
= 0.05,d.f = n-1 = 4-1=3
Table value 2 7.81
Given that the observed frequencies are 882, 313, 287 and 118.
Total observed frequency = 882+313+287+118 = 1600
The expected frequencies are,
9
1600 900
16
3
1600 300
16
3
1600 300
16
1
1600 100
16
O E
2
O E
E
882 900 0.360
313 300 0.563
287 300 0.563
118 100 3.240
TOTAL 4.726
O E
2
2
4.726 7.81
E
Hence, we accept H0.
Therefore proportion of beans in the four groups are in the ratio 9 : 3 : 3 : 1.
21. Using the data given in the following table to test at 1% level of significance
whether a person‟s ability in Mathematics is independent of his/her interest in
Statistics?
Ability in
Low Average High Total
Mathematics
Interest
in Statistics
135 120 120 150 120 75
Low 45 50 25 120
360 360 360
135 150 150 150 75 150
56.25 62.5 31.25
Average 360 360 360 150
135 90 150 90 90 75
High 33.75 37.5 18.75 90
360 360 360
Total 135 150 75 360
1. H 0 : Abilityin Mathematicsandinterest inStatisticsare independent
2. H1 : Abilityin Mathematicsandinterest inStatistics are not independent
(Oi Ei )2
2 32.14
i Ei
Table valueof χ 2 at1% Losfor 4 d.f =13.277
Since32.14>13.2777, H 0 is rejected.
Therefore there is a relationship between a person‟s ability in Mathematics and his/her
interest in Statistics.
22. In an investigation into the health and nutrition of two groups of children of
different social status, the following results are got and their economic
conditions. What conclusion can you draw from the following data?
Social Status Total
Healths
Poor Rich
Below normal 130 20 150
Normal 102 108 210
Above normal 24 96 120
Total 256 224 480
Discuss the relation between the Health and their Social Status.
Solution.
Expected frequencies are:
(130 80)2 (20 70)2 (102 112)2 (108 98)2 (24 64)2 (96 56)2
2
80 70 112 98 64 56
31.25 35.71 0.89 1.02 25 28.57 122.44
d . f . (3 1) (2 1) 2 (class total are kept same)
For v 2 at 5 level 2 value from table 5.991
2 0.05
2
(v 2)
H0 is rejected. Hypothesis is not acceptable.
That is, social status and health are associated (dependent).
23. The no.of automobile accidents per week in a certain community are as follows:
12,8,20,2,14,10,15,6,9,4. Are there frequencies in agreement with the belief that
accident conditions were the same during this 10 week period?
Solution:
The accident conditions were the same during this 10 week period.
The accident conditions are not were the same during this to week period.
Total no.of accidents = 100
Expected frequency of accidents each week = .
( )
W.K.T ∑* +
Here n=10
d.o.f= n-1 = 10-1 = 9
O E O-E ( )
12 10 2 4
8 10 -2 4
20 10 10 100
2 10 -8 64
14 10 4 16
10 10 0 0
15 10 5 25
6 10 -4 16
9 10 -1 1
4 10 -6 36
( )
∑* +
is rejected.
The accident conditions were not the same during this 10 week period.
24. A sample analysis of examination results of 500 students was made, It was found
that 220 students had failed, 170 students had secured a third class, 90 were
placed in second class and 20 got a first class. Do these figures with the general
examination result which is in the ratio of 4:3:2:1 for the various categories ?
Solution:
The observed results with the genral examination result.
The observed results are not with the genral examination result.
Total frequency = 500
Expected frequency are in the ration 4:3:2:1.
If we divide the total frequency 500 in the ration4:3:2:1, we get the expected
frequencies are 200,150,100,50.
i.e.,
( )
Class O E O-E ( )
Failed 220 200 20 400 2
Third 170 150 20 400 2.667
Second 90 100 -10 100 1
First 20 50 -30 900 18
23.667
Degree of freedom = 4-1 = 3.
5% level of significance = 7.815
is rejected.
Hence , the observed results are not with the general examination result.
25. In a certain sample of 2000 families, 1400 families are consumers of tea. Out of
1800 hindu families, 1236 families consumes tea. Use test and state whether
there is any significant difference berween consumption of tea among, Hindu
and non-Hindu families.
Solution:
There is no significant difference between the consumption of tea among Hindu
and non-Hindu families.
There is significant differences between the consumption of tea among Hindu and
non-Hindu families.
Observed frequencies:
Expected frequencies:
1400
600
( )
O E O-E ( )
1236 1260 24 576 0.4571
564 540 24 576 1.0666
164 140 24 576 4.1143
36 1260 24 576 9.6
15.238
No.of degrees of freedom = (r-1)(s-1)
=1
is rejected.
Hence, there is significant difference between the consumption of tea among Hindu
and non-Hindu families.
UNIT II DESIGN OF EXPERIMENTS 9+3
One way and two way classifications - Completely randomized design – Randomized block
design, Latin square design - 22 factorial designs.
(k 1) (k 1)
2
SE S .S .E
sE (say) is the M.S.S. due to error.
2
and
(N k) (N k)
4. Explain the word „treatment‟ in ANOVA
Solution.
The word „treatment‟ in ANOVA is used to refer to any factor in the experiment
that is controlled at different levels or values.
12. Write down the ANOVA table for one way classification.
Solution.
Analaysis of variance (ANOVA) table : one-way classification model
Sources of Sum of v Mean square Variance ratio
variation squares d.f
Between SSC v1 c 1 MSC = SSC
sample c 1 FC = MSC
Within SSE v2 n c MSE = SSE MSE
samples nc
Total TSS n 1
TSS = Total sum of squares of variations
SSC = Sum of squares between samples (columns)
SSE = Sum of squares within samples (rows)
MSC = Mean sum of squares between samples
MSE = Mean sum of squares within samples
1. The following table shows the live in hours of four brands of electric lamps
brand.
A 1610 1610 1650 1680 1700 1720 1800 -
B 1580 1640 1640 1700 1750 - - -
C 1460 1550 1600 1620 1640 1660 1740 1820
D 1510 1520 1530 1570 1600 1680 - -
Perform an analysis of variance and test the homogeneity of the mean lives of the
four brands of lamps.
Solution.
H 0 : There is no significant difference between the four brands.
H 1 : There is significant difference between the four brands.
Subtract 1600 and then divided by 10 we get
X1 X2 X3 X4
A B D Total X 12 X 22 X 32 X 24
C
1 -2 -14 -9 -24 1 4 196 81
1 4 -5 -8 -8 1 16 25 64
5 4 0 -7 2 25 16 0 49
8 10 2 -3 17 34 100 4 9
10 15 4 0 29 100 225 16 0
12 - 6 8 26 144 - 36 64
20 - 14 - 34 400 - 196 -
- - 22 - 22 - - 484 -
57 31 29 -19 98 735 361 957 267
Step 1 : N = 26
Step 2. T = 98
T 2 9604
Step 3. C.F. = 369.39
N 26
2 2 2 T2
Step 4. TSS = X1 X 2 X 3 X 2
4 N
= 735 + 361 + 957 + 267 – 369.39 = 1950.61
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
Step 5. SSC = 1 2 3 4
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(57)2 (31)2 (29)2 (19)2
= 369.39 = 452.25
7 5 8 6
SSE = TSS – SSC = 1950.61 – 452.25 = 1498.336
Step 6. ANOVA table
SSC MSC
Between SSC = C –1 MSC = FC = FC(3, 22)
C 1 MSE
Columns 452.225= 4 – 1 = 3 452.25 150.75 = 3.05
= =
3 68.11
150.75 = 2.21 > 1
Since
MSE
<1
MSC
SSE
Error SSE = N–C MSE =
N-C
1498.36 = 26 – 4 1498.36
= 22 =
22
A B C D
20 25 24 23
19 23 20 20
21 21 22 20
Solution.
H0 : Here the population means are equal .
H1 : The population mean are not equal.
N
X X X
2 2 2
T2
SSC 15
1 2 3
( N1 = No of element in each
N1 N1 N1 N
column )
SSE = TSS – SSC = 39 - 15 = 24
ANOVA TABLE
Between SSC
SSC=39 C-1=4-1=3 MSC =5 MSC
Samples C 1 FC
MSE
Within SSE =1.67
SSE=15 N-C=12-4=8 MSE =3
Samples NC
N = Total No of Observations = 15
T= Grand Total = 13.25
(Grand total )2
Correction Factor = = 11.7042
Total No of Observatio ns
T2
TSS X1 X 2 X 3 0.4309
2 2 2
N
X X X
2 2 2
T2
SSC 0.0608
1 2 3
( N1 = No of
N1 N1 N1 N
element in each column )
ANOVA TABLE
Source of Sum of
Degree of freedom Mean Square F- Ratio
Variation Squares
Between SSC
SSC=0.0608 C-1=3-1=2 MSC =0.0304 MSE
Samples C 1 FC
MSC
Within SSE =10.144
SSE=0.3701 N-C=15-3=12 MSE =0.3084
Samples NC
Yield 5 4 3 7 5 1 3 4 1 7
Analyze the res ults for treatme nt effects.
Solutio n:
All the plots are not applied with the same number of treatments a nd we are to
analyze the treatment effect ts only, we apply one way classification. Rearranging the
data
Treatment A : 5 7
Treatment B : 4 4
Treatment C: 3 5
Step 1: Null Hypothesis
Ho: There is no difference in the yield between treatment s.
Step 2 : Test Statis tic:
5 4 3
7 4 5
3 7 1
1 - -
16 15 9
LX2 =84+81+35=200
Correction factor = 16
SST= = 40
SSC= (16)2 + (lS)2 + (9)2 -160 = 6
SSE = SST - SSC =40 - 6 = 34
Between SSC
SSC=6 C-1=3-1=2 MSC =2 MSE
Samples C 1 FC
MSC
Within SSE =1.62
SSE=34 N-C=10-3=7 MSE =4.86
Samples NC
Step 3: Le vel of significance: Not given. So, let us take S % = O.OS
Step 4: Degrees of Freedom: (7, 2)
Step 5: Table value: Fo.os(7,2)= 19.3S
Step 6: Co nclusion: Comparing the F - value calculated at step 2 with table
Value Fca1 < F lab, we accept the Null hypothesis.
That is the re is no difference in the mean yield betwee n the treatment.
5. Consider the results given in the following table for an experiment involving 6
treatments in 4 randomized blocks. The treatments are indicated by numbers
with in the paranthesis.
1 (1) (3) (2) (4) (5) (6)
24.7 27.7 20.6 16.2 16.2 24.9
2 (3) (2) (1) (4) (6) (5)
22.7 28.8 27.3 15 22.5 17
3 (6) (4) (1) (3) (2) (5)
26.3 19.6 38.5 36.8 39.5 15.4
4 (5) (2) (1) (4) (3) (6)
17.7 31 28.5 14.1 34.9 22.9
Test whether the treatments differ significantly [ (F0.05 (3,15)=5.42, F0.05 (5,15)=4.5]
Solution.
We subtract the origin to 25 and workout with new values of Xij
Total
1 2 3 4 5 6 [T i]/k Xij2
=T i
Total
19 19.9 22.1 -35.1 -33.7 -3.7 -11.5 224.94 1355.77
=T j
T 11
2 2
SSR C.F 224.94 219.43
i
k 24
T j 11
2 2
SSC C.F 906.69 901.18
h 24
SSE = TSS – SSC – SSR = 229.65
ANOVA Table
Conclusion: Cal FC < Tab FC and Cal FR > Tab FR There is no significant
difference between the blocks and there is significant difference between the
Treatments.
ANOVA Table
A 6 C 5 A 8 B 9
C 8 A 4 B 6 C 9
B 7 B 6 C 10 A 6
Analyse the experimental yield and state your conclusions.
Solution.
Variety Block
1 2 3 4 Total X 12 X 22 X 32 X 24
A 6 4 8 6 24 36 16 64 36
B 7 6 6 9 28 49 36 36 81
C 8 5 10 9 32 64 25 100 81
Total 21 15 24 24 84 149 77 200 198
H 0 : The varieties are similar
H 1 : The varieties are not similar
Step 1 : N = 12
St Step 2. T = 84
T 2 (84)2
Step 3. C.F. = 588
N 12
2 2 2 T2
Step 4. TSS = X1 X 2 X 3 X 42
N
= 149 + 77 + 200 +198 –588 = 36
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
Step 5. SSC = 1 2 3 4
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(21)2 (15)2 (24)2 (24)2
= 588 = 18
3 3 3 3
( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
Step 6. SSR = 1 2 3
N N N N
2 2 2
[ N = number of elements in each row]
2
(24)2 (28)2 (32)2
= 588 = 8
3 3 3
Step 7 : Conclusion : In both the cases, the calculated value is less than
tabulated value.
Therefore, null hypothesis is accepted. Hence, the three varieties are similar.
8. Four varieties A, B, C, D of a fertilizer are tested in a RBD with 4 replications.
The plot yields in pounds are as follows:
A12 D20 C16 B10
D18 A14 B11 C14
B12 C15 D19 A13
C16 B11 A15 D20
Analyse the experimental yield.
Solution.
Let us take 12 as origin for simplifying the calculations
Row X1 X2 X3 X4 Total X2 X2 X2 X2 1 2 3 4
(y1) (1) A 0 D 8 C 4 B -2 10 0 64 16 4
(y2) (2) D 6 A 2 B -1 C 2 9 36 4 1 4
(y3) (3) B 0 C 3 D 7 A 1 11 0 9 49 1
(y4) (4) C 4 B 1 A 3 D 8 14 16 1 9 64
Total 10 12 13 9 44 52 78 75 73
: There is no significant difference between rows, columns and treatments.
: There is significant difference between rows, columns and treatments.
Step 1 : N = 16
Step 2 : T = 44
2
T 2
Step 3 : C.F = = (44) = 121
N 16
2
2 2 2 2 T
Step 4 : TSS = X 1 X 2 X 3 X 4
N
= 52 + 78 + 75 + 73 - 121 = 157
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
1 2 3 4
Step 5 : SSC =
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(10) 2 (12) 2 (13) 2 (9) 2
= 121 2.5
4 4 4 4
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
1 2 3 4
Step 6. SSR =
N N N N N
2 2 2 2
[ N 2 = number of elements in each row]
Sources of variance Sum of squares d.f. Mean square Variance ratio F test 1%
Between SSR = 3.5 3 1.17 1.08 9.78
Rows
Between columns SSC = 2.5 3 0.83 0.77 27.91
Variety SSK = 144.5 3 48.17 44.60 9.78
Error SSE = 6.5 6 1.08
Total TSS = 157 11
Step 8. Conclusion:
The F ratios for rows and columns are not significant at 1 % level while that for
varieties is very highly significant. The fact that there are no significant differences
between rows and columns. Show that the Latin square arrangement has not been
advantageous.
Step 8 . Conclusion :
Cal FR > Table FR
Cal FC < Table FC
Cal FT > Table FT
There is significant difference between treatments and rows. But there is no
significant difference between columns.
10. A farmer wishes to test the effect of 4 fertilizers A,B,C,D on the yield of wheat,
The fertilizers are used in a LSD and the results are tabulated here perform an
analysis of variance.
A18 C21 D25 B11
D22 B12 A15 C19
B15 A20 C23 D24
C22 D21 B10 A17
Solution.
Subtract 20 we get
A -2 C 1 D 5 B -9
D 2 B -8 A -5 C -1
B -5 A 0 C 3 D4
C 2 D 1 B -10 A -3
Total
-2 1 5 -9 -5 4 25 25 81
2 -8 -5 -1 -12 4 25 25 1
-5 0 3 4 2 25 9 9 16
2 1 -10 -3 -10 4 100 100 9
TOTAL -3 -6 -7 -9 -25 37 66 159 107
Step 4 : TSS = ∑
= 37 + 66 + 159 + 107 - 39.06 = 329.94
(∑ ) (∑ ) (∑ ) (∑ )
Step 5 : SSC =
( ) ( ) ( ) ( )
=
( )
=
(∑ ) (∑ ) (∑ ) (∑ )
Step 6 : SSR =
( ) ( ) ( ) ( )
=
( )
= =
To find SSK:
Arrange the elements in the order of treatment.
Total
A -2 -5 0 -3 -10
B -9 -8 -5 -10 -32
C 1 -1 3 2 5
D 5 2 4 1 12
( ) ( ) ( ) ( )
SSK =
= = = 284.19
SSE = TSS – SSC – SSR - SSK
= 329.94 – 4.69 – 29.19 - 284.19 = 11.87
Step 7 : ANOVA Table
Source of S. S d.f MSS Variance Table value
Variation Ratio 5% level
Between SSR k-1 = 3 MSR ( )
Rows = 29.19 = =
9.73
Between SSC k-1 = 3 MSC ( )
Columns = 4.69 =
Step 1 : N = 12
Step 2 : T = 0
( )
Step 3 : = ( )
12. The following data represent the number of units of production per day turned
out by 5 different workers using 4 different types of machine
Machine Type
A B C D
Workers 1 44 38 47 36
2 46 40 52 43
3 34 36 44 32
4 43 38 46 33
5 38 42 49 39
(1) Test whether the mean production is the same for the different machine types
(2) Test whether the 5 men differ with mean productivity.
Solution.
The code data is
Row X1 X2 X3 X4 Total X 2 X2 X2 X2
1 2 3 4
y1 4 -2 7 -4 5 16 4 49 16
y2 6 0 12 3 21 36 0 144 9
y3 -6 -4 4 -8 -14 36 16 16 64
y4 3 -2 6 -7 0 9 4 36 49
Y5 -2 2 9 -1 8 4 4 81 1
Total 5 -6 38 -17 20 101 28 326 139
: (i) the mean productivity is the same for four different machines and
: (ii) the 5 men do not differ with respect to mean productivity code the data
by subtracting 40 from each value.
Step 1 : N = 20
Step 2 : T = 20
2
T 2
Step 3 : C.F = = (20) = 20
N 20
2
2 2 2 2 T
Step 4 : TSS = X 1 X 2 X 3 X
4 N
= 101 + 28 + 326 + 139 - 20 = 574
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
1 2 3 4
Step 5 : SSC =
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(5) 2 (6) 2 (38) 2 (17) 2
= 20 338.8
5 5 5 5
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
1 2 3 4 5
Step 6. SSR =
N N N N N N
2 2 2 2 2
[ N = number of elements in each row]
2
(5) 2 ( 21)2 ( 14)2 (0)2 (8)2
= 20 161.5
4 4 4 4 4
SSE = TSS – SSC – SSR = 574 –338.8 – 161.5 = 73.7
Step 8 . Conclusion :
(i) Table FC (3, 12) at 5 % level = 3.49
Cal FC > Table FC . Reject H0 .
(ii) Table FR (4, 12) at 5 % level = 3.26
Cal FR > Table FR . Reject H0
The worker differs with respect to mean productivity.
13. The following is a Latin square of design when 4varieties of seeds are being
tested. Set up the analysis of variance table and state your conclusion. You can
carry out suitable change of origin and scale.
A 105 B 95 C 125 D 115
C 115 D 125 A 105 B 105
D 115 C 95 B 105 A 115
B 95 A 135 D 95 C 115
Solution.
Subtract 100 and then divided by 5 we get
A 1 B -1 C 5 D 3
C 3 D 5 A 1 B 1
D 3 C -1 B 1 A 3
B -1 A 7 D -1 C 3
Yn X1 X2 X3 X4 Total X 12 X 22 X 32 X 42
y1 1 -1 5 3 8 1 1 25 9
y2 3 5 1 1 10 9 25 1 1
y3 3 -1 1 3 6 9 1 1 9
y4 -1 7 -1 3 8 1 49 1 9
Total 6 10 6 10 32 20 76 28 28
Treatment 1 2 3 4 Total
A 1 1 3 7 12
B -1 1 1 -1 0
C 5 3 -1 3 10
D 3 5 3 -1 10
(12)2 (0)2 (10)2 (10)2
SSK = 64 22
4 4 4 4
SSE = TSS – SSC – SSR = 88 – 4 – 2 –22 = 60
Step 7 : ANOVA Table
Sources of Sum of d.f. Mean square Variance Table value
variance squares ratio at 5% level
Between SSR = 2 k –1 FR(6, 3)
MSR = SSR FR =
MSR
Rows =3 k 1 MSE = 8.94
= 0.67 = 14.9
Between SSC = 4 k–2 FC6, 3)
MSC = SSC FC =
MSC
columns =3 k 1 MSE = 8.94
= 1.33 = 7.52
Treatment SSK k–1=3 MSK FT (6, 3)
MSK = SSK FT =
= 22 k 1 MSE = 8.94
= 7.33 = 1.36
Error SSE (k -1)(k – 2) MSE =
= 60 =6 SSE
( k 1)(k 2)
= 10
Total TSS 15
= 88
Step 8. Conclusion:
Cal FR > Table FR
Cal FC < Table FC
Cal FT > Table FT
There is significant difference between treatments and rows. But there is no significant
difference between columns.
14. Compare and contrast the Latin square design with the randomized block
design.
Solution.
Solution.
step1 : N 20
step 2 :T 40
T 2 (40) 2
step 3 : 80
N 20
T2
step 4 :TSS X 1 X 2 X 3 X 4
2 2 2 2
N
38 147 119 68 80 292
X X X X
2 2 2 2
T2
step 5 : SSC
1 2 3 4
N1 N1 N1 N1 N
(6) 2 (11) 2 (23) 2
0 80 57.2
5 5 5
Y Y Y Y
2 2 2 2
T2
step 6 : SSR
1 2 3 4
N2 N2 N2 N2 N
8 2 182 (2) 2 8 2 8 2
80 50
4 4 4 4 4
SSE TSS SSC SSR
292 57.2 50 184.8
Step 7: ANOVA Table
Source of Sum of d.f Mean square Variance ratio Table value
variance squares at 5% level
Between SSR = r –1 SSR MSR FR (3,12)
rows 50 =5 – 1 MSR r 1 FR
MSE 8.74
=4 57.2 19.1
1.24
3 15.4
19.1
Between SSC = C-1 = SSC MSC FC (12,4)
column 57.2 4–1 MSC FC
C 1 MSE 3.26
=3
50 12.5
1 1.23
4 15.4
12.5
Total 292
16. The following is a Latin square of a design when 4 varieties of seed being tested.
Set up the analysis of variance table and state your conclusion. You can carry
out the suitable charge of origin and scale.
A 110 B 100 C 130 D 120
C 120 D 130 A 110 B 110
D 120 C 100 B 110 A 120
B 100 A 140 D 100 C 120
Solution.
Subtract by 5 we get
A 105 B 95 C 125 D 115
C 115 D 125 A 105 B 105
D 115 C 95 B 105 A 115
B 95 A 135 D 95 C 115
N
20 76 28 28 64 88
step 5 : SSC
X X X X
1
2
2
2
3
2
4
2
T2
N1 N1 N1 N1 N
(6) 2 (10) 2 (6) 2 (10) 2
64
4 4 4 4
9 25 9 25 64 4
Y Y Y Y
2 2 2 2
T2
step 6 : SSR
1 2 3 4
N2 N2 N2 N2 N
8 2 10 2 (6) 2 8 2
64 16 25 9 16 64 2
4 4 4 4
To find SSK :
Arrange the elementsin the order of treatment.
A 1 1 3 7 12
B -1 1 1 -1 0
C 5 3 -1 3 10
D 3 5 3 -1 10
2 2 2 2 2
(12) 0 (10) (10) T
SSK
4 4 4 4 N
36 0 25 25 64 22
SSE TSS SSC SSR SSK
88 4 2 22 60
Step 7: ANOVA Table
Source of Sum d.f Mean square Variance Table value
variance of ratio at 5% level
square
SSR MSE FR (6 , 3)
Between SSR k–1 MSR FR
k 1 MSR 8.94
rows =2 =3
0.67 10
0.67
14.9
SSC MSE FC (6 , 3)
Between SSC k–1 MSC FC
k 1 MSC 8.94
columns =4 =3
1.33 10
1.33
7.52
MSK MSE FT (6 , 3)
Between SSK k–1 FT
MSK MSK 8.94
Treatments = 22 =3
K 1 10
7.33 7.33
1.36
MSE
Residual SSE = (k-1) SSE
60 (k–2)
(K - 1)(K - 2)
=6
10
Total 88 15
X1 X2 X3 X4 Total X 12 X 22 X 32 X 24
Y1 2 1 3 2 8 4 1 9 4
Y2 4 3 2 5 14 16 9 4 25
Y3
0 -1 0 1 0 0 1 0 1
Y4 2 3 1 2 8 4 9 1 4
Total 8 6 6 10 30 24 20 14 34
Step 2. T = 30
T 2 (30) 2
Step 3. 56.25
N 16
2 2 2 T2
Step 4. TSS = X1 X 2 X 3 X 2
4 N
= 24 + 20 + 14 + 34 – 56.25 = 35.75
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
Step 5. SSC = 1 2 3 4
N N N N N
1 1 1 1
[ N1 = number of elements in each column]
64 36 36 100
= 56.25 2.75
4 4 4 4
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
Step 6. SSR = 1 2 3 4
N N N N N
2 2 2 2
[ N = number of elements in each row]
2
64 196 0 64
= 56.25 24.75
4 4 4 4
To find SSK :
Arrange the elements in the order of treatment
Total
P 0 1 2 2 5
Q 4 -1 2 2 6
R 2 3 1 1 9
S 2 3 5 5 10
= 0.67
Total TSS n2- 1
= 35.75 = 15
Step 8 : Conclusion :
(i) Cal F (FT ) < Table F . There is no significant difference between
treatments
(ii) Cal F (FR ) > Table F . There is significant difference between rows
(iii) Cal F (FC ) < Table F . There is no significant difference between columns.
18. A company wants to procedure cars for its own use. It has to select the make of
the car out of the four makes A, B, C, D available in the market. For this he tries
four cars of each make by assigning the cars to four drivers to run on four
different routes. The efficiency of cars is measured in terms of time in hours. The
layout and time consumed is as given below.
Drivers
Route 1 2 3 4
Step 1 : N = 16
Step 2. T = -64
T 2 (64) 2
Step 3. C.F. = 256
N 16
2 2 2 T2
Step 4. TSS = X 1 X 2 X 3 X 2
4 N
= 196 + 150 + 194 + 686 – 256 = 970
( X )2 ( X )2 ( X )2 ( X )2 T 2
Step 5. SSC = 1 2 3 4
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(8)2 (20)2 (14)2 (38)2
= 256 = 270
4 4 4 4
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
1 2 3 4
Step 6. SSR =
N N N N N
2 2 2 2
[ N = number of elements in each row]
2
( 34) 2 ( 21)2 ( 25)2 ( 26)2
= 256 468.5
4 4 4 4
Step 7 : Conclusion :
Cal FC < Table FC . So we accept H0 .
Cal FR > Table FR . So we reject H0
19. A Farmer wishes to test the effects of 4 different fertilizers A, B, C and D on the
yield of wheat. In order to eliminate source of error due to variability in soil
fertility, he uses the fertilizers in a Latin square arrangement as indicated with
following table, where the numbers indicated yields in bushels in unit area.
A C D B
18 21 25 11
D B A C
22 12 15 19
B A C D
15 20 23 24
C D B A
22 21 10 17
Solution. Here
SST =329.94, SSC =4.69, SSR =29.19, SSK = 284.19, SSE = 11.87
Table value ( ) ( )
is accepted in and . is accepted in .
20. Consider the results given in the following table for an experiment involving six
treatments in four randomized blocks. The treatments are indicated by numbers
within parenthesis.
Blocks Yield for a randomized block experiment treatment and
yield
1 (1) (3) (2) (4) (5) (6)
24.7 27.7 20.6 16.2 16.2 24.9
2 (3) (2) (1) (4) (6) (5)
22.7 28.8 27.3 15.0 22.5 17.0
3 (6) (4) (1) (3) (2) (5)
26.3 19.6 38.5 36.8 39.5 15.4
4 (5) (2) (1) (4) (3) (6)
17.7 31.0 28.5 14.1 34.9 22.6
Test whether the treatments differ significantly. ( F0.05 (3,15) 5.42 ; F0.05 (5,15) 4.5)
Solution.
H 0 : There is no significant difference between blocks and treatments.
H1 : There is significant difference between blocks and treatments
Step 1 : N = 24
Step 2. T = 108.5
2 2
T (108.5)
Step 3. C.F. = 490.5
N 24
2 2 2 2 T2
X1 X 2 X 3 X 4
Step 4. TSS = N
= 134.63 + 178.27 + 1065.75 + 462.37 – 490.5 = 1350.52
( X )2 ( X )2 ( X )2 ( X )2 T 2
Step 5. SSC = 1 2 3 4
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
(10.3)2 (13.3)2 (56.1)2 (28.8)2
= 490.5 = 219.44
6 6 6 6
( Y )2 ( Y )2 ( Y )2 ( Y )2 ( Y )2 ( Y )2 T 2
Step 6. SSR = 1 2 3 4 5 6
N N N N N N N
2 2 2 2 2 2
[ N = number of elements in each row]
2
(39)2 (39.9)2 ( 42.1)2 ( 15.1)2 ( 13.7)2 (16.3)2
490.5
6 6 6 6 6 6
901.2
MSE =
Residual SSE N – C- SSE
=229.9 R+1 N - C - R 1
= 24 – 4 -6 229.9
+1 15 15.33
= 15
Step 7 : Conclusion :
Cal FC < Table FC . So we accept H0 .
Cal FR < Table FR . So we reject H 0
21. Find out the main effects and interactions in the following 2 2factorial experiment
and write down the ANOVA table.
I A b ab
Block 00 10 01 11
I 64 25 30 6
II 75 14 50 33
III 76 12 41 17
IV 75 33 25 10
Solution.
Taking deviation from y = 37 we get
Treatment Blocks
combination I II III IV Total X 12 X 22 X 32 X 42
X1 X2 X3 X4
(y1) (1) 27 38 39 38 142 729 1444 1521 1444
(y2) a -12 -23 -25 -4 -64 144 529 625 15
(y3) b -7 13 4 -12 -2 49 159 16 144
(y4) ab -31 -4 -20 -27 -82 961 16 400 729
Total -23 24 -2 -5 -6 1883 2158 2562 2333
Step 1 : N = 16
Step 2 : T = - 6
2
T 36
Step 3 : C.F = N = 16 = 2.25
2
2 2 2 2 T
X1 X 2 X 3 X
4 N
Step 4 : TSS =
= 1883 + 2158 + 2562 + 2333 + 2.25 = 8933.75
( X ) 2 ( X ) 2 ( X ) 2 ( X ) 2 T 2
1 2 3 4
Step 5 : SSC =
N N N N N
1 1 1 1
[ N = number of elements in each column]
1
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
1 2 3 4
Step 6. SSR =
N N N N N
2 2 2 2
[ N = number of elements in each row]
2
For 22 experiment
Contrast A = [a + ab – b-(1)] = - 64 – 82 + 2 -142 = -286
Contrast B = [b + ab – a-(1)] = - 2 – 82 + 64 -142 = -162
Contrast AB = [ab +(1) – a - b] = - 82+142 + 64 + 2 = 126
1
Main effect A = [a + ab – b – (1)] = -143
2
1
B = [b + ab – a – (1)] = -81
2
1
AB = [ab + (1) - a – b] = 63
2
[a ab b (1)]2 (286) 2
5112.25
SSA = 16 = 16
[b ab a (1)]2 (162) 2
1640.25
SSB = 16 = 16
[ab (1) a b]2 (126) 2
992.25
SSAB = 16 = 16
Error (d.f) = N – c – r +1 = 16 – 4 - 4 + 1 = 9
Cal FA > Table FA
Cal FB > Table FB
Cal FAB > Table FAB.
22. Given
Detergent Engine
1 2 3
A 45 43 51
B 47 46 52
C 48 50 55
D 42 37 49
Perform ANOVA and test at 0.05 level of significance whether these are
differences in the detergents or in the engines.
Solution.
Detergent Engine
1 2 3 Total
A 45 43 51 139
B 47 46 52 145
C 48 50 55 153
D 42 37 49 128
Total 182 176 207 565
The above data are classified according to criteria (i) Detergent (ii) Engine.
In order to simplify calculations, we code the data by subtracting 50 from each
figure.
Detergent Engine
(X1 ) (X2) (X3) Total 2 2 2
X X X
1 2 3
A(Y1) -5 -7 1 -11 25 49 1
B(Y2) -3 -4 2 -5 9 16 4
C(Y3) -2 0 5 3 4 0 25
D(Y4) -8 -13 -1 -22 64 1691 1
Total -18 -24 7 -35 102 234 31
Step 2. T = -35
2 2
T (35)
Step 3. 102.08
N 12
2
2 2 2 T
Step 4. TSS = X 1 X 2 X 3
N
= (102) + (234) + (31) –(102.08)
= 264.92
( X ) 2 ( X ) 2 ( X ) 2 T 2
1 2 3
Step 5. SSC =
N N N N
1 1 1
[ N = number of elements in each column]
1
( Y ) 2 ( Y ) 2 ( Y ) 2 ( Y ) 2 T 2
1 2 3 4
Step 6. SSR =
N N N N N
2 2 2 2
[ N = number of elements in each row]
2
Step 8 . Conclusion :
Cal FC > Table FC . So we reject H
0
Cal FR> Table FR . So we reject H
0
23. Three varieties of coal were analysed by 4 chemists and the ash content is
tabulated here. Perform an analysis of variance.
Chemists
A B C D
Coal I 8 5 5 7
II 7 6 4 4
III 3 6 5 4
Solution.
N
64 122 97 66 81 341.3
88.7
X 2
X 2
X 2
X 2
T2
SSC
1 2 3 4
Step 5 :
N1 N1 N1 N1 N
324 289 196 225
341.31
3 3 3 3
108 96.33 65.33 75 341.3 3.36
Y 2
Y 2
Y 2
T2
Step 6 : SSR
1 2 3
N2 N2 N2 N
625 441 324
341.3
4 4 4
156.25 110.25 81 341.3 6.2
SSE TSS SSC SSR 88.7 3.36 6.2 79.14
SSE 79.14
Source of Sum of d.f. Mean square Variance Table
variance squares ratio value at
5% level
Between SSC C-1 SSC MSC FC (2,6)
columns = 3.36 = 3 –1 = MSC FC
C 1 MSE 5.14
2 1.68
3.36
2 13.19
1.68 0.1274
Total 88.7
Conclusion
Cal FR < Tab FR
Cal FC < Tab FC
In both the cases the calculated value is less than tabulated value Therefore null
hypothesis is accepted.
( ) ( ( ))
SSB = = =
( )
SSAB = =2
SSE = SST-SSA-SSB-SSAB=138-98-18-2=20
The ANOVA Table is
Source of Sum of Degree of Mean Square Variance Ratio
Variation Squares Freedom MS
SS
Factor A SSA=98 =98
Interaction SSAB=2
AB
Error SSE=20 ( )
( )
Total SST=138 =7
25. An experiment was planned the effect of sulphate of potash and superposphate
on the yield of Potatoes. All the combinations of two levels of superposphate
[ ( ) 5 cent ( ) ] and two levels of sulphate of potash
[ ( ) 5 cent ( ) ] were studied in a randomised block
Treatment Replications
Combinations
I II III IV
( ) 23 26 29 28
25 36 20 31
22 40 20 34
38 38 30 34
Use the coded data by subtracting 29 from each value.
Null Hypothesis There is no difference in the mean effects.
Alternative Hypothesis There is a difference in the mean effects.
n = number of replication = 4
N=4X4=16, T= 0, C.F =
A contrast = a ab-b-( )
B contrast = b ab-a-( )
AB contrast = ab ( )
( ) ( ( ))
SSA = =
( ) ( ( ))
SSB = = =
( )
SSAB =
SST=660
SSE = SST-SSA-SSB-SSAB=462
2. What is the condition for applying the fixed point iteration (successive
approximation) method to find the real root of the equation x =f(x)?
Solution.
Let x= r be a root of x = g(x). Let I be an interval combining the point x = r . If
g ' ( x) 1 for all x in I, the sequence of an approximation x0 , x1 ,...... x n will converge
to the root r, provided that the initial approximation x 0 is chosen in I.
the computations of the root by this method will be a slow process or may be
impossible. Hence the method should not be used in cases where the graph of the
function when it crosses the X-axis nearly horizontal.
( )
( ) ( ) .
f ( x)
( x) x
Here f ' ( x)
considered.
p 1
Let f(x)= x p N , f‟(x)= px
By Newton‟s Raphson rule, if xr is the r-th iterate,
f ( xr )
x r 1 x r
f ' ( xr )
xr N
p
xr p 1
= pxr
pxr x r N
p p
p 1
= pxr
9. What are the merits of Newton‟s method of iteration?
Solution.
Newton‟s method is successfully used to improve the result obtained by other
methods. It is applicable to the solution of equations involving algebraic functions as
well as transcendental functions.
18. Write sufficient condition for Guass -Seidal method to converge (or) Write
sufficient condition for Gauss -Jacobi method to converge?
Solution.
The process of iteration by Gauss-Seidal method will converge if in each equation of
the system , the absolute value of the largest coefficient is greater than the sum of the
absolute values of the remaining coefficients.But the coefficient of matrix should be
diagonally dominant.
19. State the merits and demerits of elimination methods and iterative methods for
solving a system of equations .
Solution.
Gauss elimination method has the advantage that it is finite and works in theory for
any non-singular set o equations.
Gauss-Seidal iteration method converges only for special system of equations. For
some systems, elimination is the only course available.
In general, the round off error is smaller in iteration method, iteration is a self-
correcting method. Any errors made at any step in the computation are corrected in
the subsequent iterations.
22. Why Gauss-Seidal method is a better method than Jacobi‟s iterative method?
Solution.
Since the current value of the unknowns at each stage of iteration are used in
proceeding to the next stage of iteration, the convergence in Gauss-Seidal method will
be more rapid than in Gauss-Jacobi method.
23. Find the inverse of the coefficient matrix by Gauss -Jordan elimination method.
3x –2y =10 ; 3x +4y =12
Solution.
5 2
The coefficient matrix A=
3 4
5 2 1 0
A, I =
3 4
0 1
1 2 / 5 1/ 5 0 R
= R2 1
3 4 0 1 5
1 2/5 1/ 5 0
= R2 R2 3R1
0 26 / 5 3 / 5 1
1 2/5 1/ 5 0
= R2 R2 5 / 26
0 1 3 / 26 5 / 26
1 0 2 / 13 1 / 13
= R1 R1 2 / 5R2
0 1 3 / 26 5 / 26
2 / 13 1 / 13 4 2
A 1 = = 1/26
3 / 26 5 / 26 3 5
1. Find a real root of the equation cosx = 3x-1 correct to 5 decimal places by fixed
point iteration method. ( )
Solution.
f(x)=cosx-3x+1=0
f(0)=cos(0)-3(0)+1=1-0+1=2=Positive
f(1)=cos(1)-3(1)+1=0.5403-3+1=-1.4597=Negative
Therefore root lies between 0 and 1.
The given equation may be written as
1
x (1 cos x) g ( x)
3
1
g ' ( x ) sin x
3
1
g ' ( x) sin x
3
g (0) 0 1
'
1
g ' (1) sin1 0.2804 1
3
Hence the iteration method may be applied.
Fixed point iteration formula
1
g xn xn (1 cos xn 1 ) ….(1)
3
Put n =1 in (1) and take x0=0.6
1 1
put n 1 in (1) x1 [1 cos x0 ] [1 cos(0.6)] 0.60845
3 3
1 1
put n 2 in (1) x2 [1 cos x1 ] [1 cos(0.60845)] 0.60684
3 3
1 1
put n 3 in (1) x3 [1 cos x2 ] [1 cos(0.60684)] 0.60715
3 3
1 1
put n 4 in (1) x4 [1 cos x3 ] [1 cos(0.60715)] 0.60709
3 3
1 1
put n 5 in (1) x5 [1 cos x4 ] [1 cos(0.60709)] 0.60710
3 3
1 1
put n 6 in (1) x6 [1 cos x5 ] [1 cos(0.60710)] 0.60710
3 3
Here x5=x6=0.60710
Hence the root is 0. 60710.
2. Find the positive root of 3x log10 x 6 using fixed point iteration method
Solution:
Let f(x)= 3x log10 x 6 0
3x log10 x 6
log x 6
x 10
3
f(0)=0-1-6=-7=Negative
f(1)=3-0-6=-3=Negative
f(2)=6-0.3010-6=-0.3010=Negative
f(3)=9-0.4771-6=2.5=Positive
Therefore root lies between 2 and 3.
The given equation may be written as
1
x 6 log10 x g ( x)
3
1 log e
g '( x) 10
3 x
g '( x) 1 in the interval 2 and 3
1
Formula for iteration is xn g xn 1 6 log10 xn1 ... 1
3
Xn-1 1 xn
g xn 1 = 6 log10 xn 1
3
x0 2 1 x1 2.1003
6 log10 2
3
x1 2.1003 1 x2 2.1074
6 log10 x1
3
x2 2.1074 1 x3 2.1079
6 log10 x2
3
x3 2.1079 1 x4 2.1080
6 log10 x3
3
x4 2.1080 1 x5 2.1080
6 log10 x4
3
Here x4 = x5 = 2.1080
Hence the approximate value of the root is 2.1080.
3. Find the real root of the equation x 3 x 2 100 0 using fixed point iteration.
Solution.
To find the root of the equation using fixed point iteration
Let f x x3 x 2 100 0
f 0 100 ve
f 1 1 1 100 98 ve
f 2 8 2 100 88 ve
f 3 27 9 100 64 ve
f 4 64 16 100 20 ve
f 5 125 100 ve
So there is a real root between 4 and 5.
The given equation can be written as
x 3 x 2 100 0
x 2 x 1 100 0
x 2 x 1 100
100 10
x2 x g x
x 1 x 1
To find g‟(x)
1
2 5
g ' x 10 3
3
x 1 2 x 1 2
5
g ' x 3
2
x 1
5 5 5
g ' 4 3
3
0.342 1
4 1 2 5 2
14.6200
5 5 5
g ' 5 3
3
0.4586 1
5 1 2 6 2
10.902
10 10 10 10
x2 g x1 g 4.3853 4.30918
x1 1 4.3853 1 5.3853 2.3206
10 10 10 10
x3 g x2 g 4.30918 4.3399
x2 1 4.30918 1 5.30918 2.30416
10 10 10
x4 g x3 g 4.3399 4.32746
x3 1 4.3399 1 5.3399
10 10 10
x5 g x4 g 4.32746 4.33251
x4 1 4.32746 1 5.32746
10 10 10
x6 g x5 g 4.33251 4.33046
x5 1 4.33251 1 5.33251
10 10 10
x7 g x6 g 4.33046 4.33129
x6 1 4.33046 1 5.33046
10 10 10
x8 g x7 g 4.33129 4.33096
x7 1 4.33129 1 5.33129
10 10 10
x9 g x8 g 4.33096 4.33109
x8 1 4.33096 1 5.33096
10 10 10
x10 g x9 g 4.33109 4.33104
x9 1 4.33109 1 5.33109
10 10 10
x11 g x10 g 4.33104 4.33105
x10 1 4.33104 1 5.33104
10 10 10
x12 g x11 g 4.33105 4.33105
x11 1 4.33105 1 5.33105
10 10 10
x13 g x12 g 4.33105 4.33105
x12 1 4.33105 1 5.33105
Here x11 x12 x13 4.33105 is root of given equation .
4. Find the positive real root of e x 3 x 0 using fixed point iteration method.
Solution.
Let f(x) = e 3 x 0
x
f(0)=1 (+ve)
f(1)= e – 3 (-ve)
The roots lie between 0 and 1.
The given equation may be written as
1
x e x g(x)
3
1
g ' (x) e x
3
1
g ' (x) e x
3
1
g ' (0) 1
3
1
g ' (1) e 1
3
In the interval (0,1) , we get g' (x) 1.
1
Iterative formula is x n g x n 1 e x n1
3
Put n = 1, 2, … until get accurate root
Choose x0=0.6
1 1 1 1
x1 e x 0 = e 0.6 = 0.6074, x 2 e x1 = e 0.6074 = 0.60119
3 3 3 3
1 1
x 3 e x 2 =0.6146, x 4 e x 3 =0.6163
3 3
1 1
x 5 e x 4 =0.6174, x 6 e x 5 =0.6180
3 3
1 1
x 7 e x 6 =0.6184, x 8 e x 7 =0.6187
3 3
1 x8 1
x 9 e =0.6188, x10 e x 9 =0.6189
3 3
1 1
x11 e x10 =0.6190, x12 e x11 =0.6190
3 3
Here x11 = x12 = 0.6190 correct to four decimal places.
= - 1.9359 -
0.01136
5.30
x 2 = 1.9338
Put n = 2 in (1)
( ) ( )
* +
( ) ( )
( ) ( )
( )
( ) ( )
0.000244
= 1.9338 -
5.287935
x 3 = 1.9338
Here, x 2 = x 3 = 1.9338
Hence the required root is 1.9338
( )
( )
( )
3(0.607108) cos(0.607108) 1
0.607108
3 sin(0.607108)
0.607108 (0.000006)
0.607102
Put n = 2 in (1)
f ( x2 )
x3 x2
f ( x2 )
( )
( )
( )
3(0.607102) cos(0.607102) 1
0.607102
3 sin(0.607102)
0.607102 (0.000004)
0.607102
Here x 2 x 3 0.607102
Therefore the root is 0.607102 corrected to six decimal places.
9. Solve the system by Gauss elimination method:
2 x 3 y z 5; 4 x 4 y 3z 3; 2 x 3 y 2 z 2
Solution.
2x+3y-z = 5
4x+4y-3z = 3
2x-3y+2z = 2
2 3 1 5
R3
~ 0 2 1 7 R3 3
0 2 1 1
2 3 1 5
~ 0 2 1 7 R3 R3 R2
0 0 2 6
2z 6 2 y z 7 2x 3y z 5
z3 2y z 7 2x 6 3 5
2y 3 7 2x 2
2y 4 x 1
y2
Hence x = 1, y = 2, z = 3.
1 3 3 16
[ A, B] 1 4 3 18
1 3 4 19
1 3 3 16
R2 R2 R1
0 1 0 2
0 0 1 3 R3 R3 R1
1 0 3 10
0 1 0 2 R1 R1 3R2
0 0 1 3
1 0 0 1
0 1 0 2 R1 R1 3R3
0 0 1 3
Hence x = 1, y = 2, z = 3.
1 1 1 9
~ 0 5 2 5 R3 5 R3 R2
0 0 12 60
12 12 0 48
R 12 R1 R3
~ 0 30 0 30 1
R 6 R2 R3
0 0 12 60 2
360 0 0 1080
~ 0 30 0 30 R1 30 R1 12 R2
0 0 12 60
360x 1080 30 y 30 12 z 60
1080 30 60
x 3 y 1 z 5
360 30 12
Therefore x = 3, y = 1, z = 5.
14. Find the first iterations values of x, y, z satisfying 28x +4y – z = 32, x + 3y +
10z = 24 and 2x + 17y +4z = 35 by Gauss – Seidel method.
Arranging the given equations as 1, 3, 2.
28x 4y z 32; 2x 17y 4z 35; x 3y 10z 24
Now it is diagonally dominant,
1 1 1
x 32 4y z , y 35 2x 4z , z 24 x 2y
28 17 10
Put y = 0, z = 0
First iteration
1 1
x 32 4y z 32 0 0 1.142
28 28
y 35 2x 4z 35 2 1.142 4 0 1.924
1 1
17 17
z 24 x 2y 24 1.142 2 1.924 1.901
1 1
10 10
15. Solve the following system of equation by Gauss-Seidel method (only two
iterations) 2 x 3 y 20 z 25; 20 x y 2 z 17;3 x 20 y z 18
Solution.
Interchanging the equation as 2, 3, 1
20x y 2z 17; 3x 20y z 8 , 2x 3y 20z 25;
Now it is diagonally dominant,
1 1 1
x (17 y 2z) , y ( 8 3x z), z (25 2x 3y),
20 20 20
First iteration:
1
x 1 (17 0 0) 0.85
20
1
y1 (8 3x z) 0.528
20
1 1
z 1 (25 2x 3y) 26.7 3(0.528) =1.086
20 20
Second iteration:
1
x 2 (17 0.528 2(1.086)) 0.985
20
1
y 2 ( 8 3(0.985) 1.086) 0.493
20
1
z 2 (25 2(0.985) 3( 0.493)) 1.078
20
0
25 1 2 1 25 1
AX(0)= 1 3 0 0 = 1 25 0.04 25 X (1) .
2 0 4 0 2 0.08
25 1 2 1 25.2 1
AX(1)= 1 3 0 0.04 = 1.12 25.2 0.0444 25.2 X ( 2) .(ie)
2 0 4 0.08 1.68 0.0667
1
X ( 2)
0.0444 .Repeating this , we get
0.0667
1 1 1
25.1778 0.0450 ,25.1826 0.0451,25.1821 0.0451 . Therefore The largest
0.06888 0.0685 0.0685
1
eigenvalue is 25.1821 and the corresponding eigen vector is 0.0451 .
0.0685
18. Find the largest eigen value and the corresponding eigen vector of
1 6 1
A 1 2 0 by Power method. Also find the least latent root and hence
0 0 3
find the third eigen value.
Solution.
1 6 1 1
Given A= 1 2 0 . Let the initial eigenvector be X1 0
0 0 3 0
1 6 1 1 1 1
AX1 1 2 0 0 1 1 1 1.X 2
0 0 3 0 0 0
1 6 1 1 7 1
AX 2 1 2 0 1 3 7 0.4286 7.X 3
0 0 3 0 0 0
1 6 1 1 3.5714 1
AX 3 1 2 0 0.4286 1.8572 3.5714 0.52 3.5714.X 3
0 0 3 0 0 0
3.9988 1
AX8 1.9996 3.9988 0.5 3.9988X9
0 0
4 1
AX9 2 4 0.5 4X10
0 0
4 1
AX10 2 4 0.5
0 0
1 2 3
19. Find the largest eigen value and eigen vector of 0 4 2 , by using Power
0 0 7
method.
1 2 3 1
Solution. Let A= 0 4 2 .Let the initial eigenvector be X 1 1
0 0 7 1
1 2 3 1 6 0.857
AX 1 0 4 2 1 = 2 7 0.285 7 X 2
'
7 1 7 1
3.913 0.561 3.929 0.560
A X 7 1.260 7 0.180 7 X 8 A X 8 1.280 7 0.182 7 X 9
' '
7 1 7 1
3.921 0.560 3.924 0.560
A X 9 1.280 7 0.182 7 X 10 A X 10 1.272 7 0.182
'
7 1 7 1
Hence the largest eigen value is 7 and the corresponding eigen vector is
0.560
0.182 .
1
6 3
Using Jacobi method, find the eigen values of A
20. 3 4
Solution.
cos sin
Let R
sin cos
a11 a 22 6 4 1
cot 2
2a12 2 3 3
cot 1 2 3
1 1 s 3
take 3 sin and cos
1 2 2 1 2 2
b11 a11 cos 2 a12 sin 2 a 22 sin 2 7
6
b 22 a11 a 22 b11 3
hence eigen values of B and A are 7 and 3.
7 0
here B D
0 3
3 1
cos 6 sin
6
2 2
Rotation matrix R
sin 3
cos 1
6 6 2 2
3 1
Theeigen vectors are X1 X 2
1 3
1 3
21. Using Jacobi method, find the eigen values of A
3 4
a a 22 1 4 1
Solution: cot 2 11
2a12 6 2
1 5
cot 1 2 1 / 2 1 1/ 4
2
5 1 1 2
take 0 sin
2 1 2 10 2 5
5 1
cos
1 2 10 2 5
5 3 5
b11 a11 cos 2 a12 sin 2 a 22 sin 2
2
53 5
b 22 a11 a 22 b11
2
5 3 5 53 5
hence eigen values are and
2 2
UNIT IV INTERPOLATION, NUMERICAL DIFFERENTIATION AND
NUMERICAL INTEGRATION 9+3
Lagrange‟s and Newton‟s divided difference interpolations – Newton‟s forward and
backward difference interpolation – Approximation of derivates using interpolation
polynomials – Numerical single and double integrations using Trapezoidal and Simpson‟s
1/3 rules.
y f x
x x1 x x 2 y x x 0 x x 2 y x x 0 x x1 y
x 0 x1 x 0 x 2 0 x1 x 0 x1 x 2 1 x 2 x 0 x 2 x1 2
x 1 x 2 0 x 0 x 2 1 x 0 x 1 2
0 1 0 2 1 0 1 2 2 0 2 1
x 2 2x x 2 x
2 2x x 2 x 2 x x
1 2
f x x
y f x
x x1 x x 2 y x x 0 x x 2 y x x 0 x x1 y
x 0 x1 x 0 x 2 0 x1 x 0 x1 x 2 1 x 2 x 0 x 2 x1 2
x 1 x 3 6 x 0 x 3 9 x 0 x 1 33
0 1 0 3 1 0 1 3 3 0 3 1
x 2 3x x 3 x 2 3x x2 x
6 9 33
3 4 12
9x 2 27x x x 11
2
2x 4x 6
2
4 4
8x 16x 24 9x 27x 11x 11x 12x 2 24
2 2 2
4 4
3x 6
2
Solution.
Given, x 0 1, x1 0, x 2 1, y 0 4, y1 2, y 2 2
By Lagrange‟s interpolation formula,
y f x
x x1 x x 2 y x x 0 x x 2 y x x 0 x x1 y
x 0 x1 x 0 x 2 0 x1 x 0 x1 x 2 1 x 2 x 0 x 2 x1 2
x 0 x 1 4 x 1 x 1 2 x 1 x 0 2
1 0 1 1 0 1 0 1 1 11 0
4x x 1 2 x 1 2x x 1
2
2x 2x 2x 2 x x x x 2
2 2 2 2
2 1 2
x 0 1 2
y 1 2 1
Solution.
The Given data are taken to be
x x0 x1 x2
0 1 2
y y0 y1 y2
1 2 1
x 2
x 2x 2
2 x x 2
x x 1
x 2 3x 2
2x2 4x x2 x
1
1 2 2 2 2
x 2 3x 2 4 x 2 8 x x 2 x 2 x 2 4 x 2
x2 2x 1
2 2
9. Find the second degree polynomial fitting the following data. (A\M 2007)
x 1 2 4
y 4 5 13
Solution.
By Lagrange‟s interpolation formula,
y f x
x x1 x x 2 y x x 0 x x 2 y x x 0 x x1 y
x 0 x1 x 0 x 2 0 x1 x 0 x1 x 2 1 x 2 x 0 x 2 x1 2
x 2 x 4 4 x 1 x 4 5 x 1 x 2 13
1 3 1 2 3 2
x 2 6x 8 x 2 5x 4 x 2 3x 2
4 4 13
2 2 6
8x 2 48x 64 15x 2 75x 60 13x 2 3x 26 6x 2 12x 30
1 1
6 6
f x x 2x 5
2
1 4 32 4
14
3 1 64 14
3 32 10 20 10
6 1 1
224 32 11 1
6 224 64 224 64
63 20
11 3
11 1344
1344 224
224
11 6
1
11. If f ( x) find f (a, b) and f (a, b, c) by using divided differences.
x2
Solution.
1 2 1 2
f (b) f (a)
f (a, b) b a
ba ba
f (a, b)
a b
2 2
a b (a b) (a b)
b a a b b a a 2b2
2 2
a 2b2
f b, c f a, b
f a, b, c
ca
ab bc ca
a 2 b 2c2
12. Form the divided difference table for following data.
x 0 1 2 3 4
y 7 10 13 22 43
Solution.
The divided difference table is
0 7
3
1 10 0
3 6
2 13 6 0
9 6
3 22 12
21
4 43
13. Construct the divided difference table for the following data.
x 4 5 7 10 11 13
(x) 48 100 294 900 1210 2028
Solution.
The divided difference table is
x f(x)=y 2 3 4
y y y y
4 48
100 48
52
54
5 100 97 52
15
74
294 100 21 15
97 1
75 10 4
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
13 11
13 2028
1
16. Find the second divided differences with arguments a, b, c if f ( x)
x
Solution.
1 1
If f (x) , f (a)
x a
1 1
f (a, b) b a 1 f (x , x ) f (x1 ) f (x 0 )
ba x1 x 0
0 1
ab
1 1
f (b, c) f (a, b)
f (a, b, c) bc ab
ca ca
1 c a 1
abc c a abc
18. Fit a polynomial from the following data using Newton‟s forward difference
interpolation formula.
x 0 2 4 6
y 2 4 14 32
Solution.
x x0 x 0 x
u
h 2 2
x y f x f x f x
1 2 3
0 2
2
2 4 8
10 0
4 14 8
18
6 32
Newton‟s forward difference interpolation formula is
u u 1 2
y x 0 uh y 0 uy 0 y 0 .......
2
x x
1 8 x x2
x
2 2
2 2
8 2 x
2 x x 2x x x 2
2 2
2 2 2
2 2
x 0 1 2 3
y -3 2 9 18
Solution.
x y ∆y ∆2y ∆3y
0 -3
5
1 2 2
7 0
2 9 2
9
3 18
v v 1 2 v v 1 v 2 3
1 v ....... y n
2! 3!
v v 1 2 v v 1 v 2 3 x xn
y n vy n yn y n ........, where v
2! 3! n
23. Write down the errors in Trapezoidal and Simpson‟s rules of numerical
integration.
Solution.
(b a)h 2
Error E M
Trapezoidal rule 12
Order h 2
(b a)h 4
Error E M
Simpson‟s rule 180
order h 4
25. Using trapezoidal rule, find the area under the curve passing through the
points (0, 0) , (1, 2) , (2 , 2.5) , (3, 2.3) , (4, 2) , (5, 1.7) and (6, 1.5).
Solution.
x 0 1 2 3 4 5 6
y 0 2 2.5 2.3 2 1.7 1.5
Area =∫ [( ) ( )]
= [ ( )]
= = 11.25
26. Compare Trapezoidal rule with Simpson‟s 1/3 rule.
Solution.
Trapezoidal rule Simpson‟s 1/3 rule
1. y is a liner function of x y is a polynomial of degree two
2. It is least accurate result. It is more accurate result.
x -1 0 2 3
y -8 3 1 2
( x 5 x 2 6 x) x 3 4 x 2 x 6 x 3 2 x 2 3x x 3 x 2 2 x
2 3 1 1 1
f ( x)
3 2 6 6
2 1 1 1 10 4 2 1 12 1 3 2 6
f ( x) x 3 x 2 x
3 2 6 6 3 2 6 6 3 2 6 6 2
7 3 31 2 14
f ( x) x x x3
6 6 3
7 x 31x 28 x 18
3 2
f ( x)
6
7(1) 31(1) 2 28(1) 18 7 31 28 18
3
f (1)
6 6
22 11
f (1)
6 3
2. Using Lagrange‟s interpolation, calculate the profit in the year 2000 from the
following data:
Year 1997 1999 2001 2002
Profit in Lakhs of Rs 43 65 159 248
Solution.
By
Year ( x) x0 x1 x2 x3
1997 1999 2001 2002
Profit in Lakhs of Rs (y) y0 y1 y2 y3
43 65 159 248
Lagrange‟s interpolation formula;
( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
( x x )( x x )( x x ) y0 ( x x )( x x )( x x ) y1
0 1 0 2 0 3
y f ( x)
1 0 1 2 1 3
( x x )( x x )( x x ) ( x x )( x x )( x x 2)
0 1 3
y2 0 1
y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
To find the profit in the year 2000, So put x =2000 in equation (1)
(2000 1999)(2000 2001)(2000 2002)
f (2000) 43
(2)(4)(5)
(2000 1997)(2000 2001)(2000 2002) (2000 1997)(2000 1999)(2000 2002)
65 159
(2)(2)(3) (4)(2)( 1)
3. Using Lagrange‟s interpolation formula find the value of y when x=10, if the
following values of x and y are given.
x 5 6 9 11
y 12 13 14 16
Solution: Given data are take
x x0 x1 x2 x3
5 6 9 11
y y0 y1 y2 y3
12 13 14 16
( x x0 )( x x1 ).........( x xn 1 )
...... yn
( xn x0 )( xn x1 ).......( xn xn 1 )
( x x )( x x )( x x ) ( x x )( x x )( x x 2)
0 1 3
y2 0 1
y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
(4)(1)(1) 13 7 4
(5)(1)(1) (5)(4)(1) (5)(4)(1)
(2) 15 12 15
13 35 16 6 13 35 16
2
3 3 3 3
f 10 14.66667
4. Find the expression of f (x ). using Lagrange‟s formula for the following data.
x 0 1 4 5
f(x) 4 3 24 39
Solution.
The given data are taken to be
x x0 x1 x2 x3
0 1 4 5
y y0 y1 y2 y3
4 3 24 39
The General Lagrange‟s interpolation formula is
( x x1 )( x x2 ).........( x xn ) ( x x0 )( x x2 ).........( x xn )
y f ( x) y0 y1
( x0 x1 )( x0 x2 ).......( x0 xn ) ( x1 x0 )( x1 x2 ).......( x1 xn )
( x x0 )( x x1 ).........( x xn 1 )
...... yn
( xn x0 )( xn x1 ).......( xn xn 1 )
By Lagrange‟s interpolation formula put n = 3 we get
( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
( x x )( x x )( x x ) y0 ( x x )( x x )( x x ) y1
0 1 0 2 0 3
y f ( x)
1 0 1 2 1 3
( x x0 )( x x1 )( x x3 ) y ( x x0 )( x x1 )( x x2 ) y
( x2 x0 )( x2 x1 )( x2 x3 ) 2 ( x3 x0 )( x3 x1 )( x3 x2 ) 3
( x 1)( x 4)( x 5) ( x 0)( x 4)( x 5) ( x 0)( x 1)( x 5) ( x 0)( x 1)( x 4)
4 3 24 39
(0 1)(0 4)(0 5) (1 0)(1 4)(1 5) (4 0)(4 1)(4 5) (5 0)(5 1)(5 4)
1
20
4 x3 40 x 2 11x 80 5 x3 45 x 2 100 x 4 10 x3 60 x 2 50 x 39 x3 195 x 2 156 x
1
4 x3 40 x 2 11x 80 5 x3 45 x 2 100 x 40 x3 240 x 2 200 x 39 x 3 195 x 2 156 x
20
1
40 x 2 60 x 80 2 x 2 3 x 4
20
f ( x) 2 x 2 3 x 4
x 0 1 2 3 4
y 1 3 9 - 81
Solution.
Here, x0 0, x1 1, x2 2, x3 4,
y0 1, y1 3, y2 9, y3 81
6. Obtain the interpolation quadratic polynomial for the given data by using
Newton‟s forward difference formula.
x 0 2 4 6
Solution.
y -3 5 21 45
x y 1 f x 2 f x 3 f x
0 -3
8
2 5 8
16 0
4 21 8
24
6 45
x x0 x 0 x
u
h 2 2
u u 1 2
y x 0 uh y 0 uy 0 y 0 .......
2!
x x
1 x
x 1 x 2
x
3 8
2
2 2
2!
8 2 2
3!
2
3 4x x
2 2
x 1 4
y x x 2 2x 3
7. From the following table of half –yearly premium for polices maturing at
different
ages; estimate the premium for polices maturing at age of 46.
Age x 45 50 55 60 65
Premium (y) 114.84 96.16 83.32 74.48 68.48
Solution.
Since 5 data‟s are given p(x) is of degree 4.To find y at x = 46 use forward interpolation
formula.
x y ∆y ∆2y ∆3y ∆4y
45 114.84
-18.68
50 96.16 5.84
-12.84 -1.84
55 83.32 4.00 0.68
-8.84 -1.16
60 74.48 2.84
-6
65 68.48
Freque
Wage (x) y 2 y 3 y 4 y
ncy (y)
Below 40 250
370-250 =120
u (u 1) 2 u (u 1)(u 2) 3
y f ( x0 nh) y0 uy0 y0 y0 ........
2! 3!
u (u 1)(u 2)(u 3).......(u (n 1)) n
....... y0
n!
u(u 1) 2 u(u 1)(u 2) 3 u(u 1)(u 2) u 3 4
y f ( x0 nh) y0 uy0 y0 y0 y0
2! 3! 4!
1.5(1.5 1)
250 1.5 120 2!
20
y f (70)
1.5(1.5 1)(1.5 2) 10 1.5(1.5 1)(1.5 2) 1.5 3 20
3! 4!
250 180 7.5 0.625 0.46875
423.5937
Number of persons whose weekly wages below 70 = 423.5937
Number of persons whose weekly wages below 60 = 370
10. The following data are data from the steam table:
Temp C 140 150 160 170 180
Pressure Kg f/cm 3.685 4.854 6.302 8.076 10.225
Using Newton‟s formula, find the pressure of the steam for a temperature 142.
Solution.
Difference table is
X Y y 2 y 3 y 4 y
(tem (pressu
p) re)
140 3.685 y0
4.854-3.685=1.169 2 y0
150 4.854 1.448-1.169=0.279
6.302-4.854=1.448 0.326-0.279=0.047
160 6.302 1.774-1.448=0.326 0.049-
0.047=0.002
8.076-6.302=1.774 0.375-0.326=0.049 4 y6
170 8.076 2.149-1.774=0.375 3 y6
10.225-8.076=2.149 2 y6
180 10.225 y6
x x0
Here u and x0 = 140, x = 142, y0 = 3.685, y0 =1.169, 2 y0 =0.279,
h
142 140 1
3 y0 0.047, 4 y0 0.002 u 0 .2
10 5
Newton‟s forward formula
u (u 1) 2 u (u 1)(u 2) 3
y f ( x0 nh) y0 uy0 y0 y0 ........
2! 3!
u (u 1)(u 2)(u 3).......(u (n 1)) n
....... y0
n!
Here the formula is
u (u 1) 2 u (u 1)(u 2) 3 u (u 1)(u 2) u 3 4
y f ( x0 nh) y0 u y0 y0 y0 y0
2! 3! 4!
0.2 0.2 0.8 0.2 0.8 1.8 0.2 0.8 1.8 2.8
f ( x) 3.685 1.169 0.279 0.047 0.002
1! 2! 3! 4!
11. From the following table of half –yearly premium for polices maturing at
different
ages; estimate the premium for polices maturing at age of 63.
Age x 45 50 55 60 65
Premium (y) 114.84 96.16 83.32 74.48 68.48
Since 5 data‟s are given p(x) is of degree 4.To find y at to find y at x=63 use
backward interpolation formula.
x y ∆y ∆2y ∆3y ∆4y
45 114.84
-18.68
50 96.16 5.84
-12.84 -1.84
55 83.32 4.00 0.68
-8.84 -1.16
60 74.48 2.84
-6
65 68.48
x 20 23 26 29
y 0.3420 0.3907 0.4384 0.4848
Solution.
x y 1 f x 2 f x 3 f x
20 0.3420
0.0487
23 0.3907 -0.001
0.0477 -0.0003
26 0.4384 -0.0013
0.0464
29 0.4848
f (410) 21.5512
14. Find y(2.25) using Newton‟s backward difference formula from the following
data.
Solution.
Newton‟s backward formula,
1 0.3679
-0.0814
1.25 0.2865 -0.018
-0.0634 -0.004
1.5 0.2231 -0.014 -0.001
-0.0493 -0.003
1.75 0.1738 -0.011
-0.0385
2 0.1353
v v 1 2 v v 1 v 2 3 v v 1 v 2 v 3 4
y x y 4 vy 4 y4 y4 y 4 ........
2! 3! 4!
x x4 x 2
v 4 x 2 here x 2.25
h 0.25
v 4 2.25 2 4 0.25 1
2 2 3 2 3 4
y 2.25 0.1353 1 0.0385 0.011 0.003 0.001
2 6 24
0.1353 0.0385 0.011 0.003 0.001 0.1058
15. From the following data, find at x=84. Also express in terms of x.
x 40 50 60 70 80 90
184 204 226 250 276 304
Solution.
Since six data are given, P(x) is of degree
Backward difference formula:
x xn 84 90
v 0.6
h 10
(x 84) (x n vh)
(90 (0.6)(10))
v(v 1) 2
n vn n ......
2
(0.6)(0.4)
304 (0.6)(28) (2) 286.96
2
(x 84) 286.96
u u 1 2 u u 1 3
0 u0 0 0 .......
2! 3!
u u 1 x 40
184 u(20) (2) where u
2 10
20 x 40 x 40 (x 50)
184
10 10 10
1
184 2x 80 (x 2 90x 2000)
100
0.01x 2 1.1x 124.
16. Determine f(x) as a polynomial in x for the following data, using Newton‟s
divided difference formula.
x -4 -1 0 2 5
f(x) 1245 33 5 9 1335
Solution.
Divided difference Table
x f(x) 1 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)
28 10 94
0 (1) 14
0 5
2 (28) 2 (4)
10
2 (1)
2 9 95 88 10 13 14 94
2 13 3
20 442 2 5 ( 1) 5 (4)
88
50
5 1335 1335 9
442
52
17. The following table gives same relation between steam pressure and
temperature. Find the pressure at temperature 372.1 0
191.0167.9
4
3780 3670 0.000024 y0
2.182
3780 191.0 0.0104 0.00000073
212.5 191.0
3870 3780 0.0000526
2.389
3870 212.5 0.0120
244.2 212.5
3990 3870
2.642
3990 244.2
x 3 7 9 10
f(x) 168 120 72 63
Solution.
We form the divided difference table since the intervals are unequal.
10 63 72
63 9
10 9
By Newton‟s divided difference interpolation formula,
f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 ) ( x x1 ) f ( x0 , x1 , x 2 )
( x x0 ) ( x x1 )( x x3 ) f ( x0 , x1 , x 2 , x3 ) ...
Solution.
We form the divided difference table. Since the intervals are unequal.
x f(x) 1 f x 2 f x 3 f x 4 f x
4 48 100 48
52
54
97 52
15
294 100 74
5 100 97 21 15
57 1
202 97 10 4
21 0
7 294 900 294 10 5
202 27 21
10 7 1
310 202 11 5
27 0
10 900 1210 900 11 7
310 33 27
11 10 1
409 310 13 7
11 1210 33
2028 1210 13 10
409
13 11
13 2028
20. Find the first, second and third derivatives of the function f(x) at x = 1.5
x 1.5 2.0 2.5 3.0 3.5 4.0
f(x) 3.375 7.0 13.625 24.0 38.875 59.0
Solution.
x y ∆y ∆2y ∆3y ∆4y
1.5 3.375 (y 0 )
3.625 ( y 0 )
2.0 7.0 3.0 ( 2 y 0)
6.625 0.75 ( 3 y 0)
2.5 13.625 3.75 0 ( 4 y 0)
10.375 0.75
3.0 24.0 4.5 0
14.875 0.75
3.5 38.875 5.25
20.125
4.0 59.0
dx x x0 h
At the po int x x 0
Newton 's forward formula :
dy 1 3 3 4
3 y 0 2 y 0 ......
dx x x 0 h
21. The table given below reveals the velocity v of a body during the time„t‟. Find its
Acceleration at t = 1.1
t : 1.0 1.1 1.2 1.3 1.4
v : 43.1 47.7 52.1 56.4 60.8
Solution.
t v(=y) ∆v ∆2v ∆3v ∆4v
1.0 43.1
4.6
1.1 47.7 (y 0 ) -0.2
4.4 ( y 0 ) 0.1
1.2 52.1 -0.1 ( 2
y 0) 0.1
4.3 0.2 ( 3 y 0)
1.3 56.4 -0.1
4.4
1.4 60.8
dv
Acceleration =
dt
Use Newton‟s forward difference formula,
dy 1 (2u 1) 2 (3u 2 6u 2) 3
y ' f '( x) yo yo yo ........
dx h 2! 3!
Here we consider x0 1.1, we find x 1.1
x x0
u 0
h
dy 1 1 1
y ' f '( x) 4.4 (0.1) (0.2)
dx 0.1 2 3
Acceleration when t = 1.1 is 44.917
3
22. Evaluate I x dx correct to three
4
decimals dividing the range of integration
3
1
into 6 equal parts using Trapezoidal , Simpson's rule .
3
Solution.
x -3 -2 -1 0 1 2 3
y 81 16 1 0 1 16 81
y0 y1 y2 y3 y4 y5 y6
Trapezoidal rule:
xn
h
x f (x)dx 3 [(y 0 y n ) 2(y1 y 2 y 3 ... y n1 )]
0
h
[(y 0 y 6 ) 2(y 1 y 2 y 3 y 4 y 5 )]
3
= 115
Simpson‟s one – third rule is
xn
h
x f ( x)dx 3 [( y0 yn ) 2( y2 y4 ) 4( y1 y3 y5 )]
0
h
[( y0 y6 ) 2( y2 y4 ) 4( y1 y3 y5 )]
3
= 98
1 1
sin(xy) 1 1
23. Evaluate I dxdy by using Simpson's rule by taking h = k .
0 0
1 xy 3 4
Solution.
By simpson‟s rule
I = 0.1524
1.4 2.4
dx dy
24. Evaluate
1 2
xy
by using Trapezoidal rule, verify your results by actual
integration.
Solution.
Divide the range of x and y into 4 equal parts
2.4 2 1.4 1 1
h 0.1 k 0.1 f ( x, y )
4 4 xy
By Trapezoidal rule,
hk
I= {sum of values of f at the four corners+2(sum of the values of f at the
4
remaining nodes on the boundary)+4(sum of the values of f at the interior nodes)}
1.4 2.4
dx dy
1 2
xy
0.0614
Actual Integration:
1.4 2.4 1.4 2.4
dx dy dy dx
1 2
xy
1
y
2
x
log y 1 log x 2
1.4 2.4
/2 /2
25. Evaluate sin x y dxdy by using Simpson‟s rule verify your results by
0 0
actual integration.
Solution.
Divide the range of x and y into 4 equal parts
h k f ( x, y ) sin( x y )
4
y/x 0 4 2
0 0 0.7071 1
0.7071 1 0.7071
4
0 0.7071 0
2
By Simpson‟s rule,
I = 2.0080
/2 /2 /2 /2
2
UNIT V NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL
EQUATIONS 9+3
Single step methods: Taylor‟s series method - Euler‟s method - Modified Euler‟s method -
Fourth order Runge-Kutta method for solving first order differential equations - Multi step
methods: Milne‟s and Adams - Bash forth predictor corrector methods for solving first order
differential equations.
( ) ( ) ( ) ( ) = 0.9003
5. Compare Taylor‟s method & Runge -Kutta methods?
Solution.
Runge-kutta methods do not require prior calculation of higher derivatives of y(x), as the
Taylor method does. Since the differential equations using in applications are often
complicated, the calculation of derivatives may be difficult.
Also the Runge-Kutta formulas involve the computation of f(x,y) at various
positions, instead of derivatives and this function occurs in the given equation.
Solution:
h2
T.E = y ''( xi h), 0 1
2!
9. Find y(0.2) for the equation given that y(0)=0 by using Euler‟s method.
Solution: Given: f(x,y)= h=0.2
y1 y0 hf ( x0 , y0 )
0 0.2 f (0, 0)
0.2[0 e 0 ] 0.2
i.e., y (0.2) 0.2
' yx
11. Given y with initial condition y 1 at x 0 , find y for x 0.1 by Euler‟s
x y
method.
Solution.
' yx
Given y f ( x, y ) , x 0 , y 1 , x 0.1 , y ? , h 0.1
x y 0 0 1 1
By Euler‟s algorithm,
y y h f (x , y )
1 0 0 0
= 1 + (0.1) f(0 , 1) = 1 + (0.1) 1 0 = 1.1
0 1
12. What are single step and multistep methods? Give an example.
Solution.
Single step : It is not possible to get any information about truncation error.
Example : 1. Taylor‟s series method 2. Modified Euler‟s method
Multi-step method : It is possible to get easily a good estimate of the truncation error.
Example : 1. Milne‟s predictor-corrector method 2. Adam‟s-Bashforth predictor-corrector
method.
16. Write Runge-Kutta algorithm second order for solving y ' f ( x, y), y( x0 ) y0
Solution.
Let „h‟ denote the interval between equidistant values of „x‟. If the intial values are
( x 0 , y 0 ), the first increment in „y‟ is computed from the formulas
k1 hf ( x 0 , y 0 )
( ) and , where
x1 x 0 h, y1 y 0 y
The increment is „y‟ in the second interval is computed in a similar using the same
three formulae.
17. State the third order R.K method algorithm to find the numerical solution of the
first order differential equation.
Solution.
To solve the differential equation y ' f ( x, y ) by the third order R.K method,we
have k1 hf ( x, y)
h k
k 2 hf ( x , y 1 )
2 2
k 3 hf ( x h, y 2k 2 k1 )
andy
1
k1 4k 2 k 3
6
dy
18. Write down the Runge -Kutta formula of fourth order f ( x, y ), y ( x 0 ) y 0
dx
Let „h‟ denote the interval between equidistant values of „x‟. If the intial values
are ( x 0 , y 0 ) , the first increment in „y‟ is computed from the formulas .
Solution.
k1 hf ( x 0 , y 0 )
h k
k 2 hf ( x0 , y 0 1 )
2 2
h k
k 3 hf ( x 0 , y0 2 )
2 2
k 4 hf ( x 0 h, y 0 k 3 ) &
1
k1 2k 2 2k 3 k 4
andy
6
Then x1 x 0 h, y1 y 0 y
19. Write Milne‟s Predictor corrector Formula
Solution.
Milne‟s predictor formula is
4h 14h5 5
yn 1 yn 3 (2 y 'n 2 y 'n 1 2 y 'n ) y (1 )
3 45
h h5 5
yn 1 yn 1 ( y 'n 1 4 y 'n y 'n 1 ) y ( 2 )
3 90
Where lies between and .
20. How many prior values are required to predict the next value in Milne‟s method?
Solution:
The error term is .
y n 1, p , y k
h
55 y ' k 59 y ' k 1 37 y ' k 2 9 y ' k 3
24
y n 1,C , y k
h
9 y ' K 1 19 y ' k 5 y ' k 1 y ' k 2
24
24. How many prior values are required to predict the next value in Adams – Bashforth
method?
Solution. Four prior values.
h h2 h3
Taylor‟s series expansion is y n 1 y n yn yn yn ...... .
1! 2! 3!
h h2 h3
For n 0 , y1 y 0 y 0 y 0 y0 ....... (1)
1! 2! 3!
At (x 0 ,y0 )
y x 2 y 1 y0 x 02 y0 1 y0 1
y(x) 2xy x 2 y y0 (x) 2x 0 y0 x 02 y0 y0 0
y(x) 2y 4xy x 2 y y
0 (x) 2y0 4x 0 y0 x 0 y0
2
y0 2
yiv (x) 6y 6xy x 2 y y0iv (x) 6y0 6x 0 y0 x 02 y
0 y0iv 6
Putting the values in (1), we get
(0.1) 2 (0.1)3 (0.1) 4
y(0.1) 1 (0.1)(1) (0) (2) ( 6) ... = 0.900305
2 6 24
2. Obtain the approximate value of y at x = 0.1 & 0.2 for the differential equation
dy
2 y 3e x , y(0) 0 by Taylor‟s Series method.
dx
Solution.
Given x 0 0, y 0 0, h 0.1 and y 2 y 3e x
h h2 h3
Taylor‟s series expansion is y n 1 y n yn yn yn ...... .
1! 2! 3!
To find y(0.1):
h h2 h3
For n 0 , y1 y 0 y 0 y 0 y0 ....... (1)
1! 2! 3!
At (x 0 ,y0 )
dy
y ' (x) 2y 3e x y 0' (x) 2y0 3ex0 y0 ' 3
dx
Differentiating y' (x) 2y 3ex successively three times and putting x = y = 0, we get
y '' (x) 2y ' 3e x y0'' (x) 2y'0 3ex0 y0 '' 9
y ''' (x) 2y '' 3ex y0''' (x) 2y0'' 3ex0 y0 ''' 21
y (x) 2y ''' 3e
iv x
y0iv (x) 2y0''' 3e x0 y 0 45
iv
( )
dy
3. Find the value of y(0.2) and y(0.4) from 1 2 xy, y (0) 0 by Taylor‟s series
dx
method.
Solution.
To find y1 = y(0.2) by Taylor‟s method:
Given x 0 0, y0 0, h 0.2 and y 1 2xy
h h2 h3
Taylor‟s series expansion is y n 1 y n yn yn yn ...... .
1! 2! 3!
h h2 h3
For n 0 , y1 y0 y0 y0 y0 ....... (1)
1 ! 2 ! 3 !
h h2 h3
For n 1 , y2 y1 y1 y1 y1 ....... (2)
1 ! 2 ! 3 !
At (x 0 , y0 ) (0,0)
y 1 2xy y0 1 2x 0 y0 y'0 1
y'' 2(xy ' y) y0'' 2(x 0 y 0 y 0 ) y ''0 0
y''' 2(xy '' y ' y ') y0''' 2(x 0 y0 '' y0 ' y0 ') y '''0 4
dy
4. Using Euler‟s method, find y(0.2), y(0.4) and y(0.6) from x 2 y, y(0) 1 with h
dx
= 0.2
Solution.
Given Data is : x 0 0, y 0 1,h 0.2 and f(x,y) x 2 y
Euler‟s Formula is y n 1 y n h f(x n ,y n ), n 0,1,2,3,
Put n = 0 we get, y1 y0 h f(x0 ,y0 ) = 1+ 0.2 f(0,1) = 1 + 0.2(02 1) 1.2
Put n = 1 we get,
y2 y1 h f(x1 ,y1 ) = 1.2+ 0.2 f(0.2,1.2) = 1.2 + 0.2(0.22 1.2) 1.448
Put n = 2 we get,
y3 y2 h f(x 2 ,y2 ) = 1.448+ 0.2 f(0.4,1.448) = 1.448 + 0.2(0.42 1.448) 1.7696
dy
5. Using Euler‟s method, find y(0.2) , y(0.4) and y(0.6) from x y, y(0) 1 with
dx
.
Solution.
( )
By Euler algorithm,
( ) ( )[ ] ( )
( )
( ) ( )[ ] ( )[ ]
( )
dy
6 . Solve log10 ( x y ), y(0) 2 by Euler‟s method by choosing h = 0.2,
dx
find y(0.2) and y(0.4)
Solution.
Given Data is : x 0 0, y0 2,h 0.2 and f(x,y) log (x y)
10
Euler‟s Formula is y n 1 y n hf(x n , y n ), n 0,1,2,3,
Put n = 0 we get, y1 2.0 0.2log10 0 2 2.0602 y(0.2)
Put n = 1 we get, y2 2.0602 0.2log10 0.2 2.0602 2.1310 y(0.4)
( )
( )
dy
7. Solve sin x cos y, y(2.5) 0 by Modified Euler‟s method by choosing
dx
h = 0.5, find y(3.5).
Solution.
Given Data is : x 0 2.5, y0 0,h 0.5 and f(x,y) sin x cos y
h h
yn 1 yn h f x n , yn f (x n , yn )
2 2
0.5 0.5
Put n = 0 we get y1 y0 0.5 f (x 0 , y0 [f (x 0 , y0 )]
2 2
y1 0 0.5 f (2.5 0.25,0 0.25[ f (2.5,0)] 0.6354
y 2 y1 h f ( x1
0.5 0.5
Put n = 1 we get , y1 [ f ( x1, y1 )]
2 2
y1 0.6354 0.5 f (3 0.25,0.6354 0.25[f (3,0.6354)] 0.93155
dy
8. Solve (1 x ) y 2 , y(0) 1 by Modified Euler‟s method by choosing
dx
h = 0.1, find y (0.1) and y (0.2).
Solution.
y2
Given x 0 = 0 y0 1, h 0.1 and f(x,y) .
1 x
h h
Modified Euler‟s formula is yn 1 yn h f(xn , yn [f(xn , yn )]
2 2
0.1 0.1
Put n = 0 we get y1 y0 0.1 f ( x0 , y0 [ f ( x0 , y0 )]
2 2
0.1 0.1
y1 y (0.1) 1 0.1 f (0 ,1 [ f (0,1)] 0.91278
2 2
0.1 0.1
Put n = 1 we get y2 y (0.2) y1 0.1 f ( x1 , y1 [ f ( x1, y1 )] 0.84550
2 2
9. Consider the initial value problem +1 ( ) . Using the modified
[ ( )]
[ ( )]
= 0.5 + (0.2) * ( )+
Solution.
Given ( )
( )
* ( )+
* ( )+
( ) [ ( )]
( ) [ [ ]]
( ) [ ]
( )[ ]
( )( )
( )
[ ( )]
( ) [ ( )]
( ) [ [ ]]
( ) [ ]
( )[ ]
( )
* ( )+
( ) [ ( )]
( ) [ [ ]]
( ) [ ]
( )[ ]
( ) .
11. Evaluate y (1.2) and y (1.4) correct to three decimal places by the modified Euler
dy
method, given that ( y x 2 ) 3 ; y (1) 0 taking h=0.2 .
dx
Solution.
dy
( y x 2 ) 3 ; x 1 , y 0 , h 0.2 , x 1.2
dx 0 0 1
[ ( )]
[ ( )]
[ ( )]
( ) ( ) ( ( ))
( ) ( )
( )[( ) ( ) ]
( )[ ] ( )[ ]
.
13. Using Runge – Kutta method of fourth order to find y at x = 0.1, 0.2, 0.3 given
that y ' x y , y(0) 1.
2
Solution.
Given: x0 0, y0 1, h 0.1 and y ' x y 2
To find y1 y(0.1) :
R – K method (for n = 0) is: y1 y (0.1) y 0
1
k1 2k 2 2k 3 k 4 -------- (2)
6
k1 hf ( x0 , y 0 ) 0.1 f (0,1) = 0.1
h k
k 2 hf x0 , y0 1 0.11525
2 2
h k
k 3 hf x0 , y 0 2 0.116857
2 2
k 4 hf x0 h, y 0 k 3 0.1347
Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
1
y1 y (0.1) 1 0.1 2(0.11525 0.116857) 0.1347
6
= 1+0.11649=1.1165
Hence the required approximate value of y1 is 1.1169.
To find y 2 y(0.2) :
We have x1 0.1, y1 1.1165 and h 0.1
R – K method (for n = 2) is: y 2 y (0.2) y1 k1 2k 2 2k 3 k 4
1
-------- (3)
6
k1 hf ( x1 , y1 ) 0.1 f (0.1, 1.1165) = 0.1347
h k
k 2 hf x1 , y1 1 0.1552
2 2
h k
k 3 hf x1 , y1 2 = 0.1576
2 2
k 4 hf x1 h, y1 k 3 = 0.1823
Using the values of k1 , k 2 , k 3 and k 4 in (3), we get
1
y2 y (0.2) 1.1165 0.1347 2(0.1552) 2(0.1576) 0.1823
6
= 1.2736
Hence the required approximate value of y2 is 1.2736
To find y 3 y (0.3) :
We have x2 0.2, y2 1.2736 and h 0.1
R – K method (for n = 3) is: y 3 y (0.3) y 2
1
k1 2k 2 2k 3 k 4 -------- (4)
6
k1 hf ( x2 , y 2 ) = 0.1822
h k
k 2 hf x 2 , y 2 1 0.2224
2 2
h k
k 3 hf x 2 , y 2 2 = 0.2168
2 2
k 4 hf x 2 h, y 2 k 3 = 0.2521
Using the values of k1 , k 2 , k 3 and k 4 in (4), we get
1
y3 y (0.3) 1.2736 0.1822 2(0.2224) 2(0.2168) 0.2521
6
= 1.4924
Hence the required approximate value of y3 is 1.4924
14. Apply Runge – Kutta method, to find an approximate value of y when x = 0.2,
dy
0.4 given that x y, y(0) 1 .
dx
Solution.
Given: x0 0, y 0 1, h 0.2 and f ( x, y ) x y
Finding y1 y (0.2) :
1
R – K method (for n = 0) is: y1 y(0.2) y0 k1 2k2 2k3 k4 -------- (1)
6
k1 hf ( x0 , y 0 ) 0.2 [0 1] = 0.2 ;
h k 0.2 0.2
k 2 hf x0 , y0 1 0.2 0 1 = 0.2400
2 2 2 2
h k 0.2 0.24
k 3 hf x0 , y 0 2 0.2 0 1 = 0.2440
2 2 2 2
k 4 hf x0 h, y 0 k 3 0.2 0 0.2 1 0.2440 = 0.2888
Using the values of k1 , k 2 , k 3 and k 4 in (1), we get
1
y1 y (0.2) 1 0.2 2(0.24) 2(0.244) 0.2888 = 1.2428
6
Finding y2 y (0.4) :
1
R – K method (for n = 1) is: y2 y (0.4) y0 k1 2k2 2k3 k4 -------- (2)
6
k1 hf ( x1 , y1 ) hf (0.2, 1.2428) 0.2 [0.2 1.2428] 0.2886
h k 0.2 0.2886
k2 hf x1 , y1 1 0.2 f 0.2 ,1.2428
2 2 2 2
0.2 f [0.3, 1.3871] 0.2[0.3 1.3871] 0.3374
h k 0.2 0.3374
k3 hf x1 , y1 2 0.2 f 0.2 , 1.2428
2 2 2 2
0.2 f (0.3,1.4115) 0.2(0.3 1.4115) 0.3423
k4 hf x1 h, y1 k3 0.2 f 0.2 0.2 , 1.2428 0.3423
0.2 f [0.4,1.5851] 0.2[0.4 1.5851] 0.39702
Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
1
y2 y (0.4) 1.2428 0.2886 2(0.3374) 2(0.3423) 0.39702 1.5836
6
15. Using Runge – Kutta method, find the value of y when x = 0.2 with h = 0.1 given
dy
that 2 x y , y(0) 1 .
dx
Solution.
Given: x0 0, y0 1, h 0.1 and f ( x, y ) 2 x y
Finding y1 y (0.1) :
1
R – K method (for n = 0) is: y1 y (0.1) y0 k1 2k2 2k3 k4 -------- (1)
6
k1 hf ( x0 , y0 ) 0.1 [(2)(0) (1)] 0.1
h k 0.1 0.1
k2 hf x0 , y0 1 0.1 f , 1
2 2 2 2
0.1 f (0.05, 0.95) 0.1((2)(0.05) 0.95) 0.0850
h k 0.1 0.085
k3 hf x0 , y0 2 0.1 f , 1
2 2 2 2
0.1 f (0.05, 0.975) 0.1((2)(0.05) 0.9595) 0.0858
k4 hf x0 h, y0 k3 0.1 0.1, 1 0.0858 0.1 f (0.1, 0.9142)
0.1((2)(0.1) 0.9142) 0.0714
Using the values of k1 , k 2 , k 3 and k 4 in (1), we get
1
y1 y (0.1) 1 0.1 2(0.085) 2(0.0858) 0.0714 0.9145
6
1
R – K method (for n = 1) is: y2 y(0.2) y1 k1 2k2 2k3 k4 -------- (2)
6
k1 hf ( x1 , y1 ) 0.1 f (0.1, 0.9145) 0.1 [(2)(0.1) 0.9145)] 0.0715
h k 0.1 0.0715
k2 hf x1 , y1 1 0.1 f 0.1 , 0.9145
2 2 2 2
0.1 f (0.15, 0.8788) 0.1((2)(0.15) 0.8788) 0.0579
h k 0.1 0.0579
k3 hf x2 , y2 2 0.1 f 0.1 , 0.9145
2 2 2 2
0.1 f (0.15, 0.8856) 0.1((2)(0.15) 0.8856) 0.0586
k4 hf x1 h, y1 k3 0.1 0.1 0.1, 0.9145 0.0586 0.1 f (0.2, 0.8559)
0.1((2)(0.2) 0.8559) 0.0456
16. Use the Runge-Kutta forth order method to find the value of y when x 1 given that
dy y x
y 1 when x 0 and that
dx y x
Solution.
yx
y ' f ( x, y) , x 0 , y 1
yx 0 0
h=1
k h f (x , y ) 1
1 0 0
h k 1 3
k h f x , y 1 f , 0.25
2 0 2 0 2
2 2
h k 1 5 3 / 4 3
k h f x , y 2 f ,
3 0 2 0 2
2 4 7 / 4 7
1
y [ k 2k 2k k ] 0.4342
6 1 2 3 4
y = y y = 1+ 0.4342 = 1.4342.
1 0
17. Given y‟‟+ xy‟ + y =0, y(0)= 1, y‟(0)= 0, find the value of y(0.1) by using Runge -
Kutta method for fourth order .
Solution.
Given
''
y x y' y , y ( 0) 1
y ' 0 , y0 1
Setting
y ' z and y '' z '
By algorithm,
k1 h f1 ( x0 , y0 , z 0 ) h f1 (0,1,0) h (0) 0
l1 h f 2 ( x0 , y0 , z 0 ) h f 2 (0,1,0) h (0, 1) h
h k l
k 2 h f1 x0 , y0 1 , z 0 1
2 2 2
0.1 (0.1)
(0.1) f1 0 , 1 0 , 0 0.1 f1[ 0.05 , 1, 0.05 ]
2 2
(0.1) (0.05) 0.005
h k l
l 2 h f 2 x0 , y 0 1 , z 0 1
2 2 2
0.1 (0.1)
(0.1) f 2 0 , 1 0 , 0 0.1 f 2 [ 0.05 , 1, 0.05 ]
2 2
(0.1) [ (0.05)(0.05) 1 ] 0.0998
h k l
k 3 h f1 x0 , y 0 2 , z 0 2
2 2 2
0.1 (0.005) (0.0998)
(0.1) f1 0 , 1 , 0
2 2 2
0.1 f1[ 0.05 , 0.9975, 0.0499]
(0.1) (0.0499) 0.00499
h k l
l 3 h f 2 x0 , y 0 2 , z 0 2
2 2 2
0.1 f 2 [ 0.05 , 0.9975, 0.0499]
(0.1) [( 0.05)(0.0499) 0.9975] 0.0995
k 4 h f1 [ x0 h , y0 k , z 0 l ]
3 3
(0.1) f1 0.1 , 1 (0.00499) , 0 (0.0995)
0.1 f1[ 0.05 , 0.995, 0.0995]
(0.1) (0.0995) 0.00995
l 4 h f 2 [ x0 h , y 0 k , z 0 l ]
3 3
0.1 f 2 [ 0.1 , 0.995, 0.0995]
(0.1)[(0.1) (0.0995) 0.995] 0.0985
Now
1 1
y (k1 2k 2 2k 3 k 4 ) [0 2(0.005) 2(0.00499) (0.00995)]
6 6
0.00498
y1 y 0 y 1 0.00498 0.9950
dy
18. Given x y2 , y(0) 0 , y(0.2) = 0.02, y(0.4) = 0.0795 and y(0.6) = 0.1762.
dx
Compute y(1) using Milne‟s Method.
dy
Solution. x y 2 f ( x, y )
dx
To find y(0.8):
Given:
x0 0, y0 0 and f0 f ( x0 , y0 ) 0 ;
x1 0.2, y1 0.02 and f1 f ( x1, y1 ) 0.1996
x2 0.4, y2 0.0795 and f 2 f ( x2 , y2 ) 0.3937 ;
x3 0.6, y3 0.1762 and f3 f ( x3 , y3 ) 0.56895
To Find : y 4 y( x4 ) y(0.8)
Predictor Method
(P ) 4h
y
4
y(0.8) y0 2f1 f2 2f3 0 4(0.2) (2 0.1996) 0.3937 2 2 0.56895
3 3
= 0.30491
Now we compute f 4 f (0.8,0.30491) 0.7070
Corrector Method
y 4(C ) y (0.8) y 2
h
f 2 4 f 3 f 4 0.0795 0.2 0.3937 4 0.56895 0.7070
3 3
= 0.3046
Finding y(1.0)
Given:
x1 0.2, y1 0.02 and f1 f ( x1 , y1 ) 0.1996 ;
x2 0.4, y2 0.0795 and f 2 f ( x2 , y2 ) 0.3937
x3 0.6, y3 0.1762 and f 3 f ( x3 , y3 ) 0.56895;
x4 0.8, y4 0.3046 and f 4 f ( x4 , y4 ) 0.7072
To Find : y5 y ( x5 ) y (1.0)
Predictor Method
y 5( P ) y (1.0) y1
4h
2 f 2 f 3 2 f 4
3
0.02
4(0.2)
(2 0.3937) 0.56895 2 0.7072
3
= 0.45544
Now we compute f 5 f (1.0,0.45544) 0.7926
Corrector Method
y 5( C ) y (1.0) y 3
h
f 3 4 f 4 f 5 0.56895 0.2 0.56895 4 0.7072 0.7926
3 3
= 0.4556
dy 2 2
19. If =x +y , y(0)=1 find y(0.1) ,y(0.2) and y(0.3) by Taylor‟s series method.
dx
Hence find y(0.4) by Milne‟s Predictor – Corrector method.
Solution.
x0 0, y0 1, h 0.1 and y x 2 y 2
h h 2
y1 y0 y0 y0 ... ...
1! 2!
y x 2 y 2 y 0 1 y1 1.2454y 2 1.61001
y(x) 2x 2 yy y 0 2 y1 2.9685y 2 4.4347
y(x) 2+2 yy+yy y 0 8 y1 12.235y 2 18.2976
yiv (x) 2 yy yy 2 yy y 0 40y1 49.3802y 2 88.6933
iv iv iv
dy
20. Using Taylor‟s series method, solve xy y 2 , y(0) 1 at x = 0.1, 0.2, 0.3.
dx
Continue the solution at x=0.4 by Milne‟s Predictor – Corrector method.
Solution.
To find y1 = y(0.1) by Taylor‟s method:
Given x0 0, y0 1, h 0.1 and y xy y2
h h2 h3
Taylor‟s series expansion is y n 1 y n yn yn yn ...... .
1! 2! 3!
h h2 h3
For n 0 , y1 y0 y0 y0 y0 ....... (1)
1 ! 2 ! 3 !
h h2 h3
For n 1 , y2 y1
y1
y1 y1 ....... (2)
1 ! 2 ! 3 !
h h2 h3
For n 3 , y3 y 2 y2 y2 y2 ....... (3)
1 ! 2 ! 3 !
At (x 0 , y0 ) (0,1)
y xy y 2 y0' 1
y'' xy ' y 2yy ' y''0 3
y''' xy '' 2y ' 2yy '' 2(y ') 2 y0''' 10
dy y 2 x 2
21. If , y(0) 1 find y(0.2) ,y(0.4) and y(0.6) by Runge-Kutta method.
dx y 2 x 2
Hence find y(0.8) by Milne‟s Predictor – Corrector method.
Solution.
y2 x 2
Given: x 0 0, y 0 1, h 0.2 and f ( x, y)
y2 x 2
To find y1 y(0.2) :
R – K method (for n = 0) is: y1 y(0.2) y 0
1
k 1 2k 2 2k 3 k 4 -------- (2)
6
k 1 hf ( x 0 , y 0 ) 0.2 f (0,1) = 0.2
k
k 2 hf x 0 , y 0 1 0.2 f 0.1,1.1
h
= 0.19672
2 2
k
k 3 hf x 0 , y 0 2 0.2 f 0.1,1.0936 = 0.1967
h
2 2
k 4 hf x 0 h, y 0 k 3 0.2 f 0.2,1.1967 = 0.1891
Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
dy
22. Consider the initial value problem y x 2 , y(0) = 1
dx
a. Find y(0.1) and y(0.2) by R.K. Method of order 4
b. Find y(0.3) by Euler‟s method
c. Find y(0.4) by Milne‟s predictor-corrector method
Solution.
dy
Given y x2
dx
x0 0, y0 1, h 0.1, f x, y y x 2
To find y(0.1) = y1 by R-K method:
1
R – K method (for n = 0) is: y1 y(0.1) y 0 k1 2k 2 2k 3 k 4 -------- (2)
6
k1 hf (x0 , y0 ) (0.1)f (0,1) (0.1)(1 02 ) 0.1
h k
k 2 hf x 0 , y0 1 0.10475
2 2
h k
k 3 hf x 0 , y0 2 0.1049875
2 2
k 4 hf x 0 h, y0 k 3 0.10949875
Using the values of k1 , k 2 , k 3 and k 4 in (2), we get
1
y1 y(0.2) 1 (0.1 2(0.10475) 2(0.1049875) 0.10949875) 1 0.10483 1.10483
6
23.Given ( )
Given
( )
putting , we get
( ) ( )
( where )
( where )
( where )
putting the values in ( ) we get
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
and ( ) .
Here .
[ ] ( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
[ ( ) ( ) ( ) ( )]
[ ( ) ( ) ( ) ]
( )
( ) ( ) ( ) and ( ) .
Solution.
Given ( ) ( ) ,
( ) and ( ) .
and .
[ ] ( )
( )
( )
( )
( )
( )
( )
( )
[ ( ) ( ) ( ) ( )]
( )
( )
[ ( ) ( ) ( ) ]
( ) .