snm notes 7
snm notes 7
SYLLABUS
Course
Semester Programme Course Name L T P C
Code
STATISTICS AND
IV B.E. MECH 20MA4T1 3 1 0 4
NUMERICALMETHODS
Justify the concept of testing of hypothesis for small and large samples and
CO3 K5 1
interpret the results.
1
COURSE ASSESSMENT METHODS
DIRECT 1 Continuous Assessment Tests
2 Assignments and tutorials
3 End Semester Examinations
INDIRECT 1 Course Exit Survey
COURSE CONTENT
Single step methods : Taylor’s series method – Euler’s method – Modified Euler’s method – Fourth order
Runge-Kutta method for solving first order equations – Multi step methods : Milne’s predictor corrector
methods for solving first order equations.
THEORY 45 TUTORIAL 15 PRACTICAL 0 TOTAL 60
BOOK REFERENCES
Gerald. C. F. and Wheatley. P. O., "Applied Numerical Analysis", Pearson Education,Asia, 7th
1
Edition, New Delhi, 2006.
Grewal, B.S., and Grewal, J.S., "Numerical Methods in Engineering and Science", Khanna
2
Publishers, 9th Edition, New Delhi, 2010
3 Burden, R.L and Faires, J.D, “Numerical Analysis”, 9th Edition, Cengage Learning, 2016.
2
4 Vijay K. Rohatgi , EhsanesSaleh,”An Introduction to Probability and Statisics”, 2nd Edition,2009
OTHER REFERENCES
1 https://www.sobtell.com/blog/38-real-life-applications-of-numerical-analysis
https://www.scienceabc.com/eyeopeners/why-do-we-need-numerical-analysis-in-everyday-
2
life.html
3 https://leverageedu.com/blog/application-of-statistics/
3
UNIT-I
TESTING OF HYPOTHESIS
PART – A
TESTING OF HYPOTHESIS
Type II Error: The hypothesis is false but our test accepts it.
Decision
Accept 𝐻 Reject 𝐻
𝐻 True Correct decision Type I error
𝐻 False Type II error Correct decision
Solution:
Null hypothesis is based for analyzing the problem Null hypothesis is the hypothesis of no difference
and is denote by𝐻 .
Any hypothesis which is complementary to the null hypothesis is called an Alternative hypothesis,
denoted by 𝐻
7. A coin is tossed 400 times and it turns up head 216 times. Discuss whether the coin may be unbiased
one at 5% level of significance.
Solution:
Given 𝑛 = 400, 𝑃 =
1 1
𝑄 =1−𝑝=1− =
2 2
X=Number of success=216
(i) The parameter of interest is P.
(iv) 𝛼 = 0.05
(v) 𝑍=
( )
(vii) Computation:𝑍 = =
( )
5
(viii) Conclusion: |𝑍| = 1.6 < 1.96
So we accept 𝐻 at 5% level of significance.
Hence coin is unbiased.
8. A standard sample of 200 tins of coconut oil gave an average weight of 4.95Kgs. With a standard
deviation of 0.21 Kg.Do we accept that the net weight is 5 Kgs per tin at 5% level of significance?
Solution:
Given 𝑛 = 200, 𝑥̅ = 4.95 𝑘𝑔, 𝜎 = 0.21 𝑘𝑔, 𝜇 = 5 𝑘𝑔
(i) The parameter of interest is𝜇.
(ii) 𝐻 : 𝜇 = 5 𝑘𝑔𝑠 [The net weight is 5 kgs]
(iii) 𝐻 : 𝜇 ≠ 5 𝑘𝑔𝑠 [Two tailed test]
(iv) 𝛼 = 0.05
̅
(v) 𝑍=
√
t-DISTRIBUTION
9. Write down the formula of test statistic t to test the significance of difference between the means of
large samples.
Solution:
|𝑥 − 𝑥 |
𝑍=
+
E- Expected frequency
6
11. Write any two applications of 𝐂𝐡𝐢 − 𝐬𝐪𝐮𝐚𝐫𝐞 (𝝌𝟐 )⬚– test.
Solution:
(i) To test the goodness of fit
12. What are the conditions for the validity of 𝚿 𝟐 - test? OR State the conditions for applying 𝚿 𝟐 -
test.
Solution:
(i) The sample observations should be independent.
(ii) Constraints on the cell frequencies, if any, must be linear [e.g., ∑ 𝑂 = ∑ 𝐸 ]
(iii) N, the total frequency, should be at least 50.
(iv) No theoretical cell frequency should be less than 5.
𝑁(𝑎𝑑 − 𝑏𝑐)
𝜒 = , 𝑁 =𝑎+𝑏+𝑐+𝑑
(𝑎 + 𝑐)(𝑏 + 𝑑)(𝑎 + 𝑏)(𝑐 + 𝑑)
PART – B
7
If |𝑧| < 1.96, 𝐻 may be accepted at 5% level of significance.
If |𝑧| > 1.96, 𝐻 may be rejected at 5% level of significance.
If |𝑧| < 2.58, 𝐻 may be accepted at 1% level of significance.
If |𝑧| > 2.58, 𝐻 may be rejected at 1% level of significance.
v. Determine an appropriate test statistic.
vi. State the rejection for the statistic.
vii. Compute any necessary sample quantities, substitute these into the equation for the test statistic and
compute the value.
viii. Conclusion: Decide whether or not, 𝐻 should be rejected and report that in the problem context.
2. A sample of 900 members has a mean 3.4 cm and standard deviation 2.61 cm. Is the sample from a
large population of mean 3.25 cms and standard deviation of 2.61 cms? (Test at 5% level of
significance. The value of 𝒛 at 5% level is|𝒁∝ | < 1.96).
Solution:
Given 𝑛 = 900𝜇 = 3.25
𝑥̅ = 3.4 𝑐𝑚𝜎 = 2.61
𝑠 = 2.61
(i) The parameter is𝜇 .
(ii) Null hypothesis𝐻 : Assume that the sample has been drawn from the population with mean𝜇 = 3.25.
(iii) Alternative hypothesis 𝐻 : 𝜇 ≠ 3.25
(iv) Level of significance ∝= 0.05.
̅
(v) The test statistic is 𝑧 =
√
(vi) Reject if |𝑧| > 1.96 at 5% level of siginificance.
(vii) Computation:
𝑥̅ − 𝜇 3.4 − 3.25
𝑧= ⬚ = .
√
√
= 1.724
3. The means of two large samples of 1000 and 2000 members are 67.5 and 68.0 inches respectively. Can
the samples be regarded as drawn from the same populations of standard deviation 2.5 inches?
Solution:
Given sample sizes𝑛 = 1000, 𝑛 = 2000
𝑥̅ = 67.5, 𝑥̅ = 68.0
𝑠 = 𝜎 = 2.5 𝑠 = 𝜎 = 2.5
(i) The parameter is𝜇 &𝜇 .
(ii) Null hypothesis𝐻 : 𝜇 = 𝜇 (there is no significant difference).
(iii) Alternative hypothesis 𝐻 : 𝜇 ≠ 𝜇
(iv) Level of siginificance∝= 0.05.
8
̅ ̅
(v) The test statistic is 𝑧 =
|𝑧| = 5.16
(viii) Conclusion
Here |𝑧| = 5.16 > 1.96, so we reject the null hypothesis 𝐻 at 5% level of significance.
4. 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 superior to bulbs of company Q at 5% level of
significance?
Solution:
𝐻 :𝜇 = 𝜇 ,
L.O.S 𝛼 = = 0.05.
̅ ̅
Test statistics 𝑧 =
1300 − 1248
=
+
52
= = 4.1939
12.39879
9
Table value of z at 5% LOS is 1.675.
Since 4.19 > 1.645, 𝐻 is rejected and the bulbs of company A is superior to the bulbs of company B.
𝑥̅ − 𝑥̅
𝑧=
+
5. A mathematics test was given to 50 girls and 75 boys. The girls made an average grade of 76 with a
SD of 6, while boys made an average grade of 82 with a SD of 2. Test whether there is any significant
difference between the performance of boys and girls.
Solution: (AU N/D 2012, M/ J 2016)
No of cases Mean S.D
Sample I 50 76 6
Sample II 75 82 2
̅ ̅
(iv) The test statistic is 𝑧 =
(vi) Computation:
10
𝑥̅ − 𝑥̅ 76 − 82
𝑧= =
+ +
−6 6
= =−
0.88
+
= −6.82
|𝑧| = 6.82
(vii) Conclusion
Here |𝑧| = 6.82 > 1.96, so we reject the null hypothesis 𝐻 at 5% level of significance.
𝑥= = 24.6, 𝑦 = = 29.3
(𝑥 − 𝑥) = 21.2, (𝑦 − 𝑦) = 99.34
1
𝑠 = (𝑥 − 𝑥) + (𝑦 − 𝑦)
𝑛 +𝑛 −2
1
= [21.2 + 99.34] = 13.39
5+6−2
𝑠 = 3.66
(i) The parameter is𝜇 &𝜇 .
(ii) Null hypothesis𝐻 : 𝜇 = 𝜇 (there is no significant difference).
11
(iii) Alternative hypothesis 𝐻 : 𝜇 ≠ 𝜇
(iv) Level of significance ∝= 0.05.
(v) The test statistic is 𝑧 =
(vi) Reject if |𝑧| > 2.262 at 5% level of significance for 9 degrees of freedom
(vii) Computation:
𝑥−𝑦 24.6 − 29.3 −4.7
𝑧= = = = −2.1197
2.2172
𝑠 + 3.66 +
|𝑧| = 2.12
(viii) Conclusion
Here|𝑧| = 2.12 < 2.262, so we accept the null hypothesis 𝐻 at 5% level of significance
Hence there is no significant difference.
t-DISTRIBUTION( n<30 )
7. Test if the difference in the means is significant for the following data:
Sample I 76 68 70 43 94 68 33
Sample II 40 48 92 85 70 76 68 22
Solution:
Calculation for sample means and S.D.’s
𝑥 𝑥 − 𝑥̅ (𝑥 − 𝑥̅ ) 𝑦 𝑦−𝑦 (𝑦 − 𝑦)
76 11.4 129.96 40 -22.6 510.76
68 3.4 11.56 48 -14.6 213.16
70 5.4 29.16 92 29.4 864.36
43 -21.6 466.56 85 22.4 501.76
94 29.4 864.36 70 7.4 54.76
68 3.4 11.56 76 13.4 179.56
33 -31.6 998.56 68 5.4 29.16
22 -40.6 1648.36
452 2511.72 501 4001.88
Given 𝑛 = 7, 𝑛 = 8 (< 30 𝑠𝑜 𝑤𝑒 𝑢𝑠𝑒 𝑡 − 𝑡𝑒𝑠𝑡)
Mean 𝑥̅ = = 64.6 𝑦= = 62.6
(𝑥 − 𝑥̅ ) = 2511.72 (𝑦 − 𝑦) = 4001.88
12
∑(𝑥 − 𝑥̅ ) + ∑(𝑦 − 𝑦) 2511.72 + 4001.88
𝑠 = = = 501.04
𝑛 +𝑛 −2 7+8−2
𝑠 = 22.38
(i) The parameter is𝜇 &𝜇 .
(ii) Null hypothesis𝐻 : 𝜇 = 𝜇 (there is no significant difference in the variability in yields).
(iii) Alternative hypothesis 𝐻 : 𝜇 ≠ 𝜇
(iv) Level of significance ∝= 0.05. d.f= 7 + 8 − 2 = 13
̅ ̅
(v) The test statistic is 𝑡 =
8. Using the data given in the following table to test at 1% level significance whether a person’s ability in
Mathematics is independent of his/her interest in Statistics.
Ability in
Mathematics
Low Average High
Interest in Low 63 42 15
Statistics
Average 58 61 31
High 14 47 29
Solution:
Table of expected frequencies.
Low Average High Total
13
Low 63 42 15 120
Average 58 61 31 150
High 14 47 29 90
Total 135 150 75 360
135 × 90 150 × 90 75 × 90 90
360 360 360
= 33.75 = 37.5 = 18.75
Calculated Ψ
63 45 324 7.5
42 50 64 1.28
15 25 100 4.00
14
31 31.25 0.0625 0.002
32.142
(𝑶 𝑬)𝟐
Now Ψ = ∑ = 𝟑𝟐. 𝟏𝟒𝟐
𝑬
Ψ = 32.14
9. Fit a binomial distribution for the following data and also test the goodness of fit.
X: 0 1 2 3 4 5 6 Total
F(X): 5 18 28 12 7 6 4 80
Solution:
Given n=2
(i) The parameter is 𝜒
(ii) 𝐻 :Binomial is good fit
(iii) 𝐻 :Binomial is not a good fit
(iv) Level of significance ∝= 0.0
( )
(v) The test statistic is 𝜒 = ∑
5 11 3.27
18 11 4.46
28 11 26.27
12 11 0.99
7 11 1.46
6 11 2.27
4 11 4.46
(𝑂 − 𝐸)
𝜒 = = 6.17
𝐸
𝑛=2
𝜒 .
= 5.98
if𝜒 > 𝜒 .
Reject 𝐻
10. Theory predicts that the proportion of beans in four groups A, B, C, D should be 9:3:3:1. In an
experiment among 1600 beans, the numbers in the four groups were 882, 313, 287 and 118. Does the
experiment support the theory?
Solution:
Total
(𝑂 − 𝐸)
𝜒 = ⬚
𝐸
18 13 13 18
= + + + = 4.73
900 300 300 100
16
𝐸 = 𝑂 , 𝑑. 𝑓 = 4 − 1 = 3
𝐶𝑎𝑙 𝜒 = 4.73
Table 𝜒 3 d.f=7.82
So we accept 𝐻
F-TEST
11. 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 (gms)
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 𝑛 = 10, 𝑛 = 8
𝑥 𝑥 𝑥 𝑥
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
17
∑𝑥 64 ∑𝑥 40
𝑥̅ = = = 6.4 𝑥̅ = = =5
𝑛 10 𝑛 8
∑𝑥 512
𝑆 = − (𝑥 ) = − (6.4) = 10.24
𝑛 10
∑𝑥 282
𝑆 = − (𝑥 ) = − 25 = 10.25
𝑛 8
𝑆 <𝑆
(i) The parameter is𝜎 &𝜎 .
(ii) Null hypothesis𝐻 : 𝜎 = 𝜎 (there is no significant difference).
(iii) Alternative hypothesis𝐻 : 𝜎 ≠𝜎
(iv) Level of significance ∝= 0.05. Degree of freedom(𝑣 ) = 9, 𝑑. 𝑓 (𝑣 ) = 7 𝑖𝑒. , 𝐹( , ) = 3.29
(v) Accept 𝐻 if calculated F <𝐹( , ) = 3.29 (from table ‘F’ )
.
(vi) Computation:The test statistic is 𝐹 = = = 1.0009
.
(vii) Conclusion
Here |𝐹| = 1.0009 < 3.29, so we accept the null hypothesis 𝐻 .
We conclude that the two samples have come from populations with equal variances.
12. Two independent samples of sizes 9 and 7 from a normal population had the following values of the
variables.
Sample I 18 13 12 15 12 14 16 14 15
Sample II 16 19 13 16 18 13 15
Do the estimates of the population variance differ significantly at 5% level ?
Solution:
Given 𝑛 = 9, 𝑛 = 7
𝑥 𝑥 𝑥 𝑥
18 324 16 256
13 169 19 361
12 144 13 169
15 225 16 256
12 144 18 324
14 196 13 169
16 256 15 225
14 196
15 225
129 1879 110 1760
18
∑𝑥 129 ∑𝑥 110
𝑥̅ = = = 14.3333𝑥̅ = = = 15.7143
𝑛 9 𝑛 7
∑𝑥 1879
𝑆 = − (𝑥 ) = − (14.3333) = 3.3342
𝑛 9
∑𝑥 1760
𝑆 = − (𝑥 ) = − (15.7143) = 4.4894
𝑛 7
𝑆 <𝑆
(i) The parameter is𝜎 &𝜎 .
.
(vi) Computation:The test statistic is 𝐹 = = = 1.3464
.
(vii) Conclusion
19
(𝑥 − 𝑥̅ ) 90
S = = = 10
𝑛 −1 9
(𝑥 − 𝑥̅ ) 108
S = = = 9.8181
𝑛 −1 11
S >S
𝑛 𝑠 +𝑛 𝑠 100 + 117.82
𝑆 = = = 10.9
𝑛 +𝑛 −2 10 + 12 − 2
(vi) Reject if |𝑡| > 2.086[from table ‘t’ we get t=2.086] at 5% level of significance.
(vii) Computation:
𝑥̅ − 𝑥̅ 1
𝑡= =
1.3472
𝑆 +
= 0.707
(viii) Conclusion
Here |𝑡| = 0.707 < 2.086, so we accept the null hypothesis 𝐻 at 5% level of significance.
Hence the difference is not significant.
20
Final conclusion: From the above two test, we can conclude that the two sample drawn from the
same normal population.
UNIT-II
DESIGN OF EXPERIMENTS
PART – A
Solution:
Analysis of variance (ANOVA) is a technique that will enable us to test for the significance of the
Solution:
There are three basic principles of experimental design. They are (i) Randomization, (ii) Replication,
Solution:
21
The main aim of the design of experiments is to control the extraneous variables and hence to
minimize the experimental error so that the result of the experiments could be attributed only to the
experimental variable.
Solution:
For the validity of the F-test in ANOVA, the following assumptions are made:
(ii) Parent population from which observations are taken in normal and
Solution :
(ii) Whether the effects of some fertiliserson the yields are significantly different,
(iii) Whether the mean qualities of outputs of various machines differ significantly etc. In fact this
technique finds application in nearly every type of experimental design in natural sciences as well
as in social sciences.
Solution:
22
One way Two way
1. We cannot test two sets of hypothesis 1. Two sets of hypothesis can be tested.
2. Data are classified according to one 2. Data are classified according to the
Solution:
In a completely randomized design the treatments are given to the experimental units
Solution:
(ii) It allows for complete flexibility. Any number of factor classes and replications may be used.
(iii) The statistical analysis is relatively simple, even if we do not have the same number of
replicates for each factor class or if the experimental errors are not the same from class to
(iv) The method of analysis remains when data are missing or rejected and the loss of
Solution:
A two-factor factorial design is an experimental design in which data is collected for all possible
In Latin square, the formula for degrees of freedom for residual (SSE) is d.f=(𝑛 − 1)(𝑛 − 2)
Substituting 𝑛 = 2, 𝑑. 𝑓 = 0
𝑀𝑆𝐸 = ∞
PART – B
1. The following table shows the lives in hours of four brands of electric lamps
Perform an analysis of variance test the homogeneity of the mean lives of the four
brands of lamps.
Solution:
𝑿𝟏 𝑿𝟐 𝑿𝟑 𝑿𝟒 Total 𝑿𝟏 𝟐 𝑿𝟐 𝟐 𝑿𝟑 𝟐 𝑿𝟒 𝟐
A B C D
24
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 64 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 -
Step 1: 𝑁 = 26
Step 2: T=98
𝑇 9604
= = 369.39
𝑁 26
= 1950.61
(∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + − 𝑁 →Number of elements in each column
= 452.25
Step 6: ANOVA
25
Source of Sum of squares Degree of Mean squares Variance- Table
5% level
∴ So we accept 𝐻
2. A set of data involving four “four tropical feed stuffs A, B, C, D” tried on 20 chicks is given
below. All the twenty chicks are treated alike in all respect expect the feeding treatments
Weight gain of baby chicks fed on different feeding materials composed of tropical feed
stuffs.
Total Ti
A 55 49 42 21 52 219
B 61 112 30 89 63 355
C 42 97 81 95 92 407
26
D 169 137 169 85 154 714
Solution :
Null hypothesis𝐻 :
Stuffs Treatments
𝑿𝟏 𝑿𝟐 𝑿𝟑 𝑿𝟒 𝑿𝟓 Total 𝑿𝟏 𝟐 𝑿𝟐 𝟐 𝑿𝟑 𝟐 𝑿𝟒 𝟐 𝑿𝟓 𝟐
Total 127 195 122 90 161 695(T) 14371 13623 15586 5612 12753
Step: 1
N=20.
Step: 2
T =695
Step: 3
𝑇 (695)
= = 24151.25
𝑁 20
Step: 4
= 37793.75
Step:5
27
(∑ ) (∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + + − ; 𝑁 →Number of elements in each column
= 1613.50
Step: 6
(∑ ) (∑ ) (∑ ) (∑ )
SSR= + + + − 𝑁 →Number of elements in each row
= 26234.95
= 9945.3
r+1)=12 828.775
Step: 8 Conclusion:
28
Cal 𝐹 > 𝑇𝑎𝑏𝑙𝑒 𝐹 so we reject 𝐻
A B C D
1 44 38 47 36
2 46 40 52 43
Workers 3 34 36 44 32
4 43 38 46 33
5 38 42 49 39
Solution:
Null hypothesis 𝐻 :
(i) The mean productivity is the same for four different machines
Workers 𝑋 𝑋 𝑋 𝑋 𝑋 𝑋 𝑋 𝑋
𝑌 4 -2 7 -4 5 16 4 49 16
𝑌 6 0 12 3 21 36 0 144 9
𝑌 -6 -4 4 -8 -14 36 16 16 64
𝑌 3 -2 6 -7 0 9 4 36 49
𝑌 -2 2 9 -1 8 4 4 81 1
Step: 1
N =20
Step: 2
T=20
29
Step: 3
Step: 4
= 574
(∑ ) (∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + + − 𝑁 →Number of elements in each column
= 338.8
(∑ ) (∑ ) (∑ ) (∑ )
SSR= + + + − 𝑁 →Number of elements in each row
= 6.25 + 110.25 + 49 + 16 − 20
= 161.5
= 73.7
ANOVA TABLE
5% level
.
= 6.142
Step: 8 Conclusion
∴ Mean productivity is not the same for the four different types of machines.
summer, winter and monsoon. The figures are given in the following table:
season Salesmen
A B C D
Summer 45 40 28 37
Winter 43 41 45 38
Monsoon 39 39 43 41
Solution:
31
Seasons Salesmen
𝑋 𝑋 𝑋 𝑋
𝑋 𝑋 𝑋 𝑋 Total
Summer -2 -3 15 6 16 4 9 225 36
Winter 0 2 -2 5 5 0 4 4 25
Monsoon 4 4 0 2 10 16 16 0 4
Total 2 3 13 13 31 20 29 229 65
Step 1: 𝑁 = 12
Step 2: T=31
( )
Step 3: = = 80
Step 4:
= 20 + 29 + 229 + 65 − 80
= 263
Step 5:
(∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + − 𝑁 →Number of elements in each column
= 37.6
Step 6:
(∑ ) (∑ ) (∑ )
SSR= + + − 𝑁 →Number of elements in each row
= 15.25
32
= 263 − 37.6 − 15.25 = 210.15
210.15
= = 35
6
Step 8: Conclusion:
∴ So we accept 𝐻
Column Row 1 2 3 4
Solution:
33
Null hypothesis 𝐻 : Four varieties are similar
Block Total of
Variety 1 2 3 4 varieties 𝑋 𝑋 𝑋 𝑋
(𝑋 ) (𝑋 ) (𝑋 ) (𝑋 )
Step 1: 𝑁 = 16
Step 2: T=236
( )
Step 3: = = 3481
Step 4:
= 157
Step 5:
(∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + − 𝑁 →Number of elements in each column
Step 6:
(∑ ) (∑ ) (∑ ) (∑ )
SSR= + + + − 𝑁 →Number of elements in each row
34
(54) (44) (61) (77)
= + + + − 3481
4 4 4 4
= 144.5
=9 𝑆𝑆𝐸
=
(𝐶 − 1)( 𝑅 − 1)
-
11
= = 1.22
9
Step 8: Conclusion:
∴ So we reject 𝐻
Hence four varieties are not similar. But the varieties are similar along block wise.
6. Analyze the variance in the Latin square of yields (in kgs) of paddy where P,Q,R,S
35
Q124 R123 P122 S125
Solution:
Null hypothesis 𝐻 : There is no significant difference between rows, between columns and
treatments.
Table I
(𝑋 ) (𝑋 ) (𝑋 ) (𝑋 ) Total 𝑋 𝑋 𝑋 𝑋
𝑌 2 1 3 2 8 4 1 9 4
𝑌 4 3 2 5 14 16 9 4 25
𝑌 0 -1 0 1 0 0 1 0 1
𝑌 2 3 1 2 8 4 9 1 4
Total 8 6 6 10 30 24 20 14 34
Step 1: 𝑁 = 16
Step 2: T=30
( )
Step 3: = = 56.25
Step 4:
= 24 + 20 + 14 + 34 − 56.25
= 35.75
Step 5:
(∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + − 𝑁 →Number of elements in each column
36
(8) (6) (6) (10)
= + + + − 56.25
4 4 4 4
= 2.75
Step 6:
(∑ ) (∑ ) (∑ ) (∑ )
SSR= + + + − 𝑁 →Number of elements in each row
= 24.75
P 0 1 2 2 5
Q 4 -1 1 2 6
R 2 3 3 1 9
S 2 3 0 5 10
= 4.25
Step 7: ANOVA
37
Between 𝑆𝑆𝑅 𝑛−1=3 𝑆𝑆𝑅 𝑀𝑆𝑅 8.25 𝐹 (3,6) = 4.76
𝑀𝑆𝑅 = 𝐹 = = = 12.369
𝑛−1 𝑀𝑆𝐸 0.667
Row = 24.75
= 8.25
Total 𝑇𝑆𝑆
= 35.75
Step 8: Conclusion:
7. The following is a Latin square design when 4 varieties of seeds are being tested. Set up
the analysis of variance table and state your conclusion. You may carry out suitable
B 95 A 135 D 95 C 115
38
Solution:
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
Table I
𝒀𝒏 (𝑋 ) (𝑋 ) (𝑋 ) (𝑋 ) Total 𝑋 𝑋 𝑋 𝑋
𝑌 1 -1 5 3 8 1 1 25 9
𝑌 3 5 1 1 10 9 25 1 1
𝑌 3 -1 1 3 6 9 1 1 9
𝑌 -1 7 -1 3 8 1 49 1 9
Total 6 10 6 10 32 20 76 28 28
Step 1: 𝑁 = 16
Step 2: T=32
( )
Step 3: = = 64
Step 4:
= 20 + 76 + 28 + 28 − 64
= 88
Step 5:
(∑ ) (∑ ) (∑ ) (∑ )
SSC= + + + − 𝑁 →Number of elements in each column
Step 6:
(∑ ) (∑ ) (∑ ) (∑ )
SSR= + + + − 𝑁 →Number of elements in each row
= 16 + 25 + 9 + 16 − 64
=2
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
= 36 + 0 + 25 + 25 − 64 = 22
= 88 − 4 − 2 − 22 = 60
Step 7: ANOVA
40
Between 𝑆𝑆𝑅 = 2 𝑛−1=3 𝑆𝑆𝑅 𝑀𝑆𝑅 𝐹 (6,3) = 8.94
𝑀𝑆𝑅 = = 0.67 𝐹 =
𝑛−1 𝑀𝑆𝐸
Row
10
= = 14.9
0.67
Total 𝑇𝑆𝑆 = 88 15
41
UNIT-III
PART – A
1. What is the order of convergence and the condition for convergence of fixed point
iteration method?
Sol:
Order of convergence: 1
method. (OR)
Write the convergence condition and order of convergence for Newton-Raphson method.
Solution:
f(x) = 𝒙𝟑 − 𝟐𝒙 + 𝟎. 𝟓
42
𝑓 ′ (𝑥) = 𝟑𝒙𝟐 − 𝟐
f(0) = 0.5(+𝑣𝑒)
Hence the roots lies between 0 and 1. Since the value of f(x) at x=0 is very close to zero than the
value of f(x) at x=1, we can say that the root is very close to 0. Therefore we can assume that 𝑥 = 0
Newton’s formula is
𝒇(𝒙𝒏 )
𝒙𝒏 𝟏 = 𝒙𝒏 −
𝒇′(𝒙𝒏 )
Putting n=0 in (1), we get the first approximation 𝑥 to the root, given by
( ) .
𝑥 = 𝑥 − =0−
′( )
𝑥 = 0.25
Putting n=1 in (1), we get the second approximation 𝑥 to the root, given by
( ) ( . ) ( . ) .
𝑥 = 𝑥 − = 0.25 −
′( ) ( . )
.
= 0.25 − = 0.2586
.
𝒙𝟐 = 𝟎. 𝟐𝟓𝟖𝟔
Putting n=2 in (1), we get the third approximation 𝑥 to the root, given by
( ) ( . ) ( . ) .
𝑥 = 𝑥 − = 0.2586 −
′( ) ( . )
𝒙𝟑 = 𝟎. 𝟐𝟓𝟖𝟔
Solution:
Let 𝑥 =
1
𝑁=
𝑥
1
−𝑁 =0
𝑥
𝑓(𝑥) = − 𝑁 ; 𝑓 ′ (𝑥) = −
𝒇(𝒙𝒏 )
The Newton’s formula is 𝒙𝒏 𝟏 = 𝒙𝒏 −
𝒇′ (𝒙𝒏 )
−𝑁
=𝑥 −
−
1
=𝑥 + −𝑁 𝑋 𝑥
𝑥
=𝑥 +𝑥 −𝑥 𝑁
𝒙𝒏 𝟏 = 𝑥 (2 − 𝑁𝑥 )
𝟑
5. Arrive a formula to find the value of √𝑵 where 𝑵 ≠ 𝟎, using Newton-Raphson method.
Solution:
Let 𝑥 = √𝑁
𝑥 =𝑁
𝑥 −𝑁 =0
𝑓(𝑥) = 𝑥 − 𝑁 ; 𝑓 ′ (𝑥) = 3𝑥
𝐵𝑦 Newton-Raphson method
44
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓 ′ (𝑥 )
𝑥 − 𝑁 3𝑥 −𝑥 +𝑁
=𝑥 − =
3𝑥 3𝑥
1 2𝑥 + 𝑁
=
3 𝑥
1 𝑁
= 2𝑥 + , 𝑛 = 0,1,2, … ….
3 𝑥
Solution:
Solution:
3. condition for convergence is the Condition for convergence is the co-efficient matrix is
dominant
45
Solution:
Given 3x + 2y = 4
2x – 3y = 7
3 2 𝑥 4
=
2 −3 𝑦 7
3 2 4
Here [𝐴, 𝐵] =
2 −3 7
3 2 4
= 𝑅 ↔ 3𝑅 − 2𝑅
0 −13 13
−13𝑦 = 13
𝑦 = −1
3𝑥 + 2𝑦 = 4
3𝑥 − 2 = 4
3𝑥 = 6
𝑥=2
9. Which iterative method converges faster for solving linear system of equations? Why?
Sol:
Gauss Seidal method is solving for linear system of equations converge faster. In this method the
Sol:
1
Solution: 𝐿𝑒𝑡 𝑋 =
1
1 2 1 3 0.43
𝐴𝑋 = = =7 = 7𝑋
3 4 1 7 1
0.46
The corresponding eigen vector= .
1
PART – B
1. Using fixed point iteration method to find the positive root of the equation
cos x 3x 1 0 .
Sol:
𝑓(0) = 1 − 0 + 1 = 2 = +𝑣𝑒
1
𝑥 = (1 + 𝑐𝑜𝑠𝑥) = 𝑔(𝑥)
3
1
𝑔(𝑥) = (1 + 𝑐𝑜𝑠𝑥)
3
47
1
𝑔′ (𝑥) = − 𝑠𝑖𝑛𝑥
3
1
|𝑔′ (𝑥)| = 𝑠𝑖𝑛𝑥
3
|𝑔′ (0)| = 0 < 1
1
|𝑔′ (1)| = sin 1 = 0.2804 < 1
3
Let 𝑥 = 0.6
1 1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = [1 + cos (0.6)] = 0.60845
3 3
1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = 0.60684
3
1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = 0.60715
3
1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = 0.60709
3
1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = 0.60710
3
1
𝑥 = [1 + 𝑐𝑜𝑠𝑥 ] = 0.60710
3
Here 𝑥 = 𝑥 = 0.60710
Sol:
G.T: e x 3 x 0
Let f ( x ) e x 3 x
48
ex
The given equation is of the form, x g ( x)
3
ex
g ' ( x)
3
ex
g ' ( x)
3
1
g ' ( 0) 1
3
e
g ' (1) 1
3
e x0 1 0.6
x1 e 0.6074
3 3
e x1 1 0.6074
x2 e 0.6119
3 3
e x2
x3 0.6146
3
e x3
` x4 0.6163
3
e x4
x5 0.6174
3
e x5
x6 0.6180
3
e x6
x7 0.6184
3
49
e x7
x8 0.6187
3
e x8
x9 0.6188
3
e x9
x10 0.6189
3
e x10
x11 0.6190
3
e x11
x12 0.6190
3
Solution:
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓′(𝑥 )
𝑥 = 2.740
𝑥 = 2.741
𝑥 = 2.741
We observe that the root 𝑥 = 𝑥 = 2.741Correct to 3 decimal places. Hence the required
decimal places.
Solution :
𝑓 ′ (𝑥) = 3 + 𝑠𝑖𝑛 𝑥
𝑓(0) = 0 − 1 − 1 = −2 = −𝑣𝑒
51
Therefore a root lies between 0 and 1.
𝐿𝑒𝑡 𝑥 = 1
𝑓(𝑥 )
𝑥 =𝑥 − … … … (1)
𝑓 ′ (𝑥 )
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓 ′ (𝑥 )
𝑓(1)
=1−
𝑓 ′ (1)
3(1) − cos(1) − 1
=1−
3 + sin(1)
1.45970
=1−
3.84147
= 1 − 0.37998
𝑥 = 0.62002
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓 ′ (𝑥 )
𝑓(0.62002)
= 0.62002 −
𝑓 ′ (0.62002)
3(0.62002) − cos(0.62002) − 1
= 0.62002 −
3 + sin(0.62002)
𝑥 = 0.60712
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓 ′ (𝑥 )
𝑓(0.60712)
= 0.60712 −
𝑓 ′ (0.607102)
52
3(0.60712) − cos(0.60712) − 1
= 0.60712 −
3 + sin(0.60712)
𝑥 = 0.60710
𝑓(𝑥 )
𝑥 =𝑥 −
𝑓 ′ (𝑥 )
𝑓(0.60710)
= 0.60710 −
𝑓 ′ (0.60710)
3(0.60710) − cos(0.60710) − 1
= 0.60710 −
3 + sin(0.60710)
𝑥 = 0.60710
From 𝑥 and 𝑥 we findout the root is 0.60710 correct to five decimal places.
5. Interpret the Newton’s iterative formula to calculate the reciprocal of N and hence find
Sol:
Let 𝑥 =
1
𝑁=
𝑥
1
−𝑁 =0
𝑥
𝑓(𝑥) = − 𝑁 ; 𝑓 ′ (𝑥) = −
𝒇(𝒙𝒏 )
The Newton’s formula is 𝒙𝒏 𝟏 = 𝒙𝒏 −
𝒇′ (𝒙𝒏 )
−𝑁
=𝑥 −
−
1
=𝑥 + −𝑁 𝑋 𝑥
𝑥
53
=𝑥 +𝑥 −𝑥 𝑁
= 𝑥 (2 − 𝑁𝑥 )
Let x 0 0.04
W.K.T 𝒙𝒏 𝟏 = 𝑥 (2 − 𝑁𝑥 )
𝒙𝟏 = 𝑥 (2 − 26𝑥 )
= 0.04(2 − 26(0.04))
=0.0384
𝒙𝟐 = 𝑥 (2 − 26𝑥 )
= 0.0384(2 − 26(0.0384))
=0.0385
𝒙𝟑 = 𝑥 (2 − 26𝑥 )
= 0.0385(2 − 26(0.0385))
=0.0385
Here 𝒙𝟐 = 𝑥 = 0.0385
54
5 −2 1 𝑥 4
7 1 −5 𝑦 = 8
3 7 4 𝑧 10
5 −2 1 10
[𝐴, 𝐵] = 7 1 −5 18
3 7 4 16
5 −2 1 4 ⬚ 𝑅 ↔ 7𝑅 − 5𝑅 ⬚
~ 0 −19 27 −12
⬚ 𝑅 ↔ 3𝑅 − 5𝑅 ⬚
0 −41 −17 −38
5 −2 1 4
⬚ ⬚ ⬚
~ 0 −19 27 −12
⬚ 𝑅 ↔ 41𝑅 − 19𝑅 ⬚
0 0 1430 230
1430𝑧 = 230
𝑧 = 230/1430
𝑧 = 0.161
𝑌 = 0.860
5𝑥 − 2𝑦 + 𝑧 = 4
5𝑥 − 1.72 + 1.161 = 4
𝑥 = 1.112
Solution:
The given system is equivalent to
2 1 4 𝑥 12
8 −3 2 𝑦 = 20
1 4 9 𝑧 33
55
2 1 4 12
[𝐴, 𝐵] = 8 −3 2 20
1 4 9 33
2 1 4 12
~ 0 7 14 18 𝑅 → 4𝑅 − 𝑅 , 𝑅 → 2𝑅 − 𝑅
0 −9 9 −9
2 1 4 12
~ 0 7 14 18 𝑅 → 7𝑅 + 9𝑅
0 0 189 189
189𝑧 = 189
𝒛=𝟏
7𝑦 + 14𝑧 = 28 ⇒ 7𝑦 + 14 = 28 ⇒ 7 𝑦 = 14
𝒚=𝟐
2𝑥 + 𝑦 + 4𝑧 = 12 ⇒ 2𝑥 + 2 + 4 = 12
2𝑥 = 6
𝒙=𝟑
Hence 𝒙 = 𝟑, 𝒚 = 𝟐, 𝒛 = 𝟏.
8. Using the Gauss – Jordan method solve the following equations 10x + y + z = 12,
Solution:
Given 10𝑥 + 𝑦 + 𝑧 = 12
2𝑥 + 10𝑦 + 𝑧 = 13
𝑥 + 𝑦 + 5𝑧 = 7
2𝑥 + 10𝑦 + 𝑧 = 13
10𝑥 + 𝑦 + 𝑧 = 12
1 1 5 𝑥 7
2 10 1 𝑦 = 13
10 1 1 𝑧 12
AX = B
1 1 5 7
Here [𝐴, 𝐵] = 2 10 1 13
10 1 1 12
Fix the pivot element row and make the other elements zero in the pivot element column.
1 1 5 7
~ 0 8 −9 −1 𝑅 ↔ 𝑅 − 2𝑅 & 𝑅 ↔ 𝑅 − 10𝑅
0 −9 −49 −58
8 0 49 57
~ 0 8 −9 −1 𝑅 ↔ 8𝑅 − 𝑅 & 𝑅 ↔ 8𝑅 + 9𝑅
0 0 473 473
8 0 49 57
~ 0 8 −9 −1 𝑅 ↔
0 0 1 1
8 0 08
~ 0 8 0 8 𝑅 ↔ 𝑅 − 49𝑅 & 𝑅 ↔ 𝑅 + 9𝑅
0 0 11
1 0 01
~ 0 1 01 𝑅 ↔ &𝑅 ↔
0 0 11
−𝒙 + 𝟐𝒚 + 𝒛 = 𝟒, 𝟑𝒙 + 𝒚 − 𝟒𝒛 = 𝟎
Solution:
Given 2𝑥 − 𝑦 + 3𝑧 = 8
−𝑥 + 2𝑦 + 𝑧 = 4
3𝑥 + 𝑦 − 4𝑧 = 0
𝐴𝑋 = 𝐵
2 −1 3 8
Here [𝐴, 𝐵] = −1 2 1 4
3 1 −4 0
Fix the pivot element row and make the other elements zero in the pivot element column.
2 −1 3 8
~ 0 3 5 16 𝑅 ↔ 2𝑅 + 𝑅 & 𝑅 ↔ 2𝑅 − 3𝑅
0 5 −17 −24
6 0 14 40 𝑅 ↔ 3𝑅 + 𝑅
~ 0 3 5 16
𝑅 ↔ 3𝑅 − 5𝑅
0 0 −76 −152
6 0 14 40
~ 0 3 5 16 𝑅 ↔
0 0 1 2
6 0 0 12
~ 0 3 0 6 𝑅 ↔ 𝑅 − 14𝑅 & 𝑅 ↔ 𝑅 − 5𝑅
0 0 1 2
1 0 02 𝑅 𝑅
~ 0 1 02 𝑅 ↔ &𝑅 ↔
6 3
0 0 12
10. Solve the system of equation by Gauss – Sedial method correct to 4 decimal places
Solution: .
Given 20x + y –2 z = 17
3x + 20y -z = -18
2x -3y +20z = 25
58
𝑥= [17 − 𝑦 + 2𝑧], 𝑦 = [−18 − 3𝑥 + 𝑧], 𝑧 = [25 − 2𝑥 + 3𝑦]
Iteration 17 − 𝑦 + 2𝑧 −18 − 3𝑥 + 𝑧 25 − 2𝑥 + 3𝑦
𝑥= 𝑦= 𝑧=
20 20 20
4 1 -1 1
Hence x = 1, y = -1, z = 1.
11. Solve the system of equation by Gauss – Seidel method 28x +4 y – z = 32, x + 3y +10z = 24,
Solution: .
Given 28𝑥 + 4 𝑦 – 𝑧 = 32
𝑥 + 3𝑦 + 10𝑧 = 24
2𝑥 + 17𝑦 + 4𝑧 = 35
𝑥= [32 − 4𝑦 + 𝑧]
𝑦= [35 − 2𝑥 − 4𝑧]
𝑧= [24 − 𝑥 − 3𝑦]
Iteration 32 − 4𝑦 + 𝑧 35 − 2𝑥 − 4𝑧 24 − 𝑥 − 3𝑦
𝑥= 𝑦= 𝑧=
28 17 20
59
Let1the initial value be y=0, z=0
1.1429 1.9244 1.8084
𝟏 𝟔 𝟏
12. Find the largest Eigen value and the corresponding Eigen vector of 𝑨 = 𝟏 𝟐 𝟎 using
𝟎 𝟎 𝟑
Solution:
1
Let 𝑋 = 0 be an approximate eigen value.
0
1 6 1 1 1 1
𝐴𝑋 = 1 2 0 0 = 1 =1 1 =1𝑋
0 0 3 0 0 0
1 6 1 1 7 1
𝐴𝑋 = 1 2 0 1 = 3 = 7 0.4286 = 7 𝑋
0 0 3 0 0 0
1 6 1 1 3.5714 1
𝐴𝑋 = 1 2 0 0.4286 = 1.8572 = 3.5714 0.52 = 3.5714 𝑋
0 0 3 0 0 0
1 6 1 1 4.12 1
𝐴𝑋 = 1 2 0 0.52 = 2.04 = 4.12 0.4951 = 4.12 𝑋
0 0 3 0 0 0
1 6 1 1 3.9706 1
𝐴𝑋 = 1 2 0 0.4951 = 1.9902 = 3.9706 0.5012 = 3.9706 𝑋
0 0 3 0 0 0
60
1 6 1 1 4.0072 1
𝐴𝑋 = 1 2 0 0.5012 = 2.0024 = 4.0072 0.4997 = 4.0072 𝑋
0 0 3 0 0 0
1 6 1 1 3.9982 1
𝐴𝑋 = 1 2 0 0.4997 = 1.9994 = 3.9982 0.5000 = 3.9982 𝑋
0 0 3 0 0 0
1 6 1 1 4 1
𝐴𝑋 = 1 2 0 0.5 = 2 = 4 0.5 = 4 𝑋
0 0 3 0 0 0
1 6 1 1 4 1
𝐴𝑋 = 1 2 0 0.5 = 2 = 4 0.5
0 0 3 0 0 0
Therefore Dominant eigen value =4; corresponding eigen vector is (1, 0.5, 0)
13. Find , by power method, the largest Eigen value and the corresponding Eigen vector of a
1 3 −1
matrix 𝑨 = 3 2 4 with initial vector ( 𝟏 𝟏 𝟏)𝑻 .
−1 4 10
Solution:
1
Let 𝑋 = 1 be an arbitrary initial eigen vector.
1
1 3 −1 1 3 0.231
𝐴𝑋 = 3 2 4 1 = 9 = 13 0.692 = 13𝑋
−1 4 10 1 13 1
0.025
Therefore, the dominant eigenvector is 0.422 , eigenvalue is 11.663.
1
UNIT-IV
INTEGRATION
PART-A
LAGRANGE’S INTERPOLATION
Solution:
𝑥 ,𝑥 ,𝑥 ,….𝑥
( )( )…( ) ( )( )…( )
𝑦 = 𝑓(𝑥) = ( )( )…(
𝑦 +( )( )…(
𝑦
) )
(𝑥 − 𝑥 )(𝑥 − 𝑥 ) … (𝑥 − 𝑥 )
+ ……+ 𝑦
(𝑥 − 𝑥 )(𝑥 − 𝑥 ) … (𝑥 − 𝑥 )
2. Find the second degree polynomial through the points (0,2),(2,1),(1,0) using Lagrange’s
formula.
Solution:
62
(𝑥 − 𝑥 )(𝑥 − 𝑥 ) (𝑥 − 𝑥 )(𝑥 − 𝑥 )
𝑦 = 𝑓(𝑥) = 𝑦 + 𝑦
(𝑥 − 𝑥 )(𝑥 − 𝑥 ) (𝑥 − 𝑥 )(𝑥 − 𝑥 )
(𝑥 − 𝑥 )(𝑥 − 𝑥 )
+ 𝑦
(𝑥 − 𝑥 )(𝑥 − 𝑥 )
1 1
= 𝑥 − 3𝑥 + 2 + (𝑥 − 𝑥) = (2𝑥 − 6𝑥 + 4 + 𝑥 − 𝑥)
2 2
1
𝑦 = (3𝑥 − 7𝑥 + 4)
2
DIVIDED DIFFERENCES
Solution:
Interpolation Extrapolation
To find the values of a function inside a To find the values of a function outside a
4. Find the divided difference of f(x) which takes the values 1, 4, 40, 85 with arguments 0,
1, 3, 4
Solution:
63
0 1
4−1
=3
1−0
18 − 3
=5
3−0
1 4
40 − 4 = 18
.
3−1 = 0.44
45 − 18
= 6.75
3 40 4−0
85 − 40
= 45
4−3
4 85
Solution:
𝑓(1) = 1 + 1 + 2 = 4
𝑓(3) = 3 + 3 + 2 = 32
𝑓(6) = 6 + 6 + 2 = 224
𝑓(11) = 11 + 11 + 2 = 1344
64
1 4
32 − 4
= 14
3−1
64 − 14
= 10
6−1
3 32
224 − 32 = 64
6−3 =1
224 − 64
= 20
6 224 11 − 3
1344 − 224
= 224
11 − 6
11 1344
Solution:
Where 𝑣 =
Solution:
65
𝑛(𝑛 − 1) 𝑛(𝑛 − 1)(𝑛 − 2)
𝑦 = 𝑓(𝑥 + 𝑛h) = 𝑦 + 𝑛∆𝑦 + ∆ 𝑦 + ∆ 𝑦 + +⋯
2! 3!
8. Find the first and second divided difference with arguments 𝒂, 𝒃, 𝒄 of the function
𝟏
𝒇(𝒙) =
𝒙
Solution:
If 𝑓(𝑥) = ⇒ 𝑓(𝑎) =
( ) ( )
𝑓(𝑎, 𝑏) = ∆ = =− ∵ 𝑓(𝑥 , 𝑥 ) =
∴ ∆ =
formula.
Solution:
𝑑𝑦 1 1 1 1
= ∇𝑦 + ∇ 𝑦 + ∇ 𝑦 + ∇ 𝑦 + ⋯
𝑑𝑥 ℎ 2 3 4
𝑑 𝑦 1 11
= ∇ 𝑦 −∇ 𝑦 + ∇ 𝑦 +⋯
𝑑𝑥 ℎ 12
b
10. State Trapezoidal rule to evaluate f ( x)dx .
a
Solution:
66
b
h
f ( x)dx 2 y
a
0 y n 2 y1 y 2 ... y n 1
𝟐 𝒅𝒙
11. Taking 𝒉 = 𝟎. 𝟓,evaluate ∫𝟏 using Trapezoidal rule.
𝟏 𝒙𝟐
Solution:
Here 𝑦(𝑥) =
x : 1 1.5 2
ℎ = 0.5
By Trapezoidal rule
Trapezoidal rule
ℎ
= [𝑠𝑢𝑚 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑖𝑟𝑠𝑡 𝑎𝑛𝑑 𝑙𝑎𝑠𝑡 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠]
2
𝑑𝑥 ℎ
= [(0.5 + 0.2) + 2(0.3077)]
1+𝑥 2
𝑑𝑥 0.5
= [0.7 + 0.6154]
1+𝑥 2
𝑑𝑥 0.5
= [1.3154] = 0.3289
1+𝑥 2
67
12. Using Trapezoidal rule, evaluate sin x dx by dividing the range into 6 equal parts.
0
Solution:
Given: sin x dx
0
Range = b - a = 0
Here h
6
x 0 2 3 4 5
6 6 6 6 6
b
h
f ( x)dx 2 A 2 B
a
= 0 0 20.5 0.866 1 0.8666 0.5
12
= 0.6220
1
1
13. Evaluate x dx
1
by Trapezoidal rule, dividing the range into 4equal parts.
Solution:
Here, ℎ= = ; 𝑦=
68
A= Sum of the first and last ordinates = + = 3
1
1 h 1 856 2
dx A 2 B 3 0.6971
1 x 2 16 210
2
𝟏 𝒅𝒙
14. Evaluate ∫𝟎 using Trapezoidal rule.
𝟏 𝒙𝟐
Solution:
Here 𝑦(𝑥) =
ℎ = 0.2
By Trapezoidal rule
Trapezoidal rule
ℎ
= [𝑠𝑢𝑚 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑖𝑟𝑠𝑡 𝑎𝑛𝑑 𝑙𝑎𝑠𝑡 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠]
2
∫ = [(𝑦 + 𝑦 ) + 2(𝑦 + 𝑦 + 𝑦 + 𝑦 +𝑦 )]
𝑑𝑥 0.2
= [(1 + 0.5) + 2(0.96154 + 0.86207 + 0.9412 + 0.73529 + 0.60976)]
1+𝑥 2
𝑑𝑥 0.2
= [7.83732] = 0.783732 … … . . (1)
1+𝑥 2
By actual integration,
𝑑𝑥 𝜋
= (𝑡𝑎𝑛 𝑥) = 𝑡𝑎𝑛 1 − 𝑡𝑎𝑛 0= … … (2)
1+𝑥 4
69
𝜋
𝐹𝑟𝑜𝑚 (1)& (2) = 0.783732
4
𝜋 = 3.13493(𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒𝑙𝑦
Solution:
ℎ
𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦 ) + 4(𝑦 + 𝑦 + ⋯ + 𝑦 ) + 2(𝑦 + 𝑦 + ⋯ + 𝑦 )]
3
b d
16. State Trapezoidal rule for evaluating f ( x, y )
a c
dx dy .
Solution:
hk
I [( Sum of values of f at Four corners) + 2(Sum of the values of f at remaining nodes
4
on the boundary ) 4 sum of values of f at interior nodes
PART-B
LAGRANGE’S INTERPOLATION
1. Find the interpolation polynomial f(x) by Lagrange’s formula and hence find f(3) for
Find the polynomial 𝒇(𝒙) by using Lagrange’s formula and hence find 𝒇(𝟑) for
70
𝒙 0 1 2 5
𝒇(𝒙) 2 3 12 147
Solution:
Put x = 3 we get
4 6 1 8 18 147
𝑦 = 𝑓(3) = (2) − (3) + 2(12) + (147) = − + 24 +
10 4 10 10 4 10
𝑓(3) = 35
Solution:
71
By Lagrange’s interpolation formula, we have
(𝑥 − 1)(𝑥 − 3)(𝑥 − 4)
𝑦 = 𝑓(𝑥) = (−12) + 0
(0 − 1)(0 − 3)(0 − 4)
𝑥(𝑥 − 1)(𝑥 − 3)
+ (12)
12
= (𝑥 − 1)[𝑥 − 3𝑥 − 4𝑥 + 12 − 𝑥 + 4𝑥 + 𝑥 − 3𝑥]
= (𝑥 − 1)(𝑥 − 6𝑥 + 12)
= 𝑥 − 6𝑥 + 12𝑥 − 𝑥 + 6𝑥 − 12
𝑓(𝑥) = 𝑥 − 7𝑥 + 18𝑥 − 12
∴ 𝑓(2) = 4
72
DIVIDED DIFFERENCES
3. Determine 𝒇(𝒙) as a polynomial in 𝒙 for the following data, using Newton’s divided
𝒙 -4 -1 0 2 5
Solution:
-4 1245
33 − 124
= −404
−1 − (−4)
-1 33 −28 − (−404)
= 94
0 − (−4)
5 − 33
= −28 10 − 94
0 − (−1)
= −14
2 − (−4)
2 − (−28)
= 10
0 5 2 − (−1)
9−5 13 + 14
=2 =3
2−0 5 − (−4)
88 − 10
= 13
442 − 2 5 − (−1)
= 88
5−0
2 9
1335 − 9
= 442
5−2
5 1335
73
By Newton’s divided difference interpolation formula,
↳ ⋯ … … … . (1)
Here 𝑓(𝑥 ) = 1245, 𝑓(𝑥 , 𝑥 ) = −404, 𝑓(𝑥 , 𝑥 , 𝑥 ) = 94, 𝑓(𝑥 , 𝑥 , 𝑥 , 𝑥 ) = −14 & 𝑓(𝑥 , 𝑥 , 𝑥 , 𝑥 , 𝑥 ) =3,
+ 3𝑥[𝑥 − 2𝑥 + 5𝑥 − 10𝑥 + 4𝑥 − 8 ]
∴ 𝑓(𝑥) = 3𝑥 − 5𝑥 + 6𝑥 − 14𝑥 + 5
⇒ 𝑓(3) = 3 × 3 − 5 × 3 + 6 × 3 − 14 × 3 + 5 = 125
∴ 𝑓(3) = 125
4. Use Newton’s divided difference formula find f(9) given the values (5,150), (7,392),
Solution:
74
5 150
392 − 150
= 121
7−5
329 − 121
= 26
13 − 5
7 392
2366 − 392 = 329
13 − 7 38 − 26
=1
17 − 5
709 − 329
= 38
13 2366 17 − 7
5202 − 2366
= 709
17 − 13
17 5202
𝑓(9) = 794
5. Find a polynomial of degree two for the data by Newton’s forward difference formula.
X 0 1 2 3 4 5 6 7
y 1 2 4 7 11 16 22 29
Solution:
75
x y ∆𝑦 ∆ 𝑦 ∆ 𝑦
0 1
1 2 1
2 0
2 4 1
3 0
3 7 1
4 0
4 11 1
5 0
5 16 1
6 0
6 22 1
7 29
Here 𝑥 = 0, 𝑦 = 1, ℎ = 1
( )
𝑦(𝑥) = 𝑦 + 𝑢∆𝑦 + ∆ 𝑦 +……
!
Where 𝑢 = = =𝑥⇒𝑢=𝑥
( )
𝑦(𝑥) = 1 + 𝑥(1) + (1)
!
=1+𝑥+ =
76
6. Using Newton’s forward interpolation formula, find the cubic polynomial which takes
𝑿 0 1 2 3
𝒀 1 2 1 10
Solution:
𝒙 𝒚 ∆𝒚 ∆𝟐 𝒚 ∆𝟑 𝒚
𝑥 0 𝑦 1
2 − 1 = 1(∆𝑦 )
𝑥 1 𝑦 2 −1 − 1
= −2 (∆ 𝑦 )
1 − 2 = −1(∆𝑦 ) 10 + 2
𝑥 2 𝑦 1 = 12 (∆ 𝑦 )
9+1 = 10 (∆ 𝑦 )
10 − 1 = 9(∆𝑦 )
𝑥 3 𝑦 10
Where 𝑢 = = =𝑥⇒𝑢=𝑥
𝑥 −𝑥 𝑥(𝑥 − 1)(𝑥 − 2)
=1+𝑥− (2) + (12)
2 6
77
= 1 + 𝑥 − 𝑥 + 𝑥 + 2𝑥(𝑥 − 1)(𝑥 − 2)
= 1 + 𝑥 − 𝑥 + 𝑥 + 2𝑥(𝑥 − 3𝑥 + 2)
= 1 + 𝑥 − 𝑥 + 𝑥 + 2𝑥 − 6𝑥 + 4𝑥
= 1 + 6𝑥 − 7𝑥 + 2𝑥
∴ 𝑦(𝑥) = 2𝑥 − 7𝑥 + 6𝑥 + 1
= 2(64) − 7(16) + 24 + 1
= 41
𝒙 0 10 20 30 40
Solution:
𝑥 𝑌 = 𝑓(𝑥) ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
(𝑦 )
0 0 (∆𝑦 )
0.17365 (∆ 𝑦 )
10 0.17365 -0.00528 (∆ 𝑦 )
0.16837 -0.00511 (∆ 𝑦 )
0.15798 -0.00487 (∇ 𝑦 )
78
30 0.5 -0.01519 (∇ 𝑦 )
0.14279 (∇ 𝑦 )
40 0.64279
(𝑥 ) (𝑦 )
.
Where 𝑣 = = = −0.2
dx d2y
8. Construct and 2 at x 51, from the following data:
dy d x
X: 50 60 70 80 90
Solution:
Given x= 51, x0 = 50 h = 60 – 50 = 10
x x0 51 50
u 0.1
h 10
At x = 51, u = 0.1
Difference table
x y = f(x) y 2 y 3 y 4 y
79
50 19.96
16.69
60 36.65 5.47
22.16 -9.23
18.40 2.76
80 77.21 -1.00
17.40
90 94.61
1
= 16.69 2.188 2.1998 1.9863
10
f '(51) 1.0316
80
1
= 5.47 8.307 9.2523
100
f "(51) 0.2303
9. For the given data, find the first two derivative at x=1.1
Solution:
X y=f(x) ∆𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦 ∆ 𝑦
1 7.989
0.414
0.378 0.006
0.299 0.005
0.281
1.6 10.031
81
𝑥−𝑥 1
𝑢= = =1
ℎ 1
𝑑𝑦
= 0.3950
𝑑𝑥 .
𝟔 𝒅𝒙
10. Evaluate ∫𝟎 by i) Trapezoidal rule ii) Simpson’s rule. And compare the result with
𝟏 𝒙𝟐
Solution:
Here 𝑦(𝑥) =
Let ℎ = 1
x :0 1 2 3 4 5 6
𝑑𝑥 ℎ
= [(𝑦 + 𝑦 ) + 2(𝑦 + 𝑦 + 𝑦 + 𝑦 + 𝑦 )]
1+𝑥 2
𝑑𝑥 1
= [(1 + 0.27027) + 2(0.5 + 0.2 + 0.1 + 0.058824 + 0.038462)]
1+𝑥 2
𝑑𝑥
= 1.41079950
1+𝑥
82
We know that Simpson’s one third rule is
𝑑𝑥 ℎ
= [(𝑦 + 𝑦 ) + 4(𝑦 + 𝑦 + 𝑦 ) + 2(𝑦 + 𝑦 )]
1+𝑥 3
𝑑𝑥 1
= [(0.5 + 0.027027) + 4(0.5 + 0.1 + 0.038462) + 2(0.2 + 0.58824)]
1+𝑥 3
𝑑𝑥
= 1.28241
1+𝑥
3ℎ
𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦 ) + 3(𝑦 + 𝑦 + 𝑦 + 𝑦 ) + 2(𝑦 )]
8
𝑑𝑥 3
= [(1 + 0.027027) + 3(0.5 + 0.2 + 0.058824 + 0.038462) + 2(0.1)]
1+𝑥 8
𝑑𝑥
= 1.35708188
1+𝑥
By actual integration,
𝑑𝑥
= (𝑡𝑎𝑛 𝑥) = 𝑡𝑎𝑛 6 = 1.40564764
1+𝑥
Conclusion:
Here the value by trapezoidal rule is closer to the actual value than the value by Simpson’s
rule.
𝟏.𝟑
11. Take 𝒉 = 𝟎. 𝟎𝟓 , evaluate ∫𝟏 √𝒙 𝒅𝒙 using Trapezoidal rule and Simpson’s three-eighth
rule. Solution:
83
x 1 1.05 1.1 1.15 1.2 1.25 1.3
𝟏.𝟑
ℎ
√𝒙 𝒅𝒙 = [(𝑦 + 𝑦 ) + 2(𝑦 + 𝑦 + 𝑦 + 𝑦 + 𝑦 )]
2
𝟏
𝟏.𝟑
0.05
√𝒙 𝒅𝒙 = [(1 + 1.1402) + 2(1.0247 + 1.0488 + 1.0724 + 1.0954 + 1.118)]
2
𝟏
𝟏.𝟑
√𝒙 𝒅𝒙 = 0.3215
𝟏
3ℎ
𝑓(𝑥) 𝑑𝑥 = [(𝑦 + 𝑦 ) + 3(𝑦 + 𝑦 + 𝑦 + 𝑦 ) + 2(𝑦 )]
8
𝟏.𝟑
3(0.05)
√𝒙 𝒅𝒙 = [(1 + 1.1402) + 3(1.0247 + 1.0488 + 1.0954 + 1.118) + 2(1.0724)]
8
𝟏
𝟏.𝟑
√𝒙 𝒅𝒙 = 0.3215
𝟏
𝟏.𝟐 𝟏.𝟒 𝟏
12. Evaluate ∫𝟏 ∫𝟏 𝒅𝒙 𝒅𝒚 by using Trapezoidal rule taking h=0.1 and k=0.1
𝒙 𝒚
Solution:
84
y\x 1 1.1 1.2 1.3 1.4
(0.1)(0.1)
I = [(0.5000 + 0.4167 + 0.3846 + 0.4545)
4
𝐼 = 0.0349
𝟏 𝟏 𝟏
13. Evaluate ∫𝟎 ∫𝟎 𝒅𝒙 𝒅𝒚 by using Trapezoidal rule taking h=0.5 and k=0.25
𝒙 𝒚 𝟏
Solution:
0 0.5 1
0 1 0.6667 0.5
= 0.5319
𝟑 𝟐 𝟏
14. Evaluate ∫𝟏 ∫𝟏 𝒅𝒙 𝒅𝒚 by using Trapezoidal rule taking h=0.5 and k=0.5
𝒙𝒚
Solution:
1 1.5 2
1 1 0.667 0.5
( . )( . )
I= [(1 + 0.5 + 0.3333 + 0.1667) + 2(0.667 + 0.3333 + 0.25 + 0.2 + 4.5 + 0.4 +
𝐼 = 1.3258
Solution:
( )
Let 𝑓(𝑥, 𝑦) =
The values of 𝑓(𝑥, 𝑦) at the nodal points are given in the following table
86
0 1/4 ½
0 0 0 0
¼ 0 0.0588 0.1108
+ 2 (sum of the values of f at the odd position on the boundary except the corners)
f at even positions) on the odd row of the matrix except boundary rows}
𝐼 = 0.0141
𝟏.𝟒 𝟐.𝟒 𝟏
16. Evaluate ∫𝟏 ∫𝟐 𝒅𝒙 𝒅𝒚 by using Trapezoidal rule taking h=0.1 and k=0.1
𝒙𝒚
Solution:
87
1.4 0.3571 0.3401 0.3247 0.3106 0.2976
(0.1)(0.1)
I = [(0.5000 + 0.4167 + 0.3571 + 0.2976)
4
+ 0.3344)]
𝐼 = 0.0614
By actual integration:
. . . .
1 1 1
𝑑𝑥 𝑑𝑦 = 𝑑𝑦) ( 𝑑𝑥
𝑥𝑦 𝑦 𝑥
. .
= (𝑙𝑜𝑔 𝑦) (𝑙𝑜𝑔 𝑦)
= 𝑙𝑜𝑔(1.4)𝑙𝑜𝑔(1.2)
. .
1
𝑑𝑥 𝑑𝑦 = 0.0613
𝑥𝑦
UNIT-V
88
PART-A
Solution:
Given 𝑦 ′ = 1 + 𝑦 and 𝑥 = 0, 𝑦 = 1
(𝑥 − 𝑥 ) ′ (𝑥 − 𝑥 ) ′′ (𝑥 − 𝑥 ) ′′′
𝑦 = 𝑦 + 𝑦 + 𝑦 + 𝑦 +⋯
1! 2! 3!
𝑦′ = 1 + 𝑦 𝑦′ = 1 + 1 = 2
𝑦 ′′ = 𝑦 ′ 𝑦 ′′
=2
𝑦 ′′′ = 𝑦 ′′ 𝑦 ′′′
=2
(𝑥 − 0) (𝑥 − 0) (𝑥 − 0)
𝑦 = 1 + (𝑥 − 0)2 + (2) + (2) + (2)
2 6 24
𝑥 𝑥
= 1 + 2𝑥 + 𝑥 + +
3 12
(0.1) (0.4)
𝑦(0.1) = 1 + 2(0.1) + (0.1) + +
3 12
89
𝑦 = 𝑦(0.1) = 1.2103
Solution:
The method gives a straight forward adaptation of classic calculus to develop the solution as
an infinite series. It is a powerful single step method if we are able to find the successive
derivatives easily.
If f(x,y) involves some complicated algebraic structures then the calculation of higher
derivatives becomes tedious and the method fails.
𝒅𝒚
4. State Euler’s method to solve = 𝒇(𝒙, 𝒚)𝒘𝒊𝒕𝒉 𝒚(𝒙𝟎 ) = 𝒚𝟎 .
𝒅𝒙
Solution:
𝒅𝒚
5. State Modified Euler’s method to solve = 𝒇(𝒙, 𝒚)𝒘𝒊𝒕𝒉 𝒚(𝒙𝟎 ) = 𝒚𝟎 .
𝒅𝒙
Solution:
h h
y1 y0 hf x0 , y0 f ( x0 , y0 )
2 2
𝒅𝒚
6. Find 𝒚(𝟎. 𝟏)by using Euler’s method given that = 𝒙 + 𝒚, 𝒚(𝟎) = 𝟏.
𝒅𝒙
Solution:
Given 𝑦 ′ = 𝑥 + 𝑦, 𝑥 = 0, 𝑦 = 1
By Euler’s method
𝑦 = 𝑦 + ℎ𝑓(𝑥 , 𝑦 )
𝑦 = 1 + (0.1)(0 + 1) = 1 + 0.1 = 1.2
𝑦 = 𝑦(0.1) = 1.2
7. Find 𝒚(𝟎. 𝟐) for the equation 𝒚′ = 𝒚 + 𝒆𝒙 , given that 𝒚(𝟎) = 𝟎 by using Euler’s method.
Solution:
Given 𝑦 ′ = 𝑦 + 𝑒 , 𝑥 = 0, 𝑦 = 0, ℎ = 0.2
90
By Euler algorithm, 𝑦 = 𝑦 + ℎ𝑓(𝑥 , 𝑦 )
= 0 + 0.2𝑓(0,0)
= 0.2[0 + 𝑒 ] = 0.2
𝑦(0.2) = 0.2
Solution:
Let h denote the interval between equidistant values of x. if the initial values are (𝑥 , 𝑦 ),
the first increment in y is computed from the formulas.
𝑘 = ℎ𝑓(𝑥 , 𝑦 )
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
𝑘 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘 )
1
∆𝑦 = (𝑘 + 2𝑘 + 2𝑘 + 𝑘 )
6
𝑥 = 𝑥 + ℎ, 𝑦 = 𝑦 + ∆𝑦
The increment in y in the second interval is computed in a similar manner using the
same four formulas, using the values 𝑥 , 𝑦 in the place of 𝑥 , 𝑦 respectively.
𝑓 (𝑥, 𝑦, 𝑧) = 𝑧
𝑓 (𝑥, 𝑦, 𝑧) = −𝑥𝑧 − 𝑦
By Runge- Kutta method
𝑘 = ℎ𝑓 (𝑥 , 𝑦 , 𝑧 ) 𝑙 = ℎ𝑓 (𝑥 , 𝑦 , 𝑧 )
= (0.1)𝑓 (0,1,0) = (0.1)𝑓 (0,1,0)
= (0.1)(0) = (0.1)(0 − 1)
𝑘 =0 𝑙 = −0.1
Solution:
91
4ℎ
𝑦 , =𝑦 + (2𝑦 ′ − 𝑦′ + 2𝑦 ′ )
3
ℎ
𝑦 , =𝑦 + (2𝑦 ′ − 4𝑦 ′ + 𝑦 ′ )
3
PART-B
𝒅𝒚
1. Find the value of 𝒚 at 𝒙 = 𝟎. 𝟏, 𝟎. 𝟐 given that = 𝒙𝟐 𝒚 − 𝟏, 𝒚(𝟎) = 𝟏,by Tailor’s series method
𝒅𝒙
up to four terms.
Solution:
Given 𝑦 ′ = 𝑥 𝑦 − 1 and 𝑥 = 0, 𝑦 = 1
92
We know that Taylor series formula is
(𝒙 𝒙𝟎 ) ′ (𝒙 𝒙𝟎 )𝟐 ′′ (𝒙 𝒙𝟎 )𝟑 ′′′
𝒚 = 𝒚𝟎 + 𝒚𝟎 + 𝒚𝟎 + 𝒚𝟎 +⋯ … (1)
𝟏! 𝟐! 𝟑!
𝑦′ = 𝑥 𝑦 − 1 𝑦 ′ = 0 − 1 = −1
𝑥 𝑥
𝑦 =1−𝑥+ −
3 4
To find y (0.1)
0.1 0.1
𝑦(0.1) = 1 − 0.1 + −
3 4
𝑦(0.1) = 0.900305
To find y (0.2)
0.2 0.2
𝑦(0.2) = 1 − 0.2 + −
3 4
𝑦(0.2) = 0.8022
(0.1) (0.1)
𝑦 = 𝑦(0.2) = 0.09933 + (0.1)(0.9801334) + (−0.3946868) + (−3.84159)
2 6
𝑦(0.2) = 0.19467
93
2. Determine the value of 𝒚(𝟎. 𝟒) using milnes’s method given 𝒚′ = 𝒙𝒚 + 𝒚𝟐 ,𝒚(𝟎) = 𝟏 . Using
Taylor series method obtain the values of 𝒚(𝟎. 𝟏) and y(0.2) and y(0.3).
Solution :
Given 𝑦 ′ = 𝑥𝑦 + 𝑦 and 𝑥 = 0, 𝑦 = 1,
By Taylor series formula is
(𝒙 𝒙𝟎 ) ′ (𝒙 𝒙𝟎 )𝟐 ′′ (𝒙 𝒙𝟎 )𝟑 ′′′
𝒚 = 𝒚𝟎 + 𝒚𝟎 + 𝒚𝟎 + 𝒚𝟎 +⋯ … (1)
𝟏! 𝟐! 𝟑!
𝑦 ′ = 𝑥𝑦 + 𝑦 𝑦′ = 1
𝑦 ′′ = 𝑥𝑦 ′ + 𝑦 + 2 𝑦 ′ 𝑦 ′′ = 1 + 2(1)(1) = 1
𝟒𝒉
𝒚𝟒, 𝒑 = 𝒚𝟎 + 𝟐𝒚′𝟏 − 𝒚′𝟐 + 𝟐𝒚′𝟑
𝟑
4(0.1)
𝑦 , =1+ [2(1.35902) − 1.88357 + 2(2.67974)]
3
𝑦 , = 1.82586
𝑦 ′ = (0.4)1.82586 + 1.82586 = 4.06411
By Mile’s corrector formula is
𝒉 ′
𝒚𝟒, 𝒄 = 𝒚𝟐 + 𝒚 + 𝟒𝒚′𝟑 + 𝒚′𝟒
𝟑 𝟐
94
0.1
= 1.27607 + [1.88357 + (2.67974) + 4.06411]
3
𝒚𝟒, 𝒄 = 𝟏. 𝟖𝟑𝟎𝟗𝟔
𝑦 = 1.83096
𝒅𝒚
3. Using Taylor series method fin y at x=1.1 by solving the equation if = 𝒙𝟐 + 𝒚𝟐 , 𝒚(𝟏) = 𝟐.
𝒅𝒙
Carryout the computations upto fourth order derivative.
Solution:
𝒅𝒚
4. Apply Modified Euler’s method to find 𝒚(𝟎. 𝟐) and 𝒚(𝟎. 𝟒) given that = 𝒙𝟐 + 𝒚𝟐 , 𝒚(𝟎) = 𝟏 by
𝒅𝒙
taking h=0.2
Solution:
𝑥 = 0, 𝑦 = 1, ℎ = 0.2
By Euler algorithm
95
ℎ ℎ
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + (𝑥 , 𝑦 ′)
2 2
𝐿𝑒𝑡 𝑛 = 0
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + (𝑥 , 𝑦 ′)
2 2
0.2 0.2 𝟐
= 1 + (0.2)𝑓(0 + ,1 + (𝟎 + 𝟏𝟐 ))
2 2
= 1 + (0.2)𝑓(0.1,1.1)
= 1 + (0.2)(1.22)
= 1.244
𝑦 = 1.244
𝒚𝟏 = 𝒚(𝟎. 𝟐) = 𝟏. 𝟐𝟒𝟒
𝐿𝑒𝑡 𝑛 = 1,
ℎ ℎ
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + (𝑥 , 𝑦 ′)
2 2
0.2 0.2
= 1.244 + (0.2)𝑓(0.2 + , 1.244 + ((𝟎. 𝟐)𝟐 + (𝟏. 𝟐𝟒𝟒)𝟐 ))
2 2
= 1.244 + (0.2)𝑓(0.3,1.4028)
𝑦 = 1.6556
𝒚𝟐 = 𝒚(𝟎. 𝟒) = 𝟏. 𝟔𝟓𝟓𝟔
dy
5. Evaluate y at x 0.2 given y x 2 1, y (0) 0.5 using modified Euler’s method.
dx
Solution:
𝑑𝑦
= y − 𝑥 + 1, 𝑥 = 0, 𝑦 = 0.5 , ℎ = 0.2
𝑑𝑥
By Euler algorithm
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + ℎ(𝑥 , 𝑦 ′)
2 2
96
𝐿𝑒𝑡𝑛 = 0
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + ℎ(𝑥 , 𝑦 ′)
2 2
0.2 0.2
= 0.5 + (0.2)𝑓 0 + , 0.5 + (0,0.5)
2 2
𝑓(𝑥 , 𝑦 ) = 𝑦 − 𝑥 + 1, f(0,0.5) = 0.5 + 0 + 1 = 1.5
𝒚(𝟎. 𝟐) = 𝟎. 𝟖𝟐𝟖
𝒅𝒚
6. Apply Modified Euler’s method to find 𝒚(𝟎. 𝟏) and 𝒚(𝟎. 𝟐) given that = 𝒙𝟐 + 𝒚𝟐 , 𝒚(𝟎) = 𝟏
𝒅𝒙
Solution:
𝑥 = 0, 𝑦 = 1, ℎ = 0.1
By Euler algorithm
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + ℎ(𝑥 , 𝑦 ′)
2 2
𝐿𝑒𝑡 𝑛 = 0
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + ℎ(𝑥 , 𝑦 ′)
2 2
0.1 0.1
= 1 + (0.1)𝑓(0 + ,1 + (𝟏 + 𝟎))
2 2
= 1 + (0.1)𝑓(0.05,1.05)
= 1 + (0.1)(1.105)
= 1.1105
97
𝑦 = 1.1105
𝒚𝟏 = 𝒚(𝟎. 𝟏) = 𝟏. 𝟏𝟏𝟎𝟓
𝐿𝑒𝑡 𝑛 = 1,
ℎ 1
𝑦 = 𝑦 + ℎ𝑓(𝑥 + , 𝑦 + ℎ(𝑥 , 𝑦 ′)
2 2
0.1 0.1
= 1.1105 + (0.1)𝑓(0.1 + , 1.1105 + ((𝟎. 𝟐)𝟐 + (𝟏. 𝟏𝟏𝟎𝟓)𝟐 ))
2 2
= 1.1105 + (0.1)𝑓(0.15,1.27321)
𝑦 = 1.2749
𝒚𝟐 = 𝒚(𝟎. 𝟐) = 𝟏. 𝟐𝟕𝟒𝟗
𝒅𝒚
7. Use Runge-Kutta method of order 4 to find y(1.1) given = 𝒚𝟐 + 𝒙𝒚, 𝒚(𝟏) = 𝟏,
𝒅𝒙
Solution:
𝒅𝒚
Given = 𝒚𝟐 + 𝒙𝒚 , 𝑥 = 1, 𝑦 = 1and ℎ = 0. 1
𝒅𝒙
By Runge-kutta method
𝒌𝟏 = 𝒉𝒇(𝒙𝟎 , 𝒚𝟎 )
= (0.1)𝑓(1,1)
= (0.1)(11 + 1)
𝑘 = 0.2
𝒉 𝒌𝟏
𝒌𝟐 = 𝒉𝒇 𝒙𝟎 + , 𝒚𝟎 +
𝟐 𝟐
0.1 0.2
= (0.1)𝑓 1 + ,1 +
2 2
= (0.1)𝑓(1.05,1.1)
𝑘 = 0.2365
𝒉 𝒌𝟐
𝒌𝟑 = 𝒉𝒇 𝒙𝟎 + , 𝒚𝟎 +
𝟐 𝟐
0.1 0.2365
= (0.1)𝑓 1 + ,1 +
2 2
98
= (0.1)𝑓(1.05,1.118)
𝑘 = 0.2423
𝒌𝟒 = 𝒉𝒇(𝒙𝟎 + 𝒉, 𝒚𝟎 + 𝒌𝟑 )
= (0.1)𝑓(1 + 0.1,1 + 0.2423)
= (0.1)𝑓(1.1,1.12423)
𝑘 = 0.2909
𝟏
∆𝒚 = (𝒌 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 )
𝟔 𝟏
1
= (0.2 + 2(0.0.2365) + 2(0.2423) + 0.2909)
6
∆𝑦 = 0.2414
𝑦 = 𝑦 + ∆𝑦
= 1 + 0.2414
𝒚(𝟏. 𝟎𝟓) = 𝟏. 𝟐𝟒𝟏𝟒
To find y(1.1):
Here 𝑥 = 1.05, 𝑦 = 1.2414and ℎ = 0.1
𝒌𝟏 = 𝒉𝒇(𝒙𝟏 , 𝒚𝟏 )
= (0.1)𝑓(1.05,1.2414)
= (0.1)(2.84454)
𝑘 = 0.28445
𝒉 𝒌𝟏
𝒌𝟐 = 𝒉𝒇 𝒙𝟏 + , 𝒚𝟏 +
𝟐 𝟐
0.1 0.28445
= (0.1)𝑓 1.05 + , 1.2414 +
2 2
= (0.1)𝑓(1.1,1.3836)
𝑘 = 0.27133
𝒉 𝒌𝟐
𝒌𝟑 = 𝒉𝒇 𝒙𝟏 + , 𝒚𝟏 +
𝟐 𝟐
0.1 0.27133
= (0.1)𝑓 1.05 + , 1.2414 +
2 2
= (0.1)𝑓(1.1,1.37706)
𝑘 = 0.34110
𝒌𝟒 = 𝒉𝒇(𝒙𝟏 + 𝒉, 𝒚𝟏 + 𝒌𝟑 )
= (0.1)𝑓(1.05 + 0.1,1.2421 + 0.34110)
= (0.1)𝑓(1.15,1.5825)
𝑘 = 0.43241
99
𝟏
∆𝒚 = (𝒌 + 𝟐𝒌𝟐 + 𝟐𝒌𝟑 + 𝒌𝟒 )
𝟔 𝟏
1
= (0.2844 + 2(0.27133) + 2(0.34110) + 0.43241)
6
∆𝑦 = 0.3236016
𝑦 = 𝑦 + ∆𝑦
= 1.2414 + 0.3236016
𝑦(1.1) = 1.565001
𝒅𝒚 𝟏 𝒙 𝟐 𝒚𝟐
Given = , 𝒚(𝟎) = 𝟏 , 𝒚(𝟎. 𝟏) = 𝟏. 𝟎𝟔, 𝒚(𝟎. 𝟐) = 𝟏. 𝟏𝟐 𝒂𝒏𝒅 𝒚(𝟎. 𝟑) = 𝟏. 𝟐𝟏
𝒅𝒙 𝟐
Solution:
𝟒𝒉
𝒚𝒏 𝟏, 𝒑 = 𝒚𝒏 𝟑 + [𝟐𝒚 𝒏 𝟐 −𝒚 𝒏 𝟏
+ 𝟐𝒚′𝒏 … … … … … … … … (1)
𝟑
𝑦 ,𝑝 = 𝑦 + [2𝑦 − 𝑦 + 2𝑦 ] … … … … … … … … … … … … (2)
1
𝑦 = (1 + 𝑥 )𝑦
2
1
= (1 + 𝑥 )𝑦
2
1
= [1 + (0.1) ](1.06)
2
𝑦 = 0.56742… … … … … … … … … .(3)
100
1
𝑦 = (1 + 𝑥 )𝑦
2
1
= [1 + (0.2) ](1.12)
2
1
= (1 + 0.04)(1.2544)
2
𝑦 = 0.6529 … … … … … … … … … … … … … (4)
1
𝑦 = (1 + 𝑥 )𝑦
2
1
= [1 + (0.3) ](1.21)
2
1
= [1 + 0.09](1.464)
2
𝑦 = 0.79793 … … … … … … … … … … … … (5)
4(0.1)
𝑦 , =1+ [2(0.56742) − 0.65229 + 2(0.79793)]
2
0.4
=1+ [1.13484 − 0.65229 + 1.56586]
3
= 1 + 0.27712
𝒚(𝟎. 𝟒) = 𝟏. 𝟐𝟕𝟕𝟏𝟐
𝒉
𝒚𝒏 𝟏 ,𝒄 = 𝒚𝒏 𝟏 + 𝒚 𝒏 𝟏
+ 𝟒𝒚 𝒏
+ 𝒚𝒏 𝟏
𝟑
𝑦 , = 𝑦 + (𝑦 + 4𝑦 + 𝑦 ) … … … …… … … …(6)
1
𝑦 = (1 + 𝑥 )𝑦
2
1
= [1 + (0.4) ](1.27712)
2
101
1
= (1 + 0.16)(1.63104)
2
1
= (1.16)(1.63104)
2
= 0.94600… … … … … … … … … … … … … (7)
0.1
𝑦 , = 1.12 + [0.65229 + 4(0.79793) + 0.94600]
3
0.1
= 1.12 + [4.79001]
3
= 1.12 + 0.159667
𝒚(𝟎. 𝟒) = 𝟏. 𝟐𝟕𝟗𝟔𝟔
Solution:
𝑦 , = 1.01897
2−𝑦 2 − (1.1897)
𝑦 = = = 0.0437
5𝑥 5(4.4)
102
By Mile’s corrector formula is
𝒉
𝒚𝟒, 𝒄 = 𝒚𝟐 + [𝒚 + 𝟒𝒚𝟑 + 𝒚𝟒 ]
𝟑 𝟐
0.1
𝑦 , = 1.0097 + [0.0467 + 4(0.0452 + 0.0437]
3
𝑦 , = 1.01874
4(0.1)
=1+ [2(1.3552) − 1.8535 + 2(2.6589)]
3
𝑦 , = 1.8233
𝑦 =𝑥 𝑦 +𝑦 = (0.4)(1.8233) + (1.8233) = 4.0537
By Mile’s corrector formula is
ℎ
𝑦 , = 𝑦 + [𝑦 + 4𝑦 + 𝑦 ]
3
0.1
𝑦 , = 1.2774 + [1.8535 + 4(2.6589) + 4.0537]
3
𝑦 , = 1.8165
𝒅𝒚
10. Using Runge-kutta method of fourth order, find y for 𝒙 = 𝟎. 𝟏, 𝟎. 𝟐, 𝟎. 𝟑 given that = 𝒙𝒚 +
𝒅𝒙
Given = 𝑥𝑦 + 𝑦 , 𝑥 = 0, 𝑦 = 1, ℎ = 0.1
By Runge –kutta method
𝑘 = ℎ𝑓(𝑥 , 𝑦 )
= (0.1)𝑓(0,1)
= (0.1)(𝟎 + 𝟏)
𝑘 = 0.1
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.1
= (0.1)𝑓 0 + ,1 +
2 2
= (0.1)𝑓(0.05,1.05)
= (0.1) (0.05)(1.05) + (1.05)
𝑘 = 0.1155
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.1155
= (0.1)𝑓 0 + ,1 +
2 2
= (0.1)𝑓(0.05,1.50775)
= (0.1) (0.05)(1.50775) + (1.50775)
𝑘 = 0.1172
𝑘 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘 )
= (0.1)𝑓(0 + 0.1,1 + 0.1172)
103
= (0.1)𝑓(0.1,1.4424)
= (0.1) (0.1)(1.4424) + (1.4424)
𝑘 = 0.1260
1
∆𝑦 = (𝑘 + 2𝑘 + 2𝑘 + 𝑘 )
6
1
= (0.1 + 2(0.1155) + 2(0.1172) + 0.1260)
6
∆𝑦 = 0.1152
𝑦 = 𝑦 + ∆𝑦
= 1 + 0.1152
𝒚(𝟎. 𝟏) = 𝟏. 𝟏𝟏𝟓𝟐
To find y(0.2):
Here 𝑥 = 0.1, 𝑦 = 1.1152
𝑘 = ℎ𝑓(𝑥 , 𝑦 )
= (0.1)𝑓(0.1,1.1152)
= (0.1) (0.1)(1.1152) + (1.1152)
𝑘 = 0.1255
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.1255
= (0.1)𝑓 0.1 + , 1.1152 +
2 2
= (0.1)𝑓(0.05,1.1780)
= (0.1) (0.05)(1.1780) + (1.1780)
𝑘 = 0.1355
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.1355
= (0.1)𝑓 0.1 + ,1 +
2 2
= (0.2)𝑓(0.05,1.1355)
= (0.1) (0.05)(1.1355) + (1.1355)
𝑘 = 0.1577
𝑘 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘 )
= (0.1)𝑓(0.1 + 0.1,1.1152 + 0.1577)
= (0.1)𝑓(0.2,1.2729)
= (0.1) (0.2)(1.2729) + (1.2729)
𝑘 = 0.1875
1
∆𝑦 = (𝑘 + 2𝑘 + 2𝑘 + 𝑘 )
6
1
= (0.1255 + 2(0.1355) + 2(0.1577) + 0.1875)
6
∆𝑦 = 0.1499
𝑦 = 𝑦 + ∆𝑦
= 11152 + 0.1499
𝒚(𝟎. 𝟐) = 𝟏. 𝟐𝟔𝟓𝟏
104
To find y(0.3):
Here 𝑥 = 0.2, 𝑦 = 1.2651
𝑘 = ℎ𝑓(𝑥 , 𝑦 )
= (0.1)𝑓(0.2,1.2651)
= (0.1) (0.2)(1.2651) + (1.2651)
𝑘 = 0.1853
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.1
= (0.1)𝑓 0.2 + , 1.2651 +
2 2
= (0.1)𝑓(0.25,1.3578)
= (0.1) (0.25)(1.3578) + (1.3578)
𝑘 = 0.2183
ℎ 𝑘
𝑘 = ℎ𝑓 𝑥 + , 𝑦 +
2 2
0.1 0.2183
= (0.1)𝑓 0.2 + , 1.2651 +
2 2
= (0.1)𝑓(0.25,1.3742)
= (0.1) (0.25)(1.3742) + (1.3742)
𝑘 = 0.2232
𝑘 = ℎ𝑓(𝑥 + ℎ, 𝑦 + 𝑘 )
= (0.1)𝑓(0.2 + 0.1,1.2651 + 0.2232)
= (0.1)𝑓(0.3,1.4883)
= (0.1) (0.1)(1.4883) + (1.4883)
𝑘 = 0.2662
1
∆𝑦 = (𝑘 + 2𝑘 + 2𝑘 + 𝑘 )
6
1
= (0.1853 + 2(0.2183) + 2(0.2232) + 0.2662)
6
∆𝑦 = 0.2224
𝑦 = 𝑦 + ∆𝑦
= 1.2651 + 0.2224
𝑦(0.3) = 1.4875
𝑥 = 0, 𝑥 = 0.1, 𝑥 = 0.2, 𝑥 = 0.3, 𝑥 = 0.4
𝑦 = 1, 𝑦 = 1.1152, 𝑦 = 1.2651, 𝑦 = 1.4875, 𝑦 =?
𝑦′ = 𝑥𝑦 + 𝑦
𝑦 = 𝑥 𝑦 + 𝑦 𝟐 = (0)(1) + (1)𝟐 = 𝟏
𝑦 = 𝑥 𝑦 + 𝑦 𝟐 = (0.1)(1.1152) + (1.1152)𝟐 = 1.3552
𝑦 = 𝑥 𝑦 + 𝑦 𝟐 = (0.2)(1.2651) + (1.2651)𝟐 = 1.8535
𝑦 = 𝑥 𝑦 + 𝑦 𝟐 = (0.3)(1.4875) + (1.4875)𝟐 = 2.6589
By Mile’s predictor formula is
𝟒𝒉
𝒚𝟒, 𝒑 = 𝒚𝟎 + [𝟐𝒚𝟏 − 𝒚𝟐 + 𝟐𝒚𝟑 ]
𝟑
4(0.1)
𝑦 , =1+ [2(1.3552) − 1.8535 + 2(2.6589)]
3
𝑦 , = 1.8233
105
𝑦 = 𝑥 𝑦 + 𝑦 𝟐 = (0.4)(1.8233) + (1.8233)𝟐 = 4.0537
By Mile’s corrector formula is
𝒉
𝒚𝟒, 𝒄 = 𝒚𝟐 + [𝒚𝟐 + 𝟒𝒚𝟑 + 𝒚𝟒 ]
𝟑
0.1
𝑦 , = 1.2651 + [1.8535 + 4(2.6589) + 4.0537]
3
𝑦 , = 1.8165
106