CS 323: Numerical Analysis and Computing

Similar documents
CS 323: Numerical Analysis and Computing

CS412: Introduction to Numerical Methods

CS 323: Numerical Analysis and Computing

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

Midterm Review. Igor Yanovsky (Math 151A TA)

3.1 Interpolation and the Lagrange Polynomial

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

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.

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

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

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

ROOT FINDING REVIEW MICHELLE FENG

Scientific Computing: An Introductory Survey

SYSTEMS OF NONLINEAR EQUATIONS

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

Chapter 3: Root Finding. September 26, 2005

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

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Computational Methods CMSC/AMSC/MAPL 460. Solving nonlinear equations and zero finding. Finding zeroes of functions

BSM510 Numerical Analysis

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

University of Connecticut Department of Mathematics

THE SECANT METHOD. q(x) = a 0 + a 1 x. with

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

Root Finding (and Optimisation)

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Exam in TMA4215 December 7th 2012

Variable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University

CS 257: Numerical Methods

Math 4329: Numerical Analysis Chapter 03: Fixed Point Iteration and Ill behaving problems. Natasha S. Sharma, PhD

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

Math 473: Practice Problems for Test 1, Fall 2011, SOLUTIONS

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

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

Lecture 10 Polynomial interpolation

We consider the problem of finding a polynomial that interpolates a given set of values:

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers

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

MA/OR/ST 706: Nonlinear Programming Midterm Exam Instructor: Dr. Kartik Sivaramakrishnan INSTRUCTIONS

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

Test 2 Review Math 1111 College Algebra

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

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)

GENG2140, S2, 2012 Week 7: Curve fitting

A Partial List of Topics: Math Spring 2009

Function approximation

Non-polynomial Least-squares fitting

HW3 - Due 02/06. Each answer must be mathematically justified. Don t forget your name. 1 2, A = 2 2

Solution of Nonlinear Equations

Section 0.2 & 0.3 Worksheet. Types of Functions

Polynomial Interpolation Part II

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Introduction Linear system Nonlinear equation Interpolation

Announcements. Topics: Homework: - sections , 6.1 (extreme values) * Read these sections and study solved examples in your textbook!

. As x gets really large, the last terms drops off and f(x) ½x

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

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

Math Numerical Analysis Mid-Term Test Solutions

MATH ASSIGNMENT 07 SOLUTIONS. 8.1 Following is census data showing the population of the US between 1900 and 2000:

CHAPTER-II ROOTS OF EQUATIONS

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

15 Nonlinear Equations and Zero-Finders

Numerical Analysis: Solving Nonlinear Equations

Numerical Methods I Solving Nonlinear Equations

2, or x 5, 3 x 0, x 2

Math /Foundations of Algebra/Fall 2017 Numbers at the Foundations: Real Numbers In calculus, the derivative of a function f(x) is defined

The Normal Equations. For A R m n with m > n, A T A is singular if and only if A is rank-deficient. 1 Proof:

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


Numerical Methods in Physics and Astrophysics

LIMITS AT INFINITY MR. VELAZQUEZ AP CALCULUS

Preliminary Examination in Numerical Analysis

Example 1 Which of these functions are polynomials in x? In the case(s) where f is a polynomial,

Math 251 December 14, 2005 Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

Math 106: Calculus I, Spring 2018: Midterm Exam II Monday, April Give your name, TA and section number:

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

Test 2. Monday, November 12, 2018

Numerical Methods in Informatics

Section 6.6 Evaluating Polynomial Functions

Numerical Methods in Physics and Astrophysics

Numerical solutions of nonlinear systems of equations

MS 2001: Test 1 B Solutions

3 Polynomial and Rational Functions

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


Math 115 Spring 11 Written Homework 10 Solutions

Order of convergence

Numerical Analysis: Interpolation Part 1

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

INTRODUCTION TO COMPUTATIONAL MATHEMATICS

Advanced Mathematics Unit 2 Limits and Continuity

Advanced Mathematics Unit 2 Limits and Continuity

Numerical Analysis Comprehensive Exam Questions

Chapter 8. Exploring Polynomial Functions. Jennifer Huss

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

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

MATH 1001 R02 MIDTERM EXAM 1 SOLUTION

Examination paper for TMA4180 Optimization I

1 Newton s Method. Suppose we want to solve: x R. At x = x, f (x) can be approximated by:

Transcription:

CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us. You are not permitted to use laptop computers, cell phones, tablets, or any other hand-held electronic devices. Name NetID Part #1 Part #2 Part #3 Part #4 Part #5 TOTAL 1

1. [24% = 4 questions 6% each] MULTIPLE CHOICE SECTION. Circle or underline the correct answer (or answers). No justification is required for your answer(s). (a) What is the best reason one might want to use the Secant method instead of Newton s method (for solving f(x) = 0)? (Circle the ONE most correct answer.) i. It is always guaranteed to converge, while Newton s method is not. ii. The Secant method can be used without having a formula for f (x). iii. Newton s method exhibits slower convergence than the Secant method. (b) Which of these statements about the Bisection method are true? (Circle the TWO most correct answers.) i. In order to use the Bisection method, we need to have a continuous function f(x), with continuous derivative f (x). ii. The order of convergence for the Bisection method is linear. iii. We can use the Bisection method without any knowledge of the derivative f (x). (c) What happens if we use Newton s method to solve f(x) = 0, and the derivative f (x) happens to be zero at the exact location of the solution? (Circle the ONE most correct answer.) i. Newton s method should be avoided; the Secant method would be more robust in this case. ii. We may still be able to use Newton s method, if we have the explicit formula for f(x). However, the order of convergence would degrade to linear. iii. Newton s method would still have quadratic convergence, but we would need to start with an initial guess that is very close to the solution. (d) What would happen if we try to use an n-degree polynomial to interpolate n data points? (Circle the ONE most correct answer.) i. This is the normal case. A unique polynomial can be determined. ii. Such an interpolant generally exists, but it is not unique. iii. Such an interpolant will generally not exist. 2

2. [24% = 3 questions 8% each] SHORT ANSWER SECTION. Answer each of the following questions in no more than 2-3 sentences. (a) State (a) one advantage of the Vandermonde matrix method over Lagrange interpolation, and (b) one advantage of Newton interpolation over Lagrange interpolation. Answer: A polynomial constructed with the Vandermonde matrix method can be subsequently evaluated in O(n) time (as opposed to O(n 2 ) for Lagrange interpolation). Newton interpolation also allows for O(n) evaluation cost. (b) Assuming the point sampling is fixed, why would we prefer using piecewise polynomial interpolation rather than a single global polynomial interpolant? Answer: High degree polynomials tend to be highly oscillatory, so it is preferable to use piecewise interpolation with low degree polynomials. (c) Give two reasons why the triangular matrix method for Newton interpolation might be preferable over the Vandermonde matrix method. Answer: The triangular matrix method for Newton interpolation produces a lower triangular matrix that can be solved in time O(n 2 ) (as opposed to O(n 3 ) for the Vandermonde matrix). The triangular matrix is also better behaved compared to the Vandermonde matrix which starts becoming close to singular as the degree of the polynomial interpolant increases. 3

3. [16%] Assume that the fixed point iteration methods x k+1 = g(x k ) and x k+1 = h(x k ) are both guaranteed to converge in the same interval, and their order of convergence is quadratic. Would the fixed point iteration x k+1 = g(x k) + h(x k ) 2 also exhibit quadratic convergence or not? Explain. Answer: The new fixed point iteration is written as x k+1 = q(x k ), where q(x) = (g(x) + h(x))/2. If the first two fixed point iterations have quadratic convergence, we have that g (a) = h (a) = 0 at the solution x = a. Consequently, q (a) = 0 as well, and the corresponding fixed point iteration will converge quadratically also. 4

4. [16%] Using Newton interpolation, find a cubic polynomial that interpolates the four points: Answer: ( 2, 5), ( 1, 6), (1, 8), (2, 3) x i f[ ] f[, ] f[,, ] f[,,, ] 2 5 1 6 1 1 8 1 0 2 3 0 4 1 Reading the coefficients of the Newton polynomials from the diagonal of this table, the final interpolant becomes p(x) = 5 1 + ( 1) (x + 2) + 0 (x + 2)(x + 1) + 1 (x + 2)(x + 1)(x 1) = x 3 + 2x 2 2x 9 5

5. [20%] Consider the nonlinear equation f(x) = e 3x 2 = 0. Prove that Newton s method will always converge if started from a positive initial guess, and that convergence will be quadratic. Hint: If you write Newton s method in the form x k+1 = g(x k ), you can prove the first part of the question by showing that g(x) is a contraction for x > 0, and the second part by showing that g (a) = 0, where a is the solution. Answer: The iteration function for Newton s method is: and its derivative is g(x) = x f(x) f (x) = x e3x 2 3e 3x = x 1 3 + 2 3 e 3x g (x) = 1 2e 3x The condition g (x) < 1 is equivalently written as 1 2e 3x < 1 1 < 1 2e 3x < 1 2 < 2e 3x < 0 1 > e 3x > 0 which is true for all x > 0, indicating that g is a contraction in this case. The solution a satisfies f(a) = 0 e 3a 2 = 0 e 3a = 2. Thus, g (a) = 1 2e 3a = 1 2 e 3a = 1 2 2 = 0 and so it follows from Taylor s theorem that convergence is quadratic. 6