Professional Documents
Culture Documents
FINAL CPB20203 JAN 2022 (Question)
FINAL CPB20203 JAN 2022 (Question)
INSTRUCTIONS:
(a) the bisection method. Start with 𝑎 = 0 and 𝑏 = 1, and carry out the first five iterations
(until 𝑥 ).
(10 marks)
(b) the secant method. Start with the two points, 𝑥 = 0 , and 𝑥 = 1, and carry out the
first five iterations (until 𝑥 ).
(10 marks)
(c) Newton Raphson’s method. Start at 𝑥 = 0, and carry out the first five iterations (until
𝑥 ).
(5 marks)
Solve the following system of equations with the Gauss elimination method.
4𝑥 + 3𝑥 + 2𝑥 + 𝑥 = 1
3𝑥 + 4𝑥 + 3𝑥 + 2𝑥 = 1
2𝑥 + 3𝑥 + 4𝑥 + 3𝑥 = −1
𝑥 + 2𝑥 + 3𝑥 + 4𝑥 = −1
(25 marks)
𝑥 -7 -5 -1 0 2 5 6
𝑦 15 12 5 2 0 -5 -9
Use the linear least-squares regression to evaluate the coefficients 𝑚 and 𝑏 in the
function 𝑦 = 𝑚𝑥 + 𝑏 that best fits the data.
(13 marks)
(b) The following data shows the population (in millions) of a country in selected years
between 1980 and 2005.
Calculate the rate growth of the population in millions per year for 2005 using:
𝐼= sin 𝑥 𝑑𝑥
i. Simpson’s 1/3 method. Divide the whole interval into six subintervals.
(8 marks)
ii. Simpson’s 3/8 method. Divide the whole interval into six subintervals.
(8 marks)
ii. If given that the analytical solution of the ODE is 𝑦 = 𝑥 − 𝑒 + 2, calculate the
percent relative error between the analytical and numerical solutions for each
of the step in question (i).
(3 marks)