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

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

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

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

Math Numerical Analysis Mid-Term Test Solutions

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Preliminary Examination, Numerical Analysis, August 2016

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

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

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)

Preliminary Examination in Numerical Analysis

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.

MA2501 Numerical Methods Spring 2015

MATHEMATICAL METHODS INTERPOLATION

PARTIAL DIFFERENTIAL EQUATIONS

CS 257: Numerical Methods

Edexcel GCE Further Pure Mathematics (FP1) Required Knowledge Information Sheet. Daniel Hammocks

Numerical Methods. King Saud University

GENG2140, S2, 2012 Week 7: Curve fitting

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 Methods in Physics and Astrophysics

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools:

Numerical Methods in Physics and Astrophysics

NUMERICAL METHODS USING MATLAB

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

Applied Numerical Analysis

Introductory Numerical Analysis

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

1. Select the unique answer (choice) for each problem. Write only the answer.

Exam in TMA4215 December 7th 2012

NUMERICAL MATHEMATICS AND COMPUTING

Applied Linear Algebra in Geoscience Using MATLAB

Computational Methods in Civil Engineering

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

Preface. 2 Linear Equations and Eigenvalue Problem 22

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

There are six more problems on the next two pages

Solution: In standard form (i.e. y + P (t)y = Q(t)) we have y t y = cos(t)

MAT Linear Algebra Collection of sample exams

Additional exercises with Numerieke Analyse

MecE 390 Final examination, Winter 2014

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

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

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Ordinary Differential Equations II

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

CS 323: Numerical Analysis and Computing

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

NUMERICAL ANALYSIS PROBLEMS

Mathematics for Engineers. Numerical mathematics

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.

Lectures 9-10: Polynomial and piecewise polynomial interpolation

CHAPTER 2 POLYNOMIALS KEY POINTS

INTRODUCTION, FOUNDATIONS

Examination paper for TMA4215 Numerical Mathematics

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

Final Year M.Sc., Degree Examinations

Cubic Splines; Bézier Curves

Previous Year Questions & Detailed Solutions

Applied Linear Algebra in Geoscience Using MATLAB

M.SC. PHYSICS - II YEAR

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

MATH 3321 Sample Questions for Exam 3. 3y y, C = Perform the indicated operations, if possible: (a) AC (b) AB (c) B + AC (d) CBA

Table 1 Principle Matlab operators and functions Name Description Page reference

Exact and Approximate Numbers:

AIMS Exercise Set # 1

PLC Papers. Created For:

CS 323: Numerical Analysis and Computing

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

Applied Math for Engineers

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

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

Part IB Numerical Analysis

Numerical Analysis Exam with Solutions

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a

Examination paper for TMA4125 Matematikk 4N

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

3.1 Interpolation and the Lagrange Polynomial

MAT300/500 Programming Project Spring 2019

Numerical Methods for Ordinary Differential Equations

POLYNOMIALS. x + 1 x x 4 + x 3. x x 3 x 2. x x 2 + x. x + 1 x 1

BSM510 Numerical Analysis

Computational Methods

Chap 3. Linear Algebra

Fixed point iteration and root finding

Virtual University of Pakistan

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Empirical Models Interpolation Polynomial Models

Indian Institute of Technology Bombay

Advanced. Engineering Mathematics

5.3. Polynomials and Polynomial Functions

COMP 558 lecture 18 Nov. 15, 2010

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Cheat Sheet for MATH461

What if the characteristic equation has complex roots?

Transcription:

Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this exam plus the two computational exams) of 50 points. Justify all your answers and write down all important steps. Unsupported answers will be disregarded. During the exam you are allowed a pocket calculator, but no textbook, lecture notes or any other electronic or written material. 1. (5p) Name one numerical method that is suitable for solving the following problems: (a) x e x = 0 1 2 3 (b) 0 4 5 0 0 6 x 1 x 2 x 3 = 7 8 9 (c) Find a fourth degree polynomial passing through 5 given points. (d) Construct a smooth curve passing through 50 given points. (e) Solve the initial value problem y = y 2 /t + sin y, y(1) = 1 in the interval [1, 5]. (a) Fixed-point iteration, Newton-Raphson, bisection. (b) Back substitution. (c) Polynomial interpolation (Lagrange interpolation, Newton divided differences). (d) Splines, Bézier curves. (e) Euler s method, Heun s method, a Runge-Kutta method. 2. (5p) Consider the three methods (a) x n+1 = f(x n ) (b) p k+1 = p k f(p k) f (p k ) (c) p k = p k 1 f(p k 1)(p k 1 p k 2 ) f(p k 1 ) f(p k 2 ) 1

State (all) those that have each of the following properties: (a) Solves f(x) = 0. (b,c) (b) Usually has quadratic convergence. (b) (c) Will converge only if f(x) < 1. (none) (d) Is an iteration method. (a,b,c) (e) Can be used to find a root of 16x 2 32x + 15 = 0, with f(x) = 32x 15/4. (a) 3. (5p) Suppose you have a square linear system of equations Ax = b. Name the three elementary row operations that yield an equivalent system. (a) Multiply a row by a scalar (b) Interchange rows (c) Subtract a multiple of one row from another 4. (5p) The following statement is wrong. Correct the statement. The iterative method x k+1 = Bx k + c is convergent (for any initial guess x 0 ) only if B p < 1 for some p. The iterative method x k+1 = Bx k + c is convergent (for any initial guess x 0 ) if B p < 1 for some p. Or: The iterative method x k+1 = Bx k + c is convergent (for any initial guess x 0 ) only if ρ(b) < 1. 5. (5p) Write the polynomial passing through the points (0, 1), (-2.5, 7.2) and (3.1, -2), if the Lagrange polynomials have been computed and are x(x + 2.5)/17.36, x(x 3.1)/14 and (x + 2.5)(3.1 x)/7.75. p(x) = (x + 2.5)(3.1 x) 7.75 + 7.2 x(x 3.1) 14 2 x(x + 2.5) 17.36 2

6. (5p) Consider the Bézier curve with control points (2,3), (1,-1), (4,1) and (5,0). Remembering that the cubic Bernstein polynomials are (1 t) 3, 3(1 t) 2 t, 3(1 t)t 2, t 3, write down the parametric equations of the curve, and give the first control point of another cubic Bézier curve that starts at (5,0) and ends at (6,-2), and joins the previous curve as smoothly as possible. X(t) = 2(1 t) 3 + 3(1 t) 2 t + 12(1 t)t 2 + 5t 3 Y (t) = 3(1 t) 3 3(1 t) 2 t + 3(1 t)t 2 Any point collinear with (4, 1) and (5, 0) is OK, that is, of the form (x, 5-x). 7. (5p) The following table is found on an oatmeal porridge package: Portions Oats Water 1 1 2.5 2 2 4.5 4 4 9 Determine the straight line that passes through (0, 0) and best fits the given data. The equation of the line must be of the form y = mx, where y is the amount of oats and x is the number of portions (or the amount of water). The overdetermined is system is 1 2 4 m = 2.5 4.5 9, and its least squares solution is approximately m = 2.26, so the straight line is y = 2.26x. 8. (5p) Write an algorithm that solves the least squares problem Ax = b, where A is an 25 3 matrix, using QR factorization. [Q,R] = qr(a); y = Q(:,1:3) *b; x = R(1:3,1:3)\y; 9. (5p) Consider the formula f (t) = f(t + 2h) 2f(t + h) + f(t) h 2 3 hf (ζ)

Suppose that the rounding errors are such that ˆf(t) f(t) + ɛ Calculate the total error function E(h), such that f (t) ˆf (t) E(h). error truncation = h f (ζ) error rounding (ɛ + 2ɛ + ɛ)/h 2 f (t) ˆf (t) h f ζ) + 4ɛ h 2 10. (5p) Describe how the approximation b a f(x)dx S(a, c) + S(c, b) + 1 [S(a, c) + S(c, b) S(a, b)] 15 can be used to construct an adaptive Simpson quadrature algorithm. The term [S(a, c) + S(c, b) S(a, b)]/15 can be used as an error estimate. If this quantity is less than or equal to the userprovided tolerance, the integral is approximated by the given formula. If the quantity is greater than the tolerance, the intervals [a,c] and [c,b] are bisected and the test is redone for each subinterval [a,c] and [c,b], this time checking against one half of the user-provided tolerance. 11. (5p) When an initial value problem was solved with a certain Runge- Kutta method using different step-sizes, the following errors were observed: h norm-1 error/n 1/1000 7.8013 10 9 1/2000 1.9499 10 9 1/4000 4.8743 10 10 1/8000 1.2185 10 10 What is the order of convergence of this method? 7.8013 10 9 /1.9499 10 9 = 4.0009 1.9499 10 9 /4.8743 10 10 = 4.0004 4.8743 10 10 /1.2185 10 10 = 4.0002 4

If the error is of the form ch p, then method is of order p = 2. ch p c(h/2) p = 2p. As here 2 p 4, the 12. (5p) Write the MATLAB function yprime=myode(t,y) you would need to solve the differential equation y = yt 3y. y = v v = z z = yt 3v function yprime=myode(t,y) yprime(1,1)=y(2); yprime(2,1)=y(3); yprime(3,1)=y(1)*t-3*y(2); 13. (5p) Study the following algorithm: y k 1 = x k 1 x k 1 2 x k = Ay k 1 λ k = y T k 1x k What method is this and what does it compute? It is the normalized power method and it computes an approximation to the largest-modulus eigenvalue of A and its corresponding eigenvector. 14. (5p) Suppose a 128 128 matrix A has a singular value decomposition A = USV T, and the first two singular values s 1 and s 2 are much larger than the rest of the singular values. How can one compress the main part of the information by using the low-rank approximation property n A = s i u i vi T i=r and what would the compression ratio be? One can use the first 2 terms of the sum, A s 1 u 1 v T 1 + s 2 u 2 v T 2 to compute the best least squares approximation to A of rank 2. As A contains 128 2 elements, and s 1 u 1 v T 1 + s 2 u 2 v T 2 contains 2 + 4 128 elements, the compression ratio is approximately 32:1. 5

Lycka till! C.Arévalo 6