Download 4 Problems with Solution of Numerical Analysis - Final Exam | MATH 609 and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity! MATH 609-602: Numerical Methods Lecturer: Prof. Wolfgang Bangerth Blocker Bldg., Room 507D (979) 845 6393 bangerth@math.tamu.edu Teaching Assistant: Seungil Kim Blocker Bldg., Room 507A (979) 862 3259 sgkim@math.tamu.edu Finals – in-class part Friday 12/9/2005 I hereby certify that I have prepared my answers alone and without help by others: (signature of student) The usual rules of academic intregrity apply. In particular, the Aggie Honor Code “An Aggie does not lie, cheat or steal, or tolerate those who do” should be selfevident, see http://www.tamu.edu/aggiehonor.html Problem 5 (Integration). In order to numerically approximate an integral I = ∫ b a f(x) dx, we usually use the approach to chop up the interval into N small pieces with endpoints at a = x0 < x1 < x2 < · · · < xN = b, and use the formula I = N−1∑ k=0 Ik, Ik = ∫ xk+1 xk f(x) dx. We then try to find a simple way to approximate the individual pieces Ik, for example by replacing the integral for Ik by the box rule, or the trapezoidal rule. In the following, assume the distance between the points xk is h, i.e. for all intervals h = xk+1 − xk with the same h. Answer the following questions: a) Consider the approximation formula Ĩk = hf(xk) + h2 2 f ′(xk). (1) Under the assumption that f ∈ C3, prove that |Ik − Ĩk| = O(h3). 1 b) If we approximate the full integral I by Ĩ = ∑N−1 k=0 Ĩk, determine the convergence order of the error I − Ĩ. c) Compare the scheme (1) with the trapezoidal rule Ĩtrapezk = h 2 f(xk) + h 2 f(xk+1). Which equation has the higher convergence order, and which may be more accurate? Which is more suitable in practice? (4 points) Problem 6 (Direct and iterative solvers). Assume you are given a square N ×N matrix A that • is very large (i.e. N is at least in the thousands), • is positive definite, • has a condition number κ2(A) = 10−4N2, • has only 17 nonzero entries per row, one of them on the diagonal. You are supposed to solve a linear system Ax = b for a given right hand side vector b. Explain which of the following methods is best suited for this task: • LU decomposition, • Jacobi iteration, • the Conjugate Gradient (CG) method. For a model matrix of size N = 106, determine • the condition number of the matrix, • the total number of entries of the matrix, • for the LU decomposition the total number of operations, • for the two iterative methods, the number of iterations you expect to need to reach an accuracy of 10−4, • for the two iterative methods, the numerical effort (number of floating point additions, subtractions, multiplications and divisions) for each iter- ation, and for the entire solution process, • for all three methods, how long the solution will take on a machine that can do 109 floating point operations per second. 2