Numerical Methods 2024/5: Individual Project
• 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).
This question is concerned with quadrature rules of the form.
for nodes xq and weights wq. The nodes are positioned to achieve maximum accuracy. In your answer you may use the fact that
(a) (i) What is the sum of the weights for quadrature rules of this type? Explain your answer.
(ii) Assuming that the Maclaurin series
converges for all x, show that the absolute error in the quadrature rule is given by
(iii) Use your error formula to obtain a system of equations for the nodes and weights in the case n = 3. Use symmetry to simplify the system and then solve it.
(iv) Write down the system of equations for the case n = 5. Use symmetry to reduce the number of unknowns, but do not attempt to solve the system.
(b) It can be shown that the nodes for the n point rule are the roots of hn(x), a polynomial of degree n with the property that
This defines hn(x) up to a multiplicative constant, which can be fixed by requiring that
Note that this is similar to the case of Gaussian quadrature; to prove that the roots are the correct node locations, simply write
Q2n−1(x) = hn(x)An−1(x) + Bn−1(x),
and follow the argument from the lecture notes (you are not asked to include this proof).
(i) Determine h3(x). This is easier than it looks; use everything you know about h3.
(ii) Use integration by parts to determine the range of nonnegative integers r for which
and hence show that h
′
n+1(x) = knhn(x), for some constant kn.
(iii) Given that kn = 2(n + 1) (proof: exercise for fun), determine h5(x) from h3(x).
(iv) Show that, for the case n = 5,
(c) (i) Write a Maple procedure that takes as its argument a function f and returns two estimates of the integral
as its results. The first estimate must be computed using the three point rule from part (a) and the second using the five point rule from part (b).
(ii) Apply your procedure to the case
and compute the absolute errors in the two estimates.
(iii) Compute the above integral with Simpson’s rule, setting the integration limits to Determine (by experimentation) the minimum number of subin-tervals needed to produce a better result than the five point rule from part (b).