Assignment 1
Assignment 1
Part A
1. Determine the real root of
f ( x )=−25+82 x −90 x2 + 44 x 3−8 x 4 +0.7 x 5
(a) Graphically
(b) Using the bisection method. Employ initial guesses of x l=0.5 and xu=1.0 . Iterate until
the approximate relative error after each iteration falls below a stopping criterion of
10 %.
(c) Perform the same calculation as in (b) but use the false-position method and a
stopping criterion of 5 %.
(d) Plot the answers obtained in (b) and (c) on a single graph (you may use EXCEL to plot
it).
(2 marks)
3. Water is flowing in a trapezoid channel at a rate of Q = 20 m 3/s. The critical depth y for
such a channel must satisfy the equation
Q2
0=1− B
g A 3c
1/2
Assignment 1:KIL1005 Semester 2, 2019/2020
where g = 9.81 m/s2, Ac = the cross-sectional area (m 2) and B = the width of the channel
at the surface (m). For this case, the width and the cross-sectional area can be related to
depth y by:
B=3+ y
y2
Ac =3 y +
2
Solve for the critical depth using
(a) The graphically method
(b) Bisection method. Employ initial guesses of xl=0.5 and xu=2.5 . Iterate until the
approximate relative error after each iteration falls below a stopping criterion of 10
%.
(c) False-position method. Employ the same parameters as in (b).
(d) Plot the answers obtained in (b) and (c) on a single graph (you may use EXCEL to plot
it).
(3 marks)
PART B
Redo all the questions in Part A using MATLAB. In this part, the students need to copy and
paste the MATLAB programme that they have used to solve each question. For each
question, only do (b) and (c).
(3 marks)
END
2/2