[试题] 103-1 王伟仲 计算数学导论 期中考

楼主: SamBetty (sam)   2014-11-15 10:29:17
课程名称︰计算数学导论
课程性质︰数学系大三必修课
课程教师︰王伟仲
开课学院:理学院
开课系所︰数学系
考试日期(年月日)︰2014/11/12
考试时限(分钟):15:30~19:10
是否需发放奖励金:是
(如未明确表示,则不予发放)
试题 :
Part Ⅰ. Written(Room 101)
1. [20 points (5+5+5+5)] Consider a floating-point system that any real
number x is converted to the form of δ0.dddd ×10^(δee), whereδ andδ
1 2 1 2
are the sign(0 for positive, 1 for negative) of the mantissa and exponent,
respectively and d and e are decimal digits(0 to 9) for the mantissa and
the exponent, respectively. We assume that zero can be represented by
either +0.0000 or -0.0000 for the mantissa and +0.00 or -0.00 for the
exponent.
(a) What is the largest floating-point number in the floating point system?
(b) What is the distance between 0 and the next positive floating point
number in the system?
(c) What is the smallest floating point that is larger than 5 in the system?
(d) How many distinct real numbers can be represented by this floating-point
system?
2. [15 points (5+5+5)]
(a) Define the nth order Lagrangian polynomial.
(b) Given the data set: {(t ,y )|(16,12),(18,9),(20,8),(22,7),(24,8),(26,4)
i i
t/20
,(28,2)} and functions f (t)=t, f (t)= e , f (t) = sin(2t). Derive
1 2 3
a method to compute the parameters x , x , x such that the square error
1 2 3
7 2
E = Σ [y - [x f (t ) + x f (t ) + x f (t )]] is minimized.
i = 1 i 1 1 i 2 2 i 3 3 i
(c) Write a pseudo-code in paper describing how you implement the mothod
﹉﹉﹉﹉﹉﹉
derived in (b).
3. [10 points] You have learnt a lot from Introduction to Computational
Mathematics so far. You are confident to your skills and decide to start a
company by applying these skills. Mr. Steve Taylor runs a venture capital
fund firm and he is looking for promising companies to investigate. To get
enough money to start your company form Mr. Taylor, let Steve know the
following information. (i) The name of your company. (ii) Names and student
IDs of all (up to three) co-founders. (iii) What your company is going to do.
(iv) Who your target customers are. (v) The amount of money you are asking
from Steve. (vi) Reasons why your company will be successful. (vii) Anything
else you want to say.
Part Ⅱ. Hands-on (Room 301) Submit your answer to Cody for the problems
indicated by *.
4. [20 points (5+5+5+5)]
(a) What are the endpoint constraints in natural interpolating cubic spline?
(b) Consider the code "cubicspline.m" (download from http://goo.gl/Fzu8q0
or see page 3). Which part of the code implements the natural spline
boundary conditions?
(c) Does the code "cubicspline.m" implement clamped spline? If yes, which
part? If no, modify the code to implement it.
(d) Consider a robot working cycle that will (i) be steady at the point
(0,0) in the plane when time t=0 second, (ii) transit through the point
(1,2) at t=1 second, (iii) get the point (4,4) at t=2 second and stop. Use
the code "cubicspline.m" to find the trajectory (for each time step 0.1
second from t=0 to t=2) in the xy plane of the robot satisfying the given
constrains.
3 2 -x -x -x
5. [20 points (5+5+5+5)] Consider the function f(x) = x - 3x 2 + 3x4 - 8 .
(a*) Use MATLAB buildin functions to find the solution of f(x) = 0 in [0,1]
with initial guess 0.
(b*) Write a MATLAB codee to compute the zero of f(x) in [0,1] by Newton's
(k+1) (k) -6 (k)
method. Use the stopping criterion that |x -x | ≦ 10 , or |f(x )|
-8
≦10 , or k≧50.
(c) Sketch a figure showing th iteration number (x-axis) and absolute error
(y-axis). Use the figure to judge the convergence rate of your computation.
(d) Can you increase the rate of convergence in Newton's method while
solving f(x) = 0 in [0,1]?
3 2
6.[15 points (5+5+5)] Suppose the unique root of function f(x)=x +4x -10 is α.
(a*) Write a MATLAB code to implement the following fixed point iterations.
(k) 3 (k) 2
(k+1) 2(x ) + 4(x ) + 10 (k+1)
x = ——————————————. Use the stopping criterion |x
(k) 2 (k)
3(x ) + 8x
(k) -5 (0)
- x | ≦ 10 and the initial point x = 2.
(b) Sketch a figure showing the iteration number (x-axis) and absolute error
(y-axis). Use the figure to judge the convergence rate of your computation.
(c) Analyze the convergence theoretically.
7. [25 points (5+5+5+10)] Download the matrix "well1850" from the Florida
matrix collection and stor it as matrix A. By using MATLAB buildin functions
to do parts (a) to (c).
(a) Write down your code on paper to plot the sparsity of A.
(b*) Compute b = A1. Where 1 is the column vectro that all entries are ones.
(c*) Solve the linear system Ax=b. Compute the absolute error of the
computed x, the residual, and the condition number of A. Do you think your
computed solution x is reasonable? Why?
(d*) Suppose matrix A is symmetric positive definite and can be factorized
into LDU without pivoting. Write a MATLAB code to perform Cholesky
T
factorization A = L L . (Hint: If A is symmetric positive definite, we have
1 1
T 1/2 1/2 T T
A = LDU = LDL = (LD )(LD ) = L L as the Cholesky factorization. Here
1 1
L , L, D, U are lower triangular matrix, lower uni-triangular matrix,
1
positive diagonal matrix, and upper uni-triangular matrix, respectively.
You may modify the code for performing LDU factorization without pivioting
to do the job.)
=== End of problems. Good luck! ===

Links booklink

Contact Us: admin [ a t ] ucptt.com