Exam in TMA4215 December 7th 2012

Similar documents
Examination paper for TMA4215 Numerical Mathematics

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Do not turn over until you are told to do so by the Invigilator.

Numerical Analysis Comprehensive Exam Questions

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Numerical Methods for Differential Equations

Numerical methods. Examples with solution

CS 323: Numerical Analysis and Computing

Examination paper for TMA4122/TMA4123/TMA4125/TMA4130 Matematikk 4M/N

AIMS Exercise Set # 1

Examination paper for TMA4130 Matematikk 4N

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Exact and Approximate Numbers:

Part IB Numerical Analysis

Examination paper for TMA4125 Matematikk 4N

MS 2001: Test 1 B Solutions

Consistency and Convergence

M.SC. PHYSICS - II YEAR

Numerical Methods in Physics and Astrophysics

Iterative Methods. Splitting Methods

COURSE Iterative methods for solving linear systems

Numerical Methods in Physics and Astrophysics

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

MS 3011 Exercises. December 11, 2013

THE NATIONAL UNIVERSITY OF IRELAND, CORK COLÁISTE NA hollscoile, CORCAIGH UNIVERSITY COLLEGE, CORK. Summer Examination 2009.

Previous Year Questions & Detailed Solutions

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

5. Hand in the entire exam booklet and your computer score sheet.

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0

Introductory Numerical Analysis

Math 115 Spring 11 Written Homework 10 Solutions

Review for Exam 2 Ben Wang and Mark Styczynski

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

x n+1 = x n f(x n) f (x n ), n 0.

Multistage Methods I: Runge-Kutta Methods

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Homework and Computer Problems for Math*2130 (W17).

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Preliminary Examination, Numerical Analysis, August 2016

AM205: Assignment 3 (due 5 PM, October 20)

CS 257: Numerical Methods

Ordinary Differential Equations II

MA2501 Numerical Methods Spring 2015

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

Numerical solution of ODEs

STOP, a i+ 1 is the desired root. )f(a i) > 0. Else If f(a i+ 1. Set a i+1 = a i+ 1 and b i+1 = b Else Set a i+1 = a i and b i+1 = a i+ 1

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

CS520: numerical ODEs (Ch.2)

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Examination paper for TMA4130 Matematikk 4N: SOLUTION

Numerical Programming I (for CSE)

Ordinary Differential Equations II

MB4018 Differential equations

COURSE Numerical integration of functions

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Iterative Methods for Ax=b

CS 323: Numerical Analysis and Computing

Solution of Nonlinear Equations

You may not use your books, notes; calculators are highly recommended.

Numerical Methods. Scientists. Engineers

Numerical Methods for Ordinary Differential Equations

Notes on Numerical Analysis

Solving Linear Systems

Additional exercises with Numerieke Analyse

, applyingl Hospital s Rule again x 0 2 cos(x) xsinx

Suggested solutions, TMA4125 Calculus 4N

Do not turn over until you are told to do so by the Invigilator.

Program : M.A./M.Sc. (Mathematics) M.A./M.Sc. (Final) Paper Code:MT-08 Numerical Analysis Section A (Very Short Answers Questions)

Stabilization and Acceleration of Algebraic Multigrid Method

Unit I (Testing of Hypothesis)

Calculus. Weijiu Liu. Department of Mathematics University of Central Arkansas 201 Donaghey Avenue, Conway, AR 72035, USA

Preliminary Examination in Numerical Analysis

EXAMPLES OF CLASSICAL ITERATIVE METHODS

Math 5630: Iterative Methods for Systems of Equations Hung Phan, UMass Lowell March 22, 2018

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

Department of Applied Mathematics Preliminary Examination in Numerical Analysis August, 2013

ASSIGNMENT BOOKLET. Numerical Analysis (MTE-10) (Valid from 1 st July, 2011 to 31 st March, 2012)

MATH 215/255 Solutions to Additional Practice Problems April dy dt

Examination paper for TMA4180 Optimization I

Fixed Points and Contractive Transformations. Ron Goldman Department of Computer Science Rice University

Numerical Methods for Differential Equations Mathematical and Computational Tools

Review all the activities leading to Midterm 3. Review all the problems in the previous online homework sets (8+9+10).

Lecture 4: Numerical solution of ordinary differential equations

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

MecE 390 Final examination, Winter 2014

MATH 228: Calculus III (FALL 2016) Sample Problems for FINAL EXAM SOLUTIONS

Quarter-Sweep Gauss-Seidel Method for Solving First Order Linear Fredholm Integro-differential Equations

Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015

Numerical solutions of nonlinear systems of equations

MTH4101 CALCULUS II REVISION NOTES. 1. COMPLEX NUMBERS (Thomas Appendix 7 + lecture notes) ax 2 + bx + c = 0. x = b ± b 2 4ac 2a. i = 1.

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

Numerical Analysis Exam with Solutions

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Transcription:

Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed aids code C: Textbook Endre Süli and David Mayers, An introduction to Numerical Analysis. TMA425 lecture notes pages). Rottman. Photocopies from the textbook are also allowed instead of the book itself, but they should be kept separate from the note of the course to allow control. Itemized description of the learning outcome L approximation of functions; L2 numerical quadrature; L3 odes; L4 Linear and nonlinear equations; L5 error analysis in general; L analysis of algorithms and methods; L7 implementation; L8 design of numerical experiments tested in the project work); L9 interpretation of the numerical results tested in the project work); L usage of precise mathematical language to describe solution to the problems and findings in the project. Problem Consider f C 4) [ a, a]) and let p 3 x) be the interpolation polynomial of degree 3 satisfying Show that if M 4 = p 3 a) = f a), p 3 a) = fa), p 3 a) = f a), p 3a) = f a). max f 4) x), then a x a fx) p 3 x) a4 24 M 4.

TMA425 Numerical Mathematics Page 2 of 9 Solution This is Hermite interpolation with n =, from the theorem about the error of Hermite interpolation page 9 in Süli and Mayers) we see that the exact expression for the error is fx) p 3 x) = f 4 ξ) [x a)x + a)] 2. 4! We get fx) p 3 x) M 4 24 max x [ a,a] [x2 a 2 ] 2 finding the maximum on [ a, a] of the polynomial [x 2 a 2 ] 2 we obtain the result. Tested learning outcome: L, L5, L. Problem 2 Given the distinct absissae x i, i =,,..., n +, and the values y i, i =,,..., n +, let q be the interpolation polynomial of degree n for the set of points {x i, y i ) : i =,,..., n} and let r be the interpolation polynomial of degree n for the points {x i, y i ) : i =, 2,..., n + }. Define px) = x x )rx) x x n+ )qx) x n+ x. Show that p is the interpolation polynomial of degree n + for the points {x i, y i ) : i =,,..., n + }. Solution We verify that: px ) = qx ) = y, px n+ ) = rx n+ ) = y n+ and for x i with i =,..., n px i ) = x i x )rx i ) x i x n+ )qx i ) x n+ x = x i x )y i x i x n+ )y i x n+ x = y i. So obviously p interpolates y,..., y n+ on x,..., x n+, and since the interpolation polynomial through n + 2 distinct points is unique, from the theorem of existence and uniqueness of the interpolation polynomial, p must be a polynomial of degree n +. Tested learning outcome: L, L5, L Problem 3 Write down the errors in the approximation of x 4 dx and x 5 dx by the trapezium rule and the Simpson s rule page 22 and 23 in the textbook). Use the exact values of the two integrals. Hence find the value of the constant C for which the trapezium rule gives the correct result for the calculation of x 5 Cx 4 )dx, and show that the trapezium rule gives a more accurate result than the Simpson s rule when 5 4 < C < 85 74.

TMA425 Numerical Mathematics Page 3 of 9 Solution The values of the two integrals are respectively /5 and /. If we approximate both the two integrals with the trapezium rule we get in both cases the value /2 as approximation. So for the trapezium rule we get the two errors 5 2, 2, and one proceeds similarly for the Simpson rule. We also have x 5 Cx 4 )dx = 5 C 3 and approximating with the trapezium rule the same integral we get So we get x 5 Cx 4 )dx 2 C 2. 5 C 3 = 2 C 2, when C = 9. Using Simpson to approximate the same integral we obtain x 5 Cx 4 )dx ) 9 C. 8 Let us call I the exact value of the integral, T the approximation due to the trapezium rule and S the one due to the Simpson rule, then we have, I T = + 9C 3 and the trapezium formula gives the exact value of the integral when C = 9. We also have 5 + 2C I S =, 24 and both I T and I S are linear functions of C. We have to find the values of C such that I T I S. The two functions are plotted in figure : I T as a function of C decreases for values of C 9, and increases for C > 9. I S has a similar behaviour, and is zero in C = 5 2. It suffices to find the points of intersection of the two graphs. It turns out that the graph of I T intersects I S = S I for C < 5 2, and S I coincides with the line through the two points 5/24, ) and 5/2, ) for C < 5 2. This line intersects I T in two points corresponding to the values C = 5 85 5 4 and C = 74. So I T I S for 4 C 85 74. Tested learning outcome: L2, L5, L, L. Problem 4 Apply the implicit Runge-Kutta method

TMA425 Numerical Mathematics Page 4 of 9 plot abs K C 9 C 3, abs K5 C 2$C 24, C =..2.5.4.3.2..5.5 2 2.5 C Figure : The two functions I T in red) and I S in blue) as functions of C.

TMA425 Numerical Mathematics Page 5 of 9 3 3) 4 2 3 2 3) 3 + 3) 2 3 + 2 3) 4 2 2 to the initial value problem y = ft, y), yt ) = y, with time step t. Derive the equations giving rise to the method and discuss the implementation tasks to be performed at each time-step. Solution The Runge-Kutta method has two stages Y and Y 2 and they are obtained as the solution of the equations : Y = y + t 4 f t + 3 3 ) t, Y + 2 3 2 3)f t + 3 + 3 ) ) t, Y 2 Y 2 = y + t 2 3 + 2 3)f t + 3 3 ) t, Y + 4 f t + 3 + 3 ) ) t, Y 2. To solve these equations we can use a fixed point iteration or a Newton method. With a fixed point iteration the procedure becomes: Initialization Y = y, Y 2 = y, k = Iteration while ε T OL and k ) Y old = Y k Y2 old = Y2 k Y k+ = y + t 4 f t + 3 Y k+ 2 = y + t k = k + ε = Y k Y old 2 + Y k 2 Y old 2 2 end while 3 2 3 + 2 3)f t + 3 3 t, Y k ) + 2 3 2 3)f t + 3 + t, Y k ) + 3 4 f t + 3 + 3 t, Y2 k ) ) t, Y2 k ) ). The RK-method and the corresponding equations can be also formulated by means of the unknowns K i = f t + c i t, y + t s j= ai,jkj ).

TMA425 Numerical Mathematics Page of 9 Y = Y k Y 2 = Y k 2 y = y + t 2 f t + 3 3 t, Y ) + f t + 3+ 3 t, Y 2 ) ). Tested learning outcome: L3, L4, L7, L. Problem 5 a) Consider the θ-method Solution for θ [, ], for the initial value problem y n+ = y n + h[ θ)f n + θf n+ ], y = ft, y), yt ) = y, where f n := ft n, y n ), t n = t + nh, y n yt n ) and h the time step. Write the θ-method as a Runge-Kutta method by finding the Butcher tableau of this method. θ θ or θ θ θ θ Tested learning outcome: L3. b) Determine and draw the region of A-stability for the method obtained for θ = and for θ = 2. Solution For θ = we have the backward Euler method whose region of absolute stability is S A = {z C z }. For θ = 2 we have the trapezoidal rule whose region of absolute stability is the negative half complex plane. Tested learning outcome: L3, L. c) Show that the method is A-stable if and only if θ 2.

TMA425 Numerical Mathematics Page 7 of 9 Solution We consider the scalar test equation y = λy, y) = y, where the real part of λ is non positive. The stability function of the θ-method is The method is A-stable if Rz) = + θ)z. θz Rez) Rz). We assume then that Rez) and explore for which values of θ we have that Rz) for all such z. + θ)z θz + θ)z θz, + Re θ)z) 2 + θ) 2 Imz) 2 2θRez) + θ) 2 z 2. Taking squares on both sides and simplifying we get 2θ θ 2. Tested learning outcome: L3, L, L. Problem Let a R and consider the matrix a a A = a a a a a) For which values of a is A positive definite? For which values of a is Gauss-Seidel method convergent? Solution The eigenvalues of A are λ = 2a +, λ 2 = λ 3 = a. Therefore all eigenvalues are positive if 2 < a <. Consider A = M N where M is the lower triangular part of A including the diagonal then M N has eigenvalues: and 2 a 3a a 2 ± a ) ) aa 4) and the spectral radius is ρm N) = 2 a 3a a 2 + a ) aa 4)) and it remains less than for 2 < a < these are the values for which the Gauss-Seidel method converges). Tested learning outcome: L4, L, L.

TMA425 Numerical Mathematics Page 8 of 9 b) For which values of a is the Jacobi iterative method convergent? For which values of a is the Gauss-Seidel iterative method converging faster than the Jacobi iteration? Solution Consider A = M N where M is the identity matrix, then M N has eigenvalues: 2a, a and a, so the spectral radius of this matrix is 2 a and Jacobi method converges if and only if a < 2. For a < 2 and a, the inequality 2 a 3a a 2 + a ) aa 4)) < 2 a, is always satisfied we have equality for a = ). Therefore for 2 < a < Gauss-Seidel converges while Jacobi doesn t and for a < 2 and a Gauss-Seidel converges faster than Jacobi. Tested learning outcome: L4, L, L. Problem 7 Reformulate the following equations into fix-point equations leading to convergent fix-point iterations on some interval [a, b]: x 2 x + =, e x sinx) =. Find a and b. Justify your answers. Solution The second equation has a zero in the interval, Π 2 ], and can be transformed to the fixed point equation x = x e x sinx), by dividing by sinx) and multiplying by x on both sides. The function gx) = x e x sinx) maps, Π 2 ] into itself and, by the mean value theorem since g is continuous and differentiable on, Π 2 ]), gx) gy) max g ξ) x y. ξ, Π 2 ] Computing the derivative of g we observe that it is bounded by on the interval, Π 2 ] so g is a contraction on this interval. This suffices to conclude that the fixed point iteration e xk ) x k) = x k ) sinx k ) ) converges for any starting value x, Π 2 ], by the contraction mapping theorem. The equation x 2 x + = has two complex conjugate roots. We consider x 2 = x

TMA425 Numerical Mathematics Page 9 of 9 take square roots on both sides and add x on both sides and, after dividing by 2 we obtain x = 2 x + 2 x. Such fixed-point equation for x < guarantees that x is pure imaginary and x is complex. So we can then continue analyzing the iteration in the complex plane. The iteration converges to the root 2 + i 3). Tested learning outcome: L4, L5, L, L.