NUMERICAL ANALYSIS WEEKLY OVERVIEW

Similar documents
Section Instructors: by now you should be scheduled into one of the following Sections:

MAT 211, Spring 2015, Introduction to Linear Algebra.

Applied Linear Algebra in Geoscience Using MATLAB

Columbus State Community College Mathematics Department Public Syllabus

Announcements Monday, November 13

HONORS LINEAR ALGEBRA (MATH V 2020) SPRING 2013

The value of a problem is not so much coming up with the answer as in the ideas and attempted ideas it forces on the would be solver I.N.

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

AIMS Exercise Set # 1

Announcements Monday, November 13

course overview 18.06: Linear Algebra

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

Applied Linear Algebra

CHEMISTRY 101 DETAILED WEEKLY TEXTBOOK HOMEWORK & READING SCHEDULE *

Reduction to the associated homogeneous system via a particular solution

LAKELAND COMMUNITY COLLEGE COURSE OUTLINE FORM

CENTRAL TEXAS COLLEGE SYLLABUS FOR MATH 2318 Linear Algebra. Semester Hours Credit: 3

Math 200D - Linear Algebra Fall Term 2017 Course Description

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

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

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

Introduction to Numerical Analysis

Main topics for the First Midterm Exam

LINEAR ALGEBRA KNOWLEDGE SURVEY

Overlake School Summer Math Packet AP Calculus AB

Math 164 (Lec 1): Optimization Instructor: Alpár R. Mészáros

Math 1021, Linear Algebra 1. Section: A at 10am, B at 2:30pm

MATH 304 Linear Algebra Lecture 20: The Gram-Schmidt process (continued). Eigenvalues and eigenvectors.

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics

INTRODUCTION, FOUNDATIONS

MAT188H1S LINEAR ALGEBRA: Course Information as of February 2, Calendar Description:

Math 115 Practice for Exam 2

Mathematics 1 Lecture Notes Chapter 1 Algebra Review

22A-2 SUMMER 2014 LECTURE Agenda

LINEAR ALGEBRA: M340L EE, 54300, Fall 2017

HOSTOS COMMUNITY COLLEGE DEPARTMENT OF MATHEMATICS

Introduction to the Mathematical and Statistical Foundations of Econometrics Herman J. Bierens Pennsylvania State University

Math 1553 Introduction to Linear Algebra. School of Mathematics Georgia Institute of Technology

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

MATH 54 - FINAL EXAM STUDY GUIDE

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics. MATH C Test #1. October 23, 2013.

Preliminary Examination, Numerical Analysis, August 2016

AS MATHEMATICS HOMEWORK C1

Lecture 4: Applications of Orthogonality: QR Decompositions

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

MTH 132 Solutions to Exam 2 November 21st, Without fully opening the exam, check that you have pages 1 through 11.

Without fully opening the exam, check that you have pages 1 through 11.

Herndon High School Geometry Honors Summer Assignment

MA 113 Calculus I Fall 2012 Exam 3 13 November Multiple Choice Answers. Question

Elementary Numerical Mathematics

Math 200 A and B: Linear Algebra Spring Term 2007 Course Description

MTH 132 Solutions to Exam 2 Apr. 13th 2015

MTH 132 Exam 2 November 21st, Without fully opening the exam, check that you have pages 1 through 11.

CS1210 Lecture 23 March 8, 2019

Bishop Kelley High School Summer Math Program Course: Honors Pre-Calculus

Pre-calculus Lesson Plan. Week of:

A 2. =... = c c N. 's arise from the three types of elementary row operations. If rref A = I its determinant is 1, and A = c 1

Spring 2017 Midterm 1 04/26/2017

Preface. Figures Figures appearing in the text were prepared using MATLAB R. For product information, please contact:

Name: Instructor: 1. a b c d e. 15. a b c d e. 2. a b c d e a b c d e. 16. a b c d e a b c d e. 4. a b c d e... 5.

MA 113 Calculus I Fall 2015 Exam 3 Tuesday, 17 November Multiple Choice Answers. Question

Intro to Linear & Nonlinear Optimization

Math 250B Midterm I Information Fall 2018

Linear Algebra. Maths Preliminaries. Wei CSE, UNSW. September 9, /29

Lectures about Python, useful both for beginners and experts, can be found at (

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.

School of Sciences Indira Gandhi National Open University Maidan Garhi, New Delhi (For January 2012 cycle)

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

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

Exam in TMA4215 December 7th 2012

Linear Algebra Done Wrong. Sergei Treil. Department of Mathematics, Brown University

Columbus State Community College Mathematics Department. CREDITS: 5 CLASS HOURS PER WEEK: 5 PREREQUISITES: MATH 2173 with a C or higher

We can see that f(2) is undefined. (Plugging x = 2 into the function results in a 0 in the denominator)

Applied Linear Algebra in Geoscience Using MATLAB

Leon, Chap. 1. Chap. 2

Math 3B: Lecture 1. Noah White. September 29, 2017

HW5 computer problem: modelling a dye molecule Objectives By the end of this lab you should: Know how to manipulate complex numbers and matrices. Prog

9.1 - Systems of Linear Equations: Two Variables

A Level Maths summer preparation work

Recitation 9: Probability Matrices and Real Symmetric Matrices. 3 Probability Matrices: Definitions and Examples

NAME: MA Sample Final Exam. Record all your answers on the answer sheet provided. The answer sheet is the only thing that will be graded.

Math 224, Fall 2007 Exam 3 Thursday, December 6, 2007

1 Backward and Forward Error

Lecture 1: Systems of linear equations and their solutions

Math (P)Review Part I:

MATH 20B MIDTERM #2 REVIEW

MATH 3330 INFORMATION SHEET FOR TEST 3 SPRING Test 3 will be in PKH 113 in class time, Tues April 21

MATHEMATICS. Course Syllabus. Section A: Linear Algebra. Subject Code: MA. Course Structure. Ordinary Differential Equations

Syllabus for Math Foundations of Analysis I - II

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Special Two-Semester Linear Algebra Course (Fall 2012 and Spring 2013)

Mathematical Optimisation, Chpt 2: Linear Equations and inequalities

ECON 4117/5111 Mathematical Economics

School of Mathematics Georgia Institute of Technology. Math 1553 Introduction to Linear Algebra

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

Midterm Review. Igor Yanovsky (Math 151A TA)

Intro to Scientific Computing: How long does it take to find a needle in a haystack?

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

Transcription:

NUMERICAL ANALYSIS WEEKLY OVERVIEW M. AUTH 1. Monday 28 August Students are encouraged to download Anaconda Python. Anaconda is a version of Python that comes with some numerical packages (numpy and matplotlib) as well as an IDE (Spyder) that we will use in this course. I ve added a link to our website with instructions for you to download Anaconda. Please download version Python 3.6, since this is the version of Python used in our book. In class we started to do some Python programming from Chapter 2. We covered Example 2.2, Exercise 2.6, and the if statement in Section 2.3.1. 2. Wednesday 6 September We worked through some examples and exercises in the second Chapter of Newman s book. Please work through this Chapter on your own and with groups of students. It is important to become comfortable with these basic programming idioms. One good way to become more comfortable with the code in Chapter 2 is to experiment by changing indentation or introducing a print statement in order to track a variable. It is particularly important that you understand lists, arrays, and for loops. We will be using them over and over during the semester. 3. Monday 11 September We finished chapter 2 by spending some time working through the multiple loops required to approximate the Madelung constant in Exercise 2.9. We also talked about user defined functions as being a way to hide detail in our code. It is a good idea to review the good style recommendations in chapter 2 as you progress through the course. We also covered chapters 3 and 4. Neither chapter is a focus of our course but it is helpful to become comfortable with both. When faced with a difficult computation it is often helpful to view some of the output (approximations) geometrically. Chapter 3 explains how to view graphs in python and how to include others data files in your code. Chapter 4 discusses computer rounding error. 4. Monday 18 September We started to work through Peter Olver s Lecture Notes on Numerical Analysis. Please read the first two lectures. We covered the first lecture and then made about half-way through the second in class on Monday. We proved our first theorem of the course, proposition 2.2. Please read the lecture notes 1 and 2, and then attempt to do the supplementary homework problems on our webpage. We will finish lecture 2 next week. 1

2 M. AUTH Here is the code we used in class to generate solutions (sequences) to discrete dynamical systems u (k+1) = g(u (k) ). # Discrete Dynamical System Algorithm def g(u): """Discrete Dynamical System u=g(u)=0.5*u""" return 0.5*u u = 7.83 # u_0 = seed for k in range(25): print(k,u) # prints the first 25 elements of sequence u = g(u) 5. Monday 25 September We talked about how some fixed points are stable and others are unstable. It is a waste of time to try to approximate an unstable fixed point using a discrete dynamical system. We found two ways to identify the stability of a fixed point: 1. Draw a stair diagram 2. Use the following theorem from Olver s notes Theorem 5.1. (Theorem 2.6 in Olver s Notes) Let g(u) be continuously differentiable. Suppose that u = g(u ) is a fixed point. If g (u ) < 1, then u is an asymptotically stable fixed point. On the other hand if g (u ) > 1, then u is an unstable fixed point, the only iterates which converge to it are those that land exactly on it. Proof. ANALYSIS IN MATH 328 USES INEQUALITIES e (k) = u (k) u Mean Value Theorem: e (k+1) = g (v)e (k) If g (v) σ < 1 for all v close to u then e (k) σ e (k 1) σ 2 e (k 2)... σ k e (0) if the u (0) is close to u. hence lim k e (k) = lim k u (k) u = 0. 6. Monday 2 October We defined periodic orbits and quadratic convergence. A period k orbit of a discrete dynamical system is a solution that satisfies u (n+k) = u (n) for all n. Theorem 6.1. (THEOREM 2.10 Olver s Notes) Suppose that g C 2, and u = g(u ) and g (u ) = 0. Then for all iterates u (k) sufficiently close to u, the errors e (k) = u (k) u satisfy the quadratic convergence estimate: e (k+1) τ e (k) 2 for some constant τ > 0. In conclusion quadratic convergence is preferable. Start with u (0) having one decimal place accuracy. Linear Convergence (and σ =.1) : It requires 49 iterations to obtain 50 decimal place accuracy. Quadratic Convergence (and τ = 1) : It requires 6 iterations to obtain 64 decimal place accuracy.

NUMERICAL ANALYSIS WEEKLY OVERVIEW 3 Theorem 6.2. (Theorem 2.17 NEWTON S METHOD in Olver s Notes) f C 2, f(u ) = 0, f (u ) 0 then Newton s iteration converges at quadratic rate if seed is sufficiently close. Example 6.3. Approximate a root of 0 = f(x) = cos x x using (1) Any fixed point method from math import cos def g(u): return cos(u) u = 1 print(0,u) for k in range(1,27): u = g(u) print(k,u) (2) Newton s method (a better fixed point method) from math import cos, sin def f(x): return cos(x) - x def f_prime(x): return -sin(x) - 1 u = 1 print(0,u) for k in range(1,7): u = u - f(u)/f_prime(u) print(k,u) (3) Bisection method. from math import cos def f(x): return cos(x) - x a,b = 0,5 # we know f(a)>0 and f(b)<0 and f is continuous for k in range(25): mid = (a+b)/2 print(k,mid) if f(mid) > 0: a,b = mid,b else: a,b = a,mid

4 M. AUTH 7. Wednesday 11 October Covered algorithms and code for left Riemann sums, trapezoid method, and Simpson s method. We did not cover the error formulas and they will not be on Exam 1. Make sure you understand how the algorithms work. from math import sin def f(x): return sin(x) def left_endpoint(f,a,b,n): """Computes left endpoint Riemann sum approx of integral of f from a to b using n equally spaced intervals.""" S = 0 deltax = (b-a)/n for k in range(n): S += f(a + k*deltax)*deltax return S #for i in range(1,20): # print(i,left_endpoint(f,0,2,i)) 8. Monday 16 October We covered the first two sections of Olver s notes 4. Gaussian Elimination. We worked through many examples of how the Gaussian Elimination algorithm works. We did not implement Gaussian Elimination in Python so the code for Gaussian Elimination will not be part of exam 1. We only implemented code to multiply matrices A and B: from numpy import array, zeros A = array([[1,2,3], [0,9,-1], [6,-2,0]], float) B = array([[7,0], [-2,-1], [1,0]], float) n,m = len(a),len(b[0]) p = len(b) C = zeros((n,m)) for i in range(n): for j in range(m): for k in range(p): C[i][j] += A[i][k] * B[k][j] print(c) You should know how this code works (triple loops) but you should never use it in practice. Instead use numpy s dot function. Here is how you would do the same as above using dot: from numpy import array, dot

NUMERICAL ANALYSIS WEEKLY OVERVIEW 5 A = array([[1,2,3], [0,9,-1], [6,-2,0]], float) B = array([[7,0], [-2,-1], [1,0]], float) C = dot(a,b) print(c) 9. Monday 23 October Finish Olver s notes 4. Gaussian Elimination and start 5. Inner Products and Norms. Short review for exam 1. Exam 1 on Wednesday. Focus on the supplemental hw problems. Reread notes and make sure you understand the programming concepts introduced in Newman Chapters 1 3. 10. Monday 30 October We discussed Olver s notes 5. Inner Products and Norms and 7. Iterative Methods for Linear Systems (only first three pages, through p. 105). We also spent a full day reviewing linear algebra. In particular we discussed independence, spanning, and basis. If you feel as if you need more review of linear algebra, you can watch Gilbert Strang s video lectures 2-5, 6(only first 30 minutes), 9(only first 38 minutes). There is a link to these videos on our webpage. 11. Monday 6 November Read sections 6.1 6.3 in Olver s notes. Watch Strang s video Lecture 22 Diagonalization and Powers of A from 26:30 end. Read sections 7.1, 7.2, and 8.1. 12. Monday 13 November Read sections 7.3 and 7.4 in Olver s notes (in section 7.4 only read through end of p. 122 you will not be tested on the Gauss-Seidel or SOR methods). Read Olver s notes 9. Numerical Solutions of Algebraic Systems. Read Newman s section 6.2 Eigenvalues and Eigenvectors as well as section 6.3.7 Newton s Method For Two Or More Variables. If you prefer to learn by watching videos, watch Strang s video lecture 17 Orthogonal Matrices and Gram-Schmidt (we will cover projections after Thanksgiving break.) 13. Monday 20 November Read Olver s notes 10 (up to and including EXAMPLE 10.19) Numerical Solutions of Ordinary Differential Equations. Skim Newman s Chapter 8 Ordinary Differential Equations (ONLY p. 327 335) looking for Python code. If you prefer to learn via videos, there is a lot of good information in Arthur Mattuck s first two lecture videos: Lecture 1. The geometry of y = f(x, y) and Lecture 2. Euler s Numerical Method for y = f(x, y). There is a link to these videos on our webpage.

6 M. AUTH 14. Monday 27 November Finish Olver s Notes 10 and Newman 8.1 8.4. WEDESDAY EXAM will cover material we covered from Monday 16 October up to and including the material Monday 20 November on Differential equations. You should understand Theorem 4.3, Theorem 4.7, Proposition 6.9, Theorem 6.14, Theorem 6.17, Theorem 7.2, Theorem 7.11, Corollary 7.19, Theorem 7.26, Theorem 9.2, Theorem 9.3, and Theorem 10.8 from Olver s notes. You need not know how to rigorously prove each of these theorems but you should know each of their hypotheses and conclusions. Most importantly you should know how they are used. 15. Monday 4 December Read Olver s notes 13. Approximation and Interpolation. Skip sections Approximation and Interpolation by General Functions and Weighted Least Squares, i.e. you need not read pages 231 234. References