MATH3201-MATH3201 Scientific Computing: Advanced Techniques & Applications代写-Assignment 1
时间:2023-03-17
MATH3201-7231, Sem 1, 2023
Due 24 March 2023
Assignment 1: Taylor series, Numerical differentiation,
Linear systems of equations
Section One: Missile Command
For ease of exploration, we will assume that we are able to react to missiles instantaneously.
In this universe, anti-missile defense continues to work across the whole trajectory. You are given
a set of 11 points on the 2-D grid where missiles are expected to be at some fixed time.
x 0 0.5 1.0 1.5 2
f(x) 5.3459 4.0893 7.2103 6.7440 7.6762
2.5 3.0 3.5 4.0 4.5 5.0
7.5041 10.0007 8.1126 9.7501 11.7673 13.1599
(10 marks)1. (a) You are informed that the point (x5, f5) is a high priority target, so it is of paramount
importance that you shoot down the incoming missile at that point. Knowing that you are
limited to linear intervention, you decide to find a line in direct route to the target missile.
Assume you know the derivative at this point and write out the first-order Taylor expansion
around (x5, f5).
(b) What is the order of error of this approximation at the second-highest priority target,
(x8, f8)?
(10 marks) 2. (a) Your science officer tells you that upgrades are available for your tech. In order to cali-
brate these upgrades, you need to approximate the derivative at the points (x2, f2), . . . , (x10, f10).
Choose a finite-difference method to calculate the derivative and justify your choice using
the error of the method.
(b) Approximate the derivative using your method of choice from (a). Plot this approx-
imation on a graph. Don’t forget to label your axes and title.
(20 marks) 3. You are told that you can find the best line through all the missiles by solving the following
linear system. (We will go into why this is true in later sections of the course.)(
11 27.5
27.5 96.25
)(
x1
x2
)
=
(
91.36
269.6326
)
(a) Calculate the condition number of A, with respect to the 1-norm, by using the MATLAB
command cond.
(b) Solve the system using the rref command in MATLAB.
(c) Calculate the relative residual of this solution, with respect to the 1-norm.
(d) Use (a) and (c) to calculate the upper bound on the relative error, with respect to
the 1-norm, for the solution from (b). How confident are you in your solution?
(15 marks) 4. MATH7231 ONLY
(a) Suppose you have a blast radius of 1 around your line. List the points that you can
guarantee will be within this blast radius. Justify your answer.
(b) Is there any way you can shoot all the points?
Section Two: The Batman
You are a scientist studying the effects of chaos on the batman.
(10 marks) 1. (a) Read-in the 2-D data (X, Y ) provided to you on blackboard in the batman.mat by running
the following line in your script file. Plot the set of points (X, Y ) using a circle point marker
at marker size 20.
load(’batman.mat’}
(b) Apply the matrix,
A =
(
2 1
1 1
)
to the set of (X, Y ) coordinates. On the same plot from (a), plot this set of transformed
points using a circle point marker at marker size 20. What happened?
(10 marks) 2. Perform LU factorization on the matrix A. Use this solution to determine whether A is
invertible and justify your answer.
2
(10 marks) 3. (a) Calculate the condition number of A using the MATLAB function cond with respect to
the 2-norm.
(b) Run the following line of code to get the eigenvalues of A
lambda = eig(A)
and calculate the ratio of the largest to the smallest value of lambda. What does your re-
sult tell you about the eigenvalues given your knowledge of the geometric definition of the
condition number of A?
(c) Is the result you obtain from (b) true for all matrices A? Justify your reasoning.
(20 marks) 4. Using your LU factorization, perform forward and backward substitution to solve the system,(
2 1
1 1
)(
x1
x2
)
=
(
3
2
)
3
essay、essay代写