作者BreathWay (息尉)
看板NTU-Exam
標題[試題] 105-1 王偉仲 計算數學導論 期末考
時間Wed Jan 11 20:54:01 2017
課程名稱︰計算數學導論
課程性質︰系必修
課程教師︰王偉仲
開課學院:理學院
開課系所︰數學系
考試日期(年月日)︰2017/1/9
考試時限(分鐘):110
試題 :
1. [15 points (5+10)]
(a) What's main difference between Simpson's method and Gaussian quadrature?
(b) Determine the two weight coefficients and two quadrature points, so that
the corresponding Gaussian quadrature gives the exact result whenever an
intergral function is a polynomial of degree no greater than 3.
2. [18 points (3+7+8)] For the MATLAB function mysteriousF shown in Figure 1.
(a) Explain what task does mysteriousF perform.
(b) Explain what are the arguments, JSf, nodes, f, a, b, tol, hmin.
(c) Derive the mathematical theory behind this MATLAB function.
Figure 1. [JSf, nodes] = mysteriousF(f, a, b, tol, hmin, varargin)
A = [a,b]; N=[]; S=[]; JSf = 0; ba = 2*(b-a); nodes=[];
while ~isempty(A),
[deltaI,ISc]=caldeltai(A,f,varargin{;});
if abs(deltaI) < 15*tol*(A(2)-A(1))/ba;
JSf = JSf + ISc; S = union(S,A);
nodes = [nodes, A(1) (A(1)+A(2))*0.5 A(2)];
S = [S(1), S(end)]; A = N; N = [];
elseif A(2)-a(1) < hmin
JSf=JSf+ISc;
S = [S(1), S(end)]; A=N; N=[];
warning('Too small integration-step');
else
Am = (A(1)+A(2))*0.5;
A = [A(1) Am]; N = [Am, b];
end
end
nodes=unique(nodes);
return
function [deltaI,ISc]=caldeltai(A,f,varargin)
L=A(2)-A(1);
t=[0; 0.25; 0.5; 0.75; 1];
x=L*t+A(1); L=L/6;
w=[1; 4; 1]; wp=[1;4;2;4;1];
fx=feval(f,x,varargin{;}).*ones(5,1);
IS=L*sum(fx([1 3 5]).*w);
ISc=0.5*L*sum(fx.*wp);
deltaI=IS-ISc;
return
3. Fill in the gapes (a), (b), (c), (d) to complete the in-place LU
factorization shown in Figure 2, so that the matrix A is replaced by
the matrices L and U, where A = LU.
Figure 2.
_ _
| (1) (1) (1) |
| a a … … … a |
| 11 12 1n |
| |
| (2) (2) |
| l a a |
| 21 22 2n |
| |
| . . . . |
| . . . . |
| . . . . |
| (k) (k) |
| l … l a … a |
| k1 k,k-1 kk kn |
| |
| . . . . |
| . . . . |
| . . . . |
| (k) (k) |
| l … l a … a |
| n1 n,k-1 nk nn |
| |
 ̄  ̄
for k= 1,..., (a)
for i = (b),..., n
l = (c)
ik
for j = k+1,..., n
(k+1)
a = (d)
ij
4. [10 points (4+6)]. For a matrix defined in Figure 3.
(a) Draw the sparsity of the matrix.
(b) Explain how to prevent fill-ins in the matrices L and U when performing
LU factorization to this matrix.
Figure 3. A 6x6 matrix defined in the Compressed Row Storage format.
value 1 1 1 1 1 1 1 2 1 3 1 4 1 5 1 6
column-index 1 2 3 4 5 6 1 2 1 3 1 4 1 5 1 6
row-pointer 1 7 9 11 13 15 17
5. [15 points (3+3+3+3+3)] Suppose we want to solve a linear system Ax = b.
By splitting the matrix A = M + N, we can derive iterative methods.
(k) (k-1)
(a) Derive the itertion formula x = Tx + c by determining the iteration
matrix T and the vector c.
(k) (k-1) -1 (k-1)
(b) Rewrite the formula in part (a) in the form x = x + M r ,
where the vector r denotes the residual vector. Note that the part
-1 (k-1)
M r can be viewed as a "correction vector".
(c) Use the formula in part (a) to illustrate the Jacobi method.
(d) Use the formula in part (b) to illustrate the Gauss-Seidel method.
(e) Give an overall comparison of the Jacobi method and Gauss-Seidel method.
6. [10 points (2+8)] Consider an iterative method to solve a linear system Ax=b.
(k)
(a) Define the absolute error and residual of an iterate x .
(b) Illustrate what you know about the absolute error and residual of an
(k)
iterate x . Derive the relation between them.
7. [20 points] Illustrate a concept map regarding the topics that you have
learnt in this semester.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.249.201
※ 文章網址: https://webptt.com/m.aspx?n=bbs/NTU-Exam/M.1484139243.A.219.html