Numerical Assignment
Numerical Assignment
Instructions:
(a) Answer all the questions and show all the workings for which you wish to receive credit.
(b) Write all the solutions using PEN.
(c) Prepare all the computations in FOUR decimal places.
(d) DEADLINE: 27 March 2018 (Tuesday) before 12 noon. The deadline is final and no
extension is allowed. Delay in submission of the assignment will delay the marking process. Thus
a penalty of 5 marks per day will be imposed for late submission of assignment.
(e) WARNING: Penalty will be applied if plagiarism is found in the assignment.
Questions:
dy
= u2 − xy − x2 , y(5) = 3
dx
du
= xu − y 2 + 3x, u(5) = 2
dx
(a) Apply Euler method to approximate y and u for 5.001 ≤ x ≤ 5.003 with 4x = 0.001.
(12 marks)
(b) Apply Adams-Bashforth/Adams-Moulton method to approximate y(5.004) and u(5.004) with
the result in part (a) and 4x = 0.001. (18 marks)
Ans.
(a) f (x, y, u) = u2 − xy − x2 , g(x, y, u) = xu − y 2 + 3x, x0 = 5, y0 = 3, u0 = 2
yn+1 = yn + hf (xn , yn , un ) = yn + 0.001(u2n − xn yn − x2n )
un+1 = un + hg(xn , yn , un ) = un + 0.001(xn un − yn2 + 3xn )
n = 0 : y1 = 2.964, u1 = 2.016
n = 1 : y2 = 2.9282, u2 = 2.0323
n = 2 : y3 = 2.8927, u3 = 2.0489
1
(b) f0 = −36, f1 = −35.7687, f2 = −35.5368, f3 = −35.3042
g0 = 16, g1 = 16.2997, g2 = 16.597, g3 = 16.8919
0.01
y4∗ = y3 + (55f3 − 59f2 + 37f1 − 9f0 ) = 2.85751
24
0.01
u∗4 = u3 + (55g3 − 59g2 + 37g1 − 9g0 ) = 2.06594
24
f4∗ = −35.0709
g4∗ = 17.1846
0.001
y4 = y3 + (9f4∗ + 19f3 − 5f2 + f1 ) = 2.85751 ≈ y(5.004)
24
0.001
u4 = u3 + (9g4∗ + 19g3 − 5g2 + g1 ) = 2.06594 ≈ u(5.004)
24
(b) Calculate the range and standard deviation of the data. (6 marks)
(c) Find the first quartile (Q1), third quartile (Q3) and interquartile (IQR) range of the data.
(6 marks)
(d) Construct its cumulative frequency distribution, cumulative relative frequency and cumula-
tive percentage. (4 marks)
(e) Convert the cumulative frequency distribution into a cumulative ”less than” and draw an
ogive for the data. (5 marks)
(f) Estimate from the ogive, the value of X, if 20% of the data values were greater than or equal
to X. (3 marks)
Ans.
114 + 110 + . . . + 94 + 91
(a) x = = 98.32
50
50 + 1
median term = th term = 25.5th term
2
95 + 95
median = = 95
2
mode = 88
2
50 + 1
(c) Q1 term= th term = 13th term
4
Q1 = 88
3(50 + 1)
Q3 term= th term = 38th term
4
Q3 = 110
IQR = 110 − 88 = 22
(d)
100 − 20
(f) for value of X or more, cf = × 50 = 40
100
From the ogive in part (e), X = 112
[Total: 60 marks]