联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-09-24 01:59


AMSC/CMSC 460 Section 0201 (Fall 2018)

Homework # 2: due Oct 2

1. (10 pts) Problem 2.3 in Moler’s book.

2. (15 pts) Problem 2.5 in Moler’s book.

3. (15 pts) Problem 2.7 in Moler’s book. The lutx function can be found in the books’ Matlab

toolbox, and is described in Section 2.7.

4. (15 pts) Problem 2.11 in Moler’s book. The bslashtx function can be found in the books’

Matlab toolbox, and is described in Section 2.7.

5. (10 pts) Problem 2.12 in Moler’s book.

6. (20 pts)

(a) Problem 2.19 in Moler’s book.

(b) The tridiagonal system of (a) arises from the discretization of the two-point boundary

value problem:

−x

00(t) = f(t) ∀ 0 ≤ t ≤ 1, x(0) = x(1) = 0.

Let ti = ih for 0 ≤ i ≤ n + 1 be a uniform partition of [0, 1] with uniform spacing

h = 1/(n + 1). Show, via a Taylor expansion, that

−x

00(ti) = −x(ti−1) + 2x(ti) − x(ti+1)

h2+ O(h2).

(c) Apply (b) with f(t) = (n + 1)3

t to derive the tridiagonal system from (a).

7. (15 pts) Let D = diag (d1, · · · , dn) be a diagonal matrix with entries {di}

n

i=1. Let k · k

denote the matrix norm subordinate to either vector norm k · k1, k · k2 or k · k∞. Show that

kDk = max

1≤i≤ndi|.

Determine kD−1k provided D is nonsingular, and find an expression for the condition number

k(D) of D.

8. (20 pts) The Hilbert matrix Hn = (hij )

n

i,j=1 of order n is defined by

hij =

1

i + j − 1

.

This matrix is nonsingular and has an explicit inverse. However, as n increases, the condition

number of Hn increases rapidly. The Matlab functions hilb(n) and invhilb(n) give Hn

and H−1

n

respectively. Let xn = (1, 1, · · · , 1) and bn = Hnxn. This problem examines the

two fundamental principles regarding the quality of the computed solution x

∗n.

(a) For n = 5, 10, set xn using the command ones, multiply Hnxn to obtain bn, and then

solve for x

n with the Matlab backslash command.

(b) Compute the error en = xn − x

n

, the residual rn = bn − Hnx

n

, and their norms

k · k1, k · k2, k · k∞ with the command norm. Draw conclusions.

(c) Find the condition number k(Hn) = kHnkkH−1

n k of Hn for the matrix norms subordinate

to the vector norms k · k1, k · k2, k · k∞. To this end use the command cond and

compare with a direct calculation of k(Hn) via invhilb(n) and norm.

(d) The condition number gives an estimate on the expected relative accuracy of the solution.

If k(Hn) ≈ 10t with an integer t ≥ 0, then the number of correct decimal digits in

the solution is expected to be 16 − t. How many correct decimal digits do you expect

for n = 5, 10?


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp