首页 > > 详细

辅导MATH266-Assignment 2辅导asp、数据结构解析

MATH266 Assignment 2
• This work will count for 5% of your overall mark for MATH266.
• In view of the coronavirus outbreak, this work is to be completed and
uploaded to Vital individually.
• A total of 100 marks is available, including up to 10 for a well presented
write up.
• Your work must be submitted to Vital by 5pm on Friday 08 May.
• Maple work must be in Maple Notation (not 2D Math Notation), and
should conform to the style guidelines in §1.13.
• Each student must submit a Maple worksheet converted to pdf. Ana-
lytical work can be written by hand and scanned or typed; this must also
be uploaded as a single pdf file.
• Screenshots, .mw files and scans of individual pages are not acceptable.
• Make sure you read the instructions for online submission (which you
can find on Vital) before uploading.
• If there are problems with your submission (e.g. 2D Math Notation,
illegible pages, screenshots used, incorrect file format, etc.) then you
will be given another chance to submit, but the work will be treated as
late, and the standard university penalty (5% deduction per day for up
to 5 days, followed by a mark of zero) will apply.
Throughout this assignment, use the Lagrange interpolation formula with
indices starting from 1; that is
P (x) =
n∑
j=1
yjLj(x).
with
Lj(x) =
n∏
q=1
q 6=j
x− xq
xj − xq .
Set Digits to 16 for all Maple work. When you need an accurate value for an
integral for comparison with your own results, use
evalf[32]( Int( f( x ) , x = a .. b ) )
for appropriately defined f , a and b.
1. Let f(t) be an arbitrary function, define fj = f(tj) and let P (t) be the
quadratic polynomial such that P (tj) = fj, for j = 1, 2 and 3.
(a) Let L1, L2 and L3 be the three polynomials used in constructing
P (t) via the Lagrange formula. Calculate the integrals
wj =
∫ 1
−1
Lj(t) dt,
for j = 1, 2 and 3.
(b) Express the integral
I˜ =
∫ 1
−1
P (t) dt
in terms of wj. By making appropriate choices for the nodes tj,
obtain Simpson’s rule for the interval [−1, 1].
(c) State the main advantage and the main disadvantage of this method
for deriving quadrature formulae, as compared to the method based
on Taylor series used in the lecture notes.
[20 marks]
2. The C3 quadrature rule is obtained by placing the nodes at the roots of
the Chebyshev polynomial T3(t).
(a) What do you think is the motivation for placing the nodes in this
way?
(b) Calculate the weights for the C3 rule, using the method from ques-
tion 1 and again using the method from the lecture notes. Also
calculate the first nonzero term in the error formula.
(c) If the C3 rule and Simpson’s rule are used on the same number of
subintervals, what will be the approximate ratio of the error in the
C3 rule to the error in Simpson’s rule? Justify your answer.
(d) A fair comparison is to use the C3 rule on N subintervals (for
even N) and Simpson’s rule on 3N/2 subintervals. What will be
the approximate ratio of the error in the C3 rule to the error in
Simpson’s rule in this case? Justify your answer.
[25 marks]
3. Write a Maple procedure that implements the C3 rule. The procedure
should take as its arguments a function f , lower and upper bounds a
and b and the number of subintervals N , and return as its result the
approximate value of the integral I. [15 marks]
4. Choose three arbitrary, definite integrals, and denote them by I1, I2 and
I3. Do not use polynomials (or anything else that is easy to integrate
exactly), but make sure there is no possibility of division by zero, etc.
(a) Approximate each of your integrals using
(i) C3 quadrature procedure with 100 subintervals,
(ii) Simpson’s rule with 100 subintervals,
(iii) Simpson’s rule with 150 subintervals.
(b) For each of your three integrals, calculate the relative error when
Simpson’s rule is used with 100 subintervals (ε(100)S ), and with 150
subintervals (ε(150)S ). Also calculate the relative error when C3
quadrature is used with 100 subintervals (ε(100)C3 ). Include a table in
your submission with rows and columns as shown below. Fill in the
entries using your results (3 s.f. is sufficient).

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!