MATH3049 SP25 -无代写
时间:2025-04-09
MATH3049 SP25 CW1
School of Mathematical Sciences
A Level 3 Module Spring 2024/25
Scientific Computation and Numerical Analysis
Instructions:
This coursework is due by 23:00 on Wednesday, April 16, 2025. This coursework is
worth 20% of your final mark in this module. You should submit a single zip folder
named ’your student ID number_your name’ with your codes and solutions. A penalty
may be applied to your mark in this coursework for not following these instructions.
The standard penalties for late submission of coursework will be applied to coursework
that is submitted after the submission deadline. Coursework submitted more than 1
week after the submission deadline will receive a mark of 0. You will not be penalised
for not including comments or explanations in your codes. You will not be penalised for
your code not being the most efficient, neat or concise provided that when your code
is opened in the Python editor the message indicator is green (no errors).
Prohibited resources
It is not permitted to use generative artificial intelligence (AI) software for this
coursework. Ensure that you have read and have understood the Policy on academic
misconduct. One of the things stated in this policy is that “The submission of work that
is generated and/or improved by software that is not permitted for that assessment,
for the purpose of gaining marks will be regarded as false authorship and seen as an
attempt to gain an unpermitted academic advantage”. This coursework should be your
own individual work, with the exceptions that you may copy from material provided on
the Moodle pages:
Sicientific Computation and Numerical Analysis (MATH3049 UNNC)
Introduction to Scientific Computation (MATH2033 UNNC)
Coding Environment
You should write and submit .py files. You are strongly encouraged to use the Spyder
IDE (integrated development environment). You should not write or submit an ipynb
file and so you should not use Jupyter Notebook.
MATH3049 SP25 CW1
1 MATH3049
1. Initial-value problems for ODEs and systems of ODEs
(a) Consider a finite difference method
+1 = (ℎ+1 + (0 + −1−1 + −2−2 + −3−3 +…)) (1)
to find numerical solutions of an initial-value problem
′() = (, ()), (0) = 0.
i) Find such values of the coefficients in (1) that corresponds to the global
orders of the method 1, 2, 3.
[10 marks]
ii) Determine whether the method (1) of order 3 is zero stable.
[5 marks]
iii) Apply the method (1) of order 3 to the test problem ′ = with < 0,
obtain the characteristic equation for the amplification factor defined by
+1 = and determine the range for ℎ so the method is stable and
obtain the stability interval. Explain why the method is not A-stable.
[5 marks]
iv) Write a Python code that plots the stability domains for the method (1) of
order 2 and order 3.
[5 marks]
(b) Consider the initial-value problem
″ + ′ + 1 = 0, (0) = 0, ′(0) = 1. (2)
For each of the following methods, write a Python code that computes the
numerical solution, prints out a table with mesh points, values of the
approximate solution and the true solution as well as errors at each mesh
point for each mesh size ℎ. The code must plot the graphs of the approximate
solutions, the true solution and the errors for each mesh size.
i) The Euler explicit method from = 0 to = 1 for = 0.01 with ℎ = 0.01,
ℎ = 0.02 and ℎ = 0.025. [5 marks]
ii) The method (1) of order 3 from = 0 to = 1 for = 0.01 with ℎ = 0.1.
Use the method (1) of order 1 and 2 to obtain starting values.
[5 marks]
iii) The Implicit Euler Predictor-Corrector method with the predictor step
given by the Explicit Euler method from = 0 to = 1 for = 0.01 with
ℎ = 0.1.
[5 marks]
iv) Explain the nature of the problem (2) and how the choice of methods
(i)-(iii) changes the numerical results. Prove each of your claims.
[10 marks]
Save your codes in question 1 as CW1_q1_your_name.py
Save your calculations in question 1 as a part of CW1_solutions_your_name.pdf
2 MATH3049
2. Boundary-value problems for ODEs
(a) Consider the boundary-value problem
″ + 5′ + 4 = 1, (0) = 0, (1) − 0.5′(1) = 0.5 (3)
i) Explain why the shooting method applied to the problem (3) gives a
representation of the solution in the form
() = 11() + 22().
Describe how to determine 1() and 2() and how to find the constants
1, 2.
[5 marks]
ii) Write a Python code to solve the problem (3) by the shooting method
using the Explicit Euler method and part (i) with ℎ = 0.125 and ℎ = 0.0625.
[5 marks]
iii) Do not use the principle of superposition (i) but the secant method and
explain how to solve the problem (3). Justify all of your claims.
[5 marks]
iv) Write a Python code to solve the problem (3) by the shooting method
using the fourth-order Runge Kutta method and the secant method.
[10 marks]
(b) Consider the nonlinear boundary-value problem
″ + 2′ = 4 + 43, (1) = 2, (2) = 4.5 (4)
with the exact solution
() = 2 +
1

i) Use the mesh size ℎ = 0.25 and central difference approximations to the
derivatives to discretize the problem. Linearize the obtained equation by
lagging all nonlinear coefficients, that is
″ → (″)(+1), ′ → (′)(+1) and the coefficient (2) → (2)().
For the initial approximation of (), (0)(), assume a linear variation
between the boundary values
(0)() = −0.5 + 2.5.
Write down the system of linear algebraic equations for (1)() in the
matrix form. [5 marks]
ii) Write a Python code to implement the method described in (i) that plots a
table with mesh points, iteration numbers, the values of the approximate
solution and the errors at each mesh points. Determine the number of
iterations which is required to satisfy the convergence criterion
|(+1) −
()
| < 0.000001
[10 marks]
Turn Over
3 MATH3049
(c) i) Use finite difference approximations with ℎ = 0.25 to estimate the first
three eigenvalues of the problem
″ + ′ + = 0, (0) = (1) = 0 (5)
[5 marks]
ii) Write a Python code to approximate the first 10 eigenvalues of the
problem (5). [5 marks]
Save your codes in question 2 as CW1_pw_your_name.py
Save your calculations in the question Q2 as a part of
CW1_solutions_your_name.pdf
End

学霸联盟
essay、essay代写