程序代写案例-MATH7501-Assignment 2

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
MATH7501 Assignment 2 Semester 1, 2021 Due 6/5/2021
You can use Mathematica as an aid for many of the computations, however make sure to do
hand calculations where suitable as well.
1. Consider sequences of numbers of the form xn = n
α for n = 1, 2, 3, . . . with α ∈ R.
(i) For what values of α does limn→∞ xn = 0?
(ii) Set now S =
∑∞
k=1 xk. For what values of α does the series, S, converge?
(iii) Consider α = −2. Use Mathematica to analytically evaluate S. Use this result to
suggest an algorithm for numerically approximating the constant pi and implement it in
Mathematica.
(iv) Consider α = −1. In this case S is called the harmonic series. It holds that,
n∑
k=1
xk = log(n) + γ + en,
where γ is Euler’s gamma constant and en is an o(1) sequence. Numerically approximate
γ and plot the sequence en.
(v) Assume you have a data set of numbers (x1, x2, . . . , xn) where each number is randomly
generated (uniform) on the interval [0, 1] and all numbers are statistically independent.
You now run an algorithm to find,
m = max
i=1,...,n
xi,
as follows:
Step 1: Set m = −∞ and L = 0
Step 2: Loop on i = 1, . . . , n:
Step 2a: If xi > m then set m = xi and set L = L+ 1 (increment L).
Step 3: Return m as the maximum and L as the number of times a new maximum was
found.
Determine the expected value of L as a function of n. Hint: consider the harmonic series.
(vi) Carry out experimentation by repeating the algorithm above for 10, 000 data sets of
lengths n = 1, 2, 3, 10. See if the approximation log(n) + γ is useful and comment on your
results.
2. Use the formal (, N), definition of the limit of a sequence to show that if limn→∞ xn = L1
and limn→∞ yn = L2 then,
lim
n→∞xnyn = L1L2.
3. Provide a detailed geometric explanation of why ddx cos(x) = − sin(x).
4. The Poisson distribution is a discrete probability distribution defined by the probabilities
p(x) = e−λ λ
x
x! for x = 0, 1, 2, 3, .... Prove that
∑∞
x=0 p(x) = 1 and thus since p(x) ≥ 0, the
sequence {p(x)} is probability distribution.
1 of 2
MATH7501 Assignment 2 Semester 1, 2021 Due 6/5/2021
5. The function f(x) = e−
x2
2 is one of the most important functions in statistics. In this
problem you will investigate several properties of this function.
(i) Show that the function has a unique maximum at x = 0. Use derivatives.
(ii) Find the points of f(x) where the second derivative is 0, these are called inflection
points.
(iii) Say you wish to approximate f(x) on the interval [−a, a] and use a Taylor series
centered around x = 0. You useK terms to obtain a Taylor polynomial, f˜(x) (a polynomial
of order K − 1). Find the minimal K such,
max
x∈[−a,a]
|f(x)− f˜(x)| < 10−4,
for a = 0.5, 1.0, 1.5. You may use Mathematica.
(iv) The Wikipedia page https://en.wikipedia.org/wiki/Hermite_polynomials presents
the first eleven “probabilist’s Hermite polynomials”. Use Mathematica to reproduce this
result and find the 12’th probabilist’s Hermite polynomial with the same definition.
6. Assume that you only know: (1) That derivatives are linear. (2) That the derivative of a
constant is 0. (3) That the derivative of x is 1. (4) ddxx
2 = 2x. (5) The product rule. (6)
The chain rule.
Use (1)-(6), or a subset to obtain each of the following:
(i) ddxx
4 (do it using the product rule).
(ii) ddxx
4 (do it using the chain rule).
(iii) The quotient rule for derivatives.
(iv) ddxx
−7.
(v) ddx(x+ 5)
2 (do it using based on (1)-(4)).
(vi) ddx(x+ 5)
2 (do it using the chain rule).
7. Given data points, x1, . . . , xn show that the sample mean, x =
1
n
∑n
i=1 xi is also the
minimizer, η of
n∑
i=1
(xi − η)2.
8. Let s : R→ R and c : R→ R be two real-valued functions satisfying the following:
s′(x) = c(x), c′(x) = −s(x) for all x ∈ R
s(0) = 0, c(0) = 1.
(1)
This question concerns properties of the functions c and s. You may only use (1), as well
as the fact that there is exactly one pair of functions (c, s) satisfying (1).
(i) Show that c(x)2 + s(x)2 = 1 for all x ∈ R.
(ii) Find the Taylor series for both c(x) and s(x) about x = 0.
(iii) Let p > 0 be the first positive root of c. Set up a bisection method in Mathematica to
approximate p, starting with the inteval [0, 2], and using at least 10 bisections. You
should use the Taylor series approximation for c found in part (ii) up to the x10 term.
(iv) Show that s(p− x) = c(x) and c(p− x) = s(x) for all x ∈ R.
2 of 2

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468