Math 128A
Numerical Analysis
Fall Quarter 2019
Instructor: Professor Bob Guy
Office: MSB 2136
Email: guy@math.ucdavis.edu
Phone: 7549201
Class webpage: www.math.ucdavis.edu/~guy/teaching/128a
Text: A First Course in Numerical Methods, by Uri Ascher and Chen Greif. SIAM, 2011.
Electronic version available through the library from
https://doi.org/10.1137/9780898719987
Teaching Assistants
Karry Wong, ucdwong@ucdavis.edu, MSB 3139
Carter Johnson, caljohnson@ucdavis.edu, MSB 2141
Office Hours
Monday, 4:155:30, Prof. Guy, MSB 2136
Tuesday, 1:002:00, Carter, MSB 2141
Wednesday, 11:3012:30, Prof. Guy, MSB 2136
Wednesday, 3:005:00, Karry, Academic Surge 1029
Thursday, 1:002:00, Carter, MSB 2141
Thursday, 4:005:30, Prof. Guy, MSB 2136
Homework
You are encouraged to talk with your classmates about homework
problems. You may work in groups with up to three students and turn
in a single writeup for the group. All aspects of your write up must
be clearly presented. Your writing should be clear and grammatically
correct. Your codes must be thoroughly commented. All tables and
figures must be appropriately labeled. You will be graded on the
quality of your presentation.
Late homework will not be accepted!
Homework 1, due Friday, 10/11
Homework 2, due Friday, 10/25
Homework 3, due Wednesday, 11/13
Homework 4, due Tuesday, 11/26
noisy_signal.txt
Homework 5, due Friday, 12/6
Homework Instructions:
 Some homework do's and don't's.
 You may work in groups of up to 3. You may work with people in either section of the class. Only one report will be submitted for each group. You must put all participating group members names on the report. If group members names are not on the report, they will not get credit for the homework. All members will get the same grade.
 Your writeup must be submitted as a single pdf file. Other file types will not be accepted.
 Your codes should be included in your writeup. You may attach them at the end of the writeup in an appendix. In the text make sure you refer to which code generated the results; e.g. "Results are in Table 1 below; see mycode1.m in the appendix for the source code."
 Cite your help. If you received help on a problem, e.g. friends (other than your group mates), TAs, books (other than our textbook) websites, etc., note this on the assignment. You will not lose credit for getting help as long as you acknowledge it.
 Presenting the homework requires doing mathematical analysis, computations by hand, writing and running computer codes, and making tables and graphs. It is recommended that you type up your reports, but this is not required. If you hand write your solutions, they must be neat. You can attach graphs and tables to the problems in appropriate places. To submit your assignment, scan the document and upload the resulting pdf to canvas.
You may also type up part of the assignment and hand write others. For example, you may find it easier to hand write mathematical analysis.
 You are being graded on clarity as well as correctness. For example, graphs must have labeled axes, captions or/and titles, and legends when appropriate. Tables must be clearly labeled and captioned as appropriate. You must write in complete, grammatically correct sentences.
Programming
This class will require writing computer
programs. You may use any language. All codes will be turned in and
must be thoroughly commented.
If you do not have a strong preference of language, it is recommended
that you use MATLAB, because it is easy to use and very
powerful. Further there are example MATLAB programs in the text, and I
will occasionally give examples in MATLAB. Other languages that offer
similar convenience include python, R, and julia.
UCD students can obtain a free student license for MATLAB. Also, you
can create a computer account in the math department at
http://www.math.ucdavis.edu/comp/classaccts.
What we will cover
Roundoff error and floating point arithmetic (Ch 2)
Polynomial interpolation (Ch 10)
Piecewise polynomial interpolation (Ch 11)
Numerical differentiation (Ch 14)
Approximation theory (Ch 12)
Fourier transform, approximation & interpolation by trig polynomials (Ch 13)
Numerical integration (Ch 15)
Prerequisites
MAT21C (i.e. first year calculus) and any of ECS30, ECS32A, ENG6, EME5 (i.e. programming)
Grading
Your grade for the course will be based on your homework assignments,
a midterm exam, and a final exam. Your lowest homework score will be
dropped. The weights for each of these are as follows: the final. The
weights for each of these are as follows:
Homework 
50% 
Midterm

15%

Final Exam

35%

Exam Dates
Midterm, Friday, November 1st.
Final exam, Monday, December 9th.
Announcements
 12/6  Review session on Saturday 12/7 from 46 PM in Olson 206. I will answer your questions and review concepts at your request.
 12/4  Final exam information:
 Some extra problems to practice are now posted here .
 You may you may bring one handwritten 8.5 inch by 11 inch sheet of notes to the exam.
 10/28  Midterm information:
 Some extra problems to practice are now posted here .
 Karry will host a review session Wednesday, 10/30, 7:109:00 PM in Storer 1322.
 You may you may bring one handwritten 8.5 inch by 11 inch sheet of notes to the exam.
 10/9  office hours are 12:0512:55 today
Lectures/Calendar
Day 
Topics 
25Sept. 
Lecture
Intro to class
Order of convergence
absolute/relative error
Example codes
riemann_ex1.m,
riemann_ex1.py
riemann_ex2.m, riemann_ex2.py

27Sept. 
Lecture
Riemann sum example (see codes previous lecture)
Errors and floating point numbers (Chapter 2)
Example codes
rounding_unit_estimation.m,
rounding_unit_estimation.py

30Sept. 
Lecture Errors and floating point numbers (Chapter 2), continued

02Oct. 
Lecture
Round off examples (2.3)
Taylor polynomials/series
Introduce polynomial interpolation

04Oct. 
Lecture
Polynomial interpolation
Lagrange form
Theorems on existence, uniqueness, error bound

07Oct. 
Lecture
Theorems on uniqueness and error bound for interpolation
Barycentric form, evaluating Lagrange form efficiently

09Oct. 
Lecture
Newton form of the interpolating polynomial
Divided differences

11Oct. 
Lecture
Examples of interpolation, choice of points matters
Plots shown in class
Theorem on divided differences and accracy revisited
Codes
table10p5_interp_demo.m ,
divdif.m ,
evalnewt.m ,
newton_interp.m
table10p5_interp_demo.py,
newton_poly.py

14Oct. 
Lecture
Interpolating with derivative values (10.7, briefly)
Begin Ch. 11, piecewise linear and piecewise Hermite cubic interpolation
Plots shown in class

16Oct. 
Lecture
piecewise Hermite cubic interpolation
Plots shown in class
begin cubic splines

18Oct. 
Lecture
cubic splines

21Oct. 
Lecture
linear system for cubic spline
accuracy of clamped splines
parametric curves

23Oct. 
Lecture
demonstration of splines and Hermite cubics in drawing programs
begin numerical differentiation (Ch. 14)

25Oct. 
Lecture
Taylor series to analyze/derive finite difference formulas

28Oct. 
Lecture
interpolation to derive finite difference formulas
effect of errors in numerical differentiation

30Oct. 
Lecture
discrete least squares approximation (Ch 6.1)

1Nov. 
Midterm

4Nov. 
Lecture
continuous least squares (Ch. 12.1)
begin orthogonal functions
Plots shown in class

6Nov. 
Lecture
orthogonal functions
Lagendre polynomials

8Nov. 
Lecture
Chebyshev polynomials

13Nov. 
Lecture
Chebyshev polynomials, min/max property
optimal points for polynomial interpolation

15Nov. 
Lecture
Trig polynomial approximation
Fourier series

18Nov. 
Lecture
Discrete Fourier transform

20Nov. 
Lecture
FFT
begin numerical integration

22Nov. 
Lecture
Numerical integration

25Nov. 
Lecture
Error analysis of numerical integration

27Nov. 
Lecture
Error analysis for Simpson's rule
Begin Gaussian quadrature

2Dec. 
Lecture
Gaussian quadrature

4Dec. 
Lecture
Gaussian quadrature examples
Adaptive quadrature
plots from class

6Dec. 
Review
