Fill This Form To Receive Instant Help
Homework answers / question archive / Exam Cover Sheet Module Code: KC5000 Module Title: Further Computational Mathematics Component: 2 Module Tutor: Dr Matteo Sommacal and Dr Thibault Congy Distributed on: 13/05/2022, 09:30AM Length of Exam: 24 hours Weighting: 70% Word Limit: None Date and time of Submission: 14/05/2022, 09:30AM Number of pages: Unlimited Additional Notes: • Submit a single pdf or docx file • Only one submission is allowed
Exam Cover Sheet Module Code: KC5000 Module Title: Further Computational Mathematics Component: 2 Module Tutor: Dr Matteo Sommacal and Dr Thibault Congy Distributed on: 13/05/2022, 09:30AM Length of Exam: 24 hours Weighting: 70% Word Limit: None Date and time of Submission: 14/05/2022, 09:30AM Number of pages: Unlimited Additional Notes: • Submit a single pdf or docx file • Only one submission is allowed. Additional submissions to improve readability or errors will be allowed in a case-by-case basis • Please declare the total number of pages at the top of your first page • Please read carefully the assessment cover It is your responsibility to ensure that your exam answer arrives before the submission deadline stated above. Electronic Management of Assessment (EMA): Your answer to this exam will be submitted electronically via Blackboard Test. Submissions by e-mail to the module tutor will not be accepted. Guidance to submit assignments is detailed in the module’s ELP. Instructions You have a 24 hours window from the release of the assessment to submit your answer. You can use your textbooks and study materials (e.g. lecture notes, seminar preparation) in answering the assessment questions, but to avoid plagiarism you should reference all quotes (see Academic Misconduct below). Should you encounter a problem please contact the module tutor (via email). Late submission of work An answer for an exam that is submitted after the published submission deadline as set out above, without approval, will be regarded as not having been completed. A mark of zero will be awarded for the assessment. The usual rule that applies to coursework and gives students a 10% penalty where work is submitted up to 24 hours after the published hand-in deadline does NOT apply here. Any assessment answer submitted after the deadline is an automatic fail. If you have technical problems and are unable to submit your exam answer, you should contact your module tutor, and provide details of the issue, as well as your completed answers, if your email is outside normal working hours. Academic Misconduct The Academic Regulations for Taught Awards (ARTA) states that students are expected to observe University regulations which define and proscribe cheating, plagiarism and other forms of academic misconduct. The University Academic Misconduct Policy is set out in the Regulations and Procedures applying to cheating, plagiarism and other forms of academic misconduct and is available at: https://www.northumbria.ac.uk/about-us/university-services/academic-registry/quality-andteaching-excellence/assessment/guidance-for-students/. In submitting this assessment, you are agreeing with the following statement: ‘I have neither received nor given any unauthorized assistance on this assessment’. You are reminded that plagiarism, collusion and other forms of academic misconduct as referred to in the regulations and procedures are taken very seriously by the University. Exams in which evidence of plagiarism or other forms of academic misconduct is found may receive a mark of zero. Module Specific Assessment Criteria Guidance on assessment criteria will be available on your eLP site. EXAMINATION PAPER Module Title: Further Computational Mathematics Module Code: KC5000 Module Tutor: Dr Matteo Sommacal, Dr Thibault Congy Examination set by: Dr Matteo Sommacal, Dr Thibault Congy Academic Year: 2021–2022 Month: May Time Allowed: See instructions on the main cover INSTRUCTIONS TO CANDIDATES Please read carefully before you begin your examination This is a computer-based exam. There is ONE section in this exam paper. There are FIVE questions in this exam paper. Answer ALL questions. This examination is marked out of 100 marks. It is worth 70% of the total marks for this module. The submission is constituted of a single PDF or DOCX file, as per the instructions on the main cover. All the MATLAB codes and outputs have to be included in the single PDF or DOCX file and cannot be submitted separately. All the MATLAB codes (function, script files and instructions on the command window) written for generating the solutions have to be reported in the final submission. All the MATLAB functions, script files and sequences of instructions on the command window written for generating the solutions must include single-line and/or block comments (premised by the % sign), indicating the role and the function of all the variables utilised, and clearly explaining the meaning of each line or group of lines of commands and operations. The absence of comments in the MATLAB codes will result in halving the corresponding marks for the question, even if the codes are perfectly working. Academic and General Conduct: You should only answer the number of questions required above. If you answer more than this, your answers will be marked in the order they appear in your answer sheets, up to and including the required number. Any additional answers will not be marked. Please check your work to ensure you have answered the correct number of questions and they are clearly numbered. Please cross out any work that you do not wish the marker to consider. If you answer multiple times to the same question, without specifying which of these answers has to be used for marking, then the first of these answers appearing in your answer sheets will be marked, and the remaining ones will not be marked. You must abide by the university’s regulations on academic conduct. Formal inquiry proceedings will be instigated if there is any suspicion of misconduct or plagiarism in your work. Q1. Let A x = b, with A = ? ? 3 1 −1 4 2 7 1 −8 6 ? ? , and b = ? ? 1 2 3 ? ? , be a system of linear equations in R 3 . Let B be the iteration matrix corresponding to the preconditioner P for the Gauss-Seidel method, B = P −1 P − A , where P = L ≡ L(A) is the lower triangular matrix L(A) containing the elements in the lower triangular part of A. (a) Verify that A is not strictly diagonally dominant. Find the corresponding iteration matrix B. Compute its spectrum Λ(B) and its spectral radius ρ(B) = max λ∈Λ(B) |λ| , inferring that the Gauss-Seidel method is not expected to converge. [2 marks] (b) Permutate the rows of A, so to obtain a strictly diagonally dominant matrix. Let A˜ be this new matrix obtained from A by permutating its rows. Find the iteration matrix B˜ for the new matrix A˜. For the iteration matrix B˜, compute the spectrum Λ(B˜) and the spectral radius ρ(B˜), showing that the corresponding Gauss-Seidel method is convergent. [3 marks] (c) Implement in MATLAB and apply the Gauss-Seidel iterative method with iterative matrix B˜, in the form x (k+1) = B x ˜ (k) + g , (where g is a constant vector to be determined) for solving the original linear system A x = b, with 1000 iterations, initial condition x (0) = (1, 1, 1)t , and stopping criterion given by the relative residual with tolerance ε = 10−12. Report on the exam paper your MATLAB code in full details, and the numerical solution in format long. Report also the number of iterations required by the algorithm to converge. [10 marks] [Total: 15 marks] May 2022 Page 1 of 5 KC5000 Further Comput. Maths. Q2. Consider the matrix function M(t) : R → R 3×3 defined as M(t) = ? ? 6 5 0 5 4 1 0 1 t ? ? . For an arbitrary diagonalisable matrix A (assumed to have all distinct eigenvalues, for the sake of simplicity), the power method returns the eigenvalue of A of maximum absolute value, along with its associated eigenvector (with unit norm, in Euclidean norm). Use the power method, with 106 iterations, tolerance 10−12 and x(0) = (1, 1, 1)t as initial guess for the eigenvector, to compute the largest modulus eigenvalue of M(t) and the 1-norm of the corresponding eigenvector for t ∈ [−20, 20], taking 2000 values of t in the interval [−20, 20]. Report on your exam paper a sketch of the plots of the largest modulus eigenvalue and of the 1-norm of the corresponding eigenvector as functions of t ∈ [−20, 20], as well as all the MATLAB instructions utilised (you do not need to include comments in the code of the power method). [Hint: it is better adding the ’.’ option in the plot commands to avoid joining points with segments in the plots.] [Total: 15 marks] May 2022 Page 2 of 5 KC5000 Further Comput. Maths. Q3. (a) Write and report in full details on your exam paper a MATLAB function file called rkbs that implements the four-stage Runge-Kutta method (known as the Bogacki-Shampine method) associated to the following Butcher array 0 1/2 1/2 3/4 0 3/4 1 2/9 1/3 4/9 7/24 1/4 1/3 1/8 for the generic one-dimensional Cauchy problem dy(t) dt = f (t, y(t)) y(t0) = y0 for t ∈ (t0, tend) ⊂ R , with y(t) : R → R and f(t, y) : R×R → R. The MATLAB function rkbs has to take as input the generic right-hand side f(t, y) of the ordinary differential equation, the initial condition y0 = y(t0), the range of the independent variable (t0, tend), and the number of intervals N in the range, and it has to return as output the column vectors with the values of the nodes tn = t0 + n ?t, n = 0, ..., N, for the independent variable t, and the approximation un of the function y(t) at the nodes tn. [10 marks] (b) Use the function rkbs defined above to integrate numerically the following Cauchy problem ? ? ? dy dt − y 2 + sin(t) = 0 y(0) = −1 for t ∈ [0, 5] , (1) with N = 103 discretization intervals in [0, 5]. Report on your exam paper a sketch of the function y(t) based on the numerical approximation. Use MATLAB to find, in format long, the position and the value of the first local maximum for t > 0. [10 marks] [Total: 20 marks] May 2022 Page 3 of 5 KC5000 Further Comput. Maths. Q4. Let the function y(t) be defined by means of the following Cauchy problem: ? ? ? y ′′(t) + 10 y ′ (t) + y(t) + sin(t) = 0 , for t ≥ 0 y(0) = 2 , y′ (0) = −1 . (2) (a) By means of the substitution: y1(t) = y(t), y2 = y ′ (t), transform the single second-order ordinary differential equation for y(t) in (2) into a system of two first-order ordinary differential equations for y1(t) and y2(t) of the form y ′ (t) = A y(t) + b(t), with y(t) = y1(t) y2(t) , A ∈ R 2×2 , and b(t) : R → R 2 . Report in your exam paper the matrix A and the vector function b(t). Show, by computing the eigenvalues of A, that the problem is stiff. [4 marks] (b) The forward (explicit) Euler method for solving (2) reads as follows: u (n+1) = u (n) + ?t f(n) = u (n) + ?t A u(n) + b , u(0) = y 0 , where u (n) is the approximation of y(t) at the nodes tn = n ?t, and ?t is the discretisation step. Find the value ?tc such that, if ?t < ?tc, then the forward Euler method for solving (2) numerically is absolutely stable. [4 marks] (c) Let Nc be the number of discretization intervals N in the interval t ∈ [0, tmax] such that tmax Nc ≥ ?tc and tmax Nc + 1 < ?tc , where ?tc is as computed above. For the Cauchy problem (2), find Nc for t in the interval t ∈ [0, 10]. Implement in MATLAB and use the forward (explicit) Euler method for solving numerically problem (2) in the interval t ∈ [0, 10] with N = Nc − 10, and N = Nc + 10 discretization intervals. In each case, report on your exam paper the approximation found, in format long, for y(10) = y1(10). [10 marks] (d) The forward Euler method is convergent with order 1 with respect to ?t. Implement in MATLAB a method of your choice which is convergent with order 2 with respect to ?t. Use this method for solving numerically problem (2) in the interval t ∈ [0, 10] with N = Nc + 10 where Nc is the value determined in the previous question. Report on your exam paper the approximation found, in format long, for y(10) = y1(10). [8 marks] (e) The exact solution of the Cauchy problem (2) is given by yexact(t) = 228 − 85√ 6 240 e −(5+2√ 6) t + 228 + 85√ 6 240 e −(5−2 √ 6) t + cost 10 . (3) Compute for each method the absolute error |y(10) − yexact(10)| where y(10) is the numerical approximation of the problem (2) obtained previously with N = Nc + 10. Report on your exam paper the absolute errors, in format long. Compare the two absolute errors and comment. [4 marks] [Total: 30 marks] May 2022 Page 4 of 5 KC5000 Further Comput. Maths. Q5. The following Dirichlet problem for the heat equation is given ∂u(x, t) ∂ t − µ ∂ 2u(x, t) ∂ x2 = 2 sin(x), x ∈ [0, 2π] , t > 0 , (4) u(0, t) = u(2π, t) = 0 , and u(x, 0) = u0(x) = sin(x), with µ = 1. (a) Show that u(x, t) = uexact(x, t) = (2 − e −t ) sin(x), (5) is the exact solution of (4). [4 marks] (b) Implement in MATLAB and use the θ-method to integrate equation (4). Compute the numerical solution for x ∈ [0, 2 π] and at t = 0.1, 200 space-integration intervals and 200 time-integration intervals, and for 21 values of θ in the interval θ ∈ [0, 1]. For each value of θ, use the numerical solution u(x, t) to find the absolute error m(θ) defined by m(θ) = max x∈[0,2π] |u(x, t) − uexact(x, t)| , at t = 0.1. Report on your exam paper a sketch of the plot of the error m(θ) as a function of θ. Report also on your exam paper all the MATLAB instructions utilised. [12 marks] (c) Using the numerical data obtained above for m(θ), find and report in format long the value of θ at which the absolute error is minimal. [4 marks] [Total: 20 marks] END OF EXAMINATION PAPER May 2022 Page 5 of 5 KC5000 Further Comput. Maths.