程序代写案例-M256
时间:2022-03-17
Specimen project question M256
This is a specimen project question. Each group project and each individual project will consist of
two questions with similar length and style. However, the topics will be different. In the group
and individual projects, both questions will have analytical components, but only one will
have an implementation (Maple) component.
Below we show one sample question with three sub-questions and Maple components.
Let G be a positive integer. This problem is concerned with the series
SG =
∞∑
j=0
(−1)j (1 + j)−h, with h = 1 + (1 +G)−1.
(a) (i) Write a procedure that takes as its arguments the parameter G and a positive number
δ. The procedure should sum the series SG using a do loop, stopping when
(2 + n)−h <
∣∣∣(SG)n∣∣∣× δ,
where (SG)n is the partial sum up to j = n (so the left-hand side is the first term
neglected). It should return the approximate value of the series and the index at which
the loop was broken as its results.
(ii) Experiment with your procedure using different values of G and δ. Does it provide an
accurate and efficient method for computing SG? Justify your answer.
(b) It is sometimes possible to improve the rate at which a series converges by rearranging the
terms. Some preliminary results are needed to achieve this.
(i) Use repeated differentiation to obtain the full Maclaurin series for (1 + x)−p−1, for
|x| < 1 and p = 0, 1, . . . Hence deduce that
∞∑
n=p
(
n
p
)
1
2n+1 = 1, n = 0, 1, . . . where
(
n
p
)
= n!
p!(n− p)! .
(ii) Use induction to show that if ∆aj = aj − aj+1, ∆2aj = ∆(∆aj), etc. then
∆naj =
n∑
p=0
(−1)p
(
n
p
)
aj+p.
(iii) Use the above results to prove that
∞∑
n=0
∆na0
2n+1 =
∞∑
p=0
(−1)pap.
In your answer you may use the fact that
∞∑
n=0
n∑
p=0

∞∑
p=0
∞∑
n=p
. You are not asked to prove
this, but you may like to derive it (it’s similar to reversing the order of a double integral).
(c) The analysis in part (b) suggests an alternative means for summing the series SG. Let
aj = (−1)j(1 + j)−h and consider the following table.
p
0 1 2 3
0 a0
1 a1 ∆a0
j 2 a2 ∆a1 ∆2a0
3 a3 ∆a2 ∆2a1 ∆3a0
...
...
...
...
... . . .
1
Write a second Maple procedure with arguments and return values as in part (a). The
procedure should work as follows. Start with S = 0 and then for each j:
• Compute the entries in row j, using the fact that ∆n+1aj = ∆n(aj − aj+1).
• Break the loop if |∆jaj|/2j+1 < δ × |S|.
• Otherwise add ∆jaj/2j+1 to S.
Repeat the experiments you carried out in part (a) with the new procedure, and comment
on the results.
2


essay、essay代写