Numerical Methods 2024/5: Individual Project
Individual project F
• This work will count for 50% of your final mark for Numerical Methods.
• You must answer the question assigned to you . No marks will be awarded for answering other questions.
• The mark breakdown is as follows .
Analysis 60
Implementation & testing 20
Good programming practice 15
Overall presentation 5
Total 100
• The work does not require the use of external sources; any sources you do use (aside from the course materials) must be properly cited.
• Store all files on One Drive or the M drive to protect against loss.
• Save your Maple work regularly. Executing incorrect codes may cause Maple to become trapped in an infinite loop. If this happens, you can try pressing the interrupt button (①), but you may be forced to close the application and reload your work.
• There is no requirement to type your analytical work; scans of handwritten work are equally acceptable provided they are properly organised and readable.
• Submit work as a single pdf file. See the project guidance notes for instructions on merging and rearranging pdf files.
• Your final submission must include a pdf export of your Maple worksheet. If you work the numerical calculations into a report (e.g. by copying parts into MS Word and adding appropriate explanations), you still need to include the Maple worksheet; just add it as an appendix at the end.
• Invalid submissions (e.g. files in formats other than pdf) will be deleted. Students who make invalid submissions will be given another chance to submit, but this will be treated as late, and subject to standard university penalties (5% deduction for each day, and a mark of zero after five days) .
The Cn quadrature rule for the interval [-1, 1] uses the points at which Tn-1 (t) = ±1 as its nodes (here Tn-1 is the Chebyshev polynomial of degree n - 1) . The C3 rule is just Simpson’s rule because T2 (t) = 2t2 - 1.
(a) (i) Find the nodes and weights for the C5 quadrature rule.
(ii) Determine the first nonzero coefficient Sj for the C5 rule.
(iii) If the C5 rule and the five-point Newton–Cotes rule are applied on the same number of
subintervals, what approximate relationship do you expect the two errors to satisfy?
(iv) Suppose that the C5 rule has been applied on N subintervals, and that all of the function evaluations have been stored. How many new function evaluations are required to apply the C9 rule on the same set of subintervals? Justify your answer .
(b) Consider the approximation
where tq and wq are the nodes and weights for the Cn quadrature rule. Assume that n is odd, and let k = (n - 1)/2 .
(i) Set g(t) = T2j(t), and then make the substitution t = cos θ to evaluate the integral. Hence show that
(ii) Consider the operator
It can be shown (proof: exercise for fun) that
Apply Sk to the result of part (i) and hence show that
This result should agree with your calculation from part (a) .
(c) (i) Write a Maple procedure that takes as its arguments a function f , real numbers a and b and a number of subintervals, N . As its result, it should return the approximate value of
calculated using the C5 rule.
(ii) Test your procedure using
and N = 10. Calculate a second estimate using the five-point Newton–Cotes rule, also with N = 10 . Verify that the ratio of the errors is in agreement with your theoretical prediction from part (a) .
(iii) Repeat the calculations from part (ii) using a second integral chosen arbitrarily. Do not use a polynomial for f (x), but make sure there is no possibility of division by zero etc.
The numerical methods package provides a five point Newton–Cotes procedure; you can also download the procedure code from Canvas (five_pt_NC. mw, in the quadrature section) .