# MAT 402, Undergraduate Seminar, Spring 2023

## Department of Mathematics , Stony Brook University

Office: 4-112 Mathematics Building
Phone: (631)-632-8274
Dept. Phone: (631)-632-8290
FAX: (631)-632-7631

### Time and Place

M-W 2:40-4:00, Math S-235 (computer lab on SL level)

### Textbook

Approximation Theory and Approximation Practice, by Lloyd N. Trefethen, SIAM, 2013. Extended version published in 2019. The 2019 version is preferred, but the 2013 version should be OK for class. The extended version has some mistakes corrected and has some appendices on Fourier series and Laurent expansions.
Trefethen's homepage
First 6 Chapters of textbook for free. This will be enough for the first few lectures. Look at these to get an idea of what the course will be like.
All chapters of textbook as MATLAB files. You can download each chapter as a MATLAB script and produce a LaTeX file using the publish command in MATLAB. Use publish('chap1','latex') to get the .tex file for Chapter 1. You will then need to use LaTex to produce a PDF file from this.
List of errata ,
SIAM page to purchase textbook
Amazon page to purchase textbook

### Course description

This is a course about approximating general functions (mostly on the real line) by polynomials and rational functions. This is an long standing problem with much history and is still of fundamental importance, since any computation must be broken down into addition, multiplication and division, so the only functions we can really compute are those that can be approximated by polynomials and rational functions.

The textbook is broken into short chapters with many exercises based on the MATLAB computer language. I will give the initial lectures to introduce the topic and MATLAB. After a few meetings I will assign problems to students to do and present in class. A little later I will start to assign sections of the book to students to present in class. Near the end of the semester, students will choose topic to study and present in class and will prepare a short paper on this topic.

The textbook is unusual in that it combines theorems with calculations and includes many examples computed using MATLAB. The class will meet in a computer lab S-235 in the basement of the math building. MATLAB is available on SINC site computers, online via the Virtual SINC site, or free to download from the SBU DoIT site. The latter is probably the most convenient if you want to work on the class with your own laptop or desktop. The textbook also assumes  you have downloaded the program CHEBFUN written by Trefethen and his collaborators and stored it on the machine you are using (or in your SBUfiles if you are using SINC site machines). This is easy to do I will explain in class (also see the class website).  Prof Trefethen is a distinguished professor at NYU and is head of the numerical analysis lab at Oxford University.

The basic theme of the course is based on the famous Weierstrass approximation theorem: every continuous function on an interval [1,b] can be uniformly approximated by polynomials, a result often covered in an undergraduate analysis course. But, given the function f how do you find the approximating polynomials on a computer? Some other questions include:
- The space of degree n polynomials is a vector space. What is a "good" basis for this vector space? 1,x,x^2, x^3,... is a basis, but is not "good".
- How large a degree polynomial do we need to approximate f within epsilon? How does this depend on f?
- How large a degree polynomial can we handle on computer? Tens? Hundreds?  Thousands?
- What does the approximating polynomial look like off the interval [a,b]?
- Can we do better with rational functions than with polynomials?
- Can we compute the "best" polynomial approximation to a continuous function f? What does "best" mean? Is the best approximation unique?
- Can we approximate discontinuous functions?

Trefethen's book deals with all these questions and much more. I hope to cover about half the book, although we may skip around a bit.

### Trefethen's NYU lectures on ATAP

In 2015 Prof. Trefethen gave a series of 12 lectures on the 28 chaapters of his book ATAP: List of lectures . and Links to individual lectures .

### Prerequisites

Calculus and linear algebra are definitely needed. The courses on real analysis (MAT 319 or 320) will be a big help, as will complex analysis (MAT 342). Knowing MATLAB is not required, as we will go through basic MATLAB commands in class. (People with more programming experience will be able to choose more technical projects if they wish; more theoretical or historical options will also be available).

Before class begins, it would be a good idea to get the book (there is a link to the first 6 chapters for free on the class webpage). There is a 2013 version and a more recent "extended version". Either is fine, though the extended version would be better. Also try to run MATLAB on the virtual SINC site or download it to your own machine; if you have problems bring your questions to the class.

Grading is based on quizzes, presentations and a final project, and each component is worth one third of the grade. The short quizzes will test the basic MATLAB commands we learn in class and the definitions and theorems from the textbook. Presentations and participation will also count for a third; this is a seminar, so after the initial meetings most material is presented by the students. Near the end of the course, We will reserve about half a lecture for each final report; the written version will also be graded for clarity and correctness. There will not be a final exam.

### Projects

Projects must be related to the topic of the course and textbook, but are otherwise quite flexible. One possibility is to summarize material in sections of the textbook that we will not cover in class. Another is to read and summarize one of the papers cited in the textbook, or to investigate the history of some topic we discuss. Another is to summarize some application of approximation theory and/or Chebfun: many such applications are described in the Chebfun examples page. I do request that different students choose different topics; eventually I will post who is doing what on this page (first come, first serve on topics, so let me know what you are interested in as soon as possible). Some ideas are listed below, others will be added later.

Six proofs of the Weiertrass Theorem
The Stone-Weierstrass theorem
Runge's theorem
Mergelyan's theorem
Best polynomial approximation: L^2 versus sup norm
A continuous function with divergent Foruier series
Biography of some mathematician related to approximation
Summary of some paper cited by the textbook
What are wavelets?
Proof that nueral nets can approximate any contnuous function.
Best rational approximation of |x| or x^\alpha (Stahl)
Caratheodory's theorem on approximation by finite Blaschke products
Smoothness and rates of approximation
Weierstrass's nowhere differentiable function
Approximating Brownian motion
The fast Fourier transform
Myths of polynomial interpolation
Spherical harmonics
Zeros of random polynomials
Hilbert's polynomial lemniscate theorem
The polynomial ham sandwich theorem

### The 100 digit challenge

SIAM 100-digit Challenge . This book describes ten problems, each to solve a certain problem to ten decimal places. Writing a report on one of these problems would be a suitable project for the class.

### MATLAB

MATLAB is a high level computer language that is widely used in industry and scientific computation. It has many build in features and lots of documentation. You can purchase an individual student license for around \$50, but MATLAB is currently provided free by a university license. You can either download a copy onto your own laptop or computer, or you can access it on the Stony Brook Virtual SINC site. I will show you how to do this on the machines in our meeting room S-235.

I suggest you try to download MATLAB (or access it on the virtual SINC site) ahead of the first class meeting. Below are some links to instructions on how to do this, as well as some helpful books on how to get started with basic commands. We will cover this in class, but a head start can't hurt.

Learning MATLAB by Toby Driscoll. Short, but very helpful. You should look at this before class begins, or read it the first week.

Numerical Computing in MATLAB by Cleve Moler (the creator of MATLAB). More definitive source. Individual chapters can be downloaded.

The origins of MATLAB , by Cleve Moler.

Download MATLAB for Stony Brook students . Instructions on how to download and activate MATLAB on you own machine. This is probably more convenient than having to use MATLAB on the virtual SINC site all the time. MATLAB comes with many extra packages called "toolboxes" but we will need any of them for this class (but see CHEBFUN below).

Download Chebfun . The textbook is based on an extension of MATLAB called CHEBFUN. We will need to download it to recreated the examples in the book and do the exercises. CHEBFUN only needs basic MATLAB to run; no extra toolboxes required.

Guide to Chebfun. The documention. We will use ideas from at last the first four chapters.

Stony Brook Virtual SINC Site. You should be able to access MATLAB here.

### Scripts

I will place some MATLAB scripts here, that I have written to illustrate ideas in class. If you have some code you want to share, send it to me to place here.

### Top Ten Algorthims

IEEE journal devoted to the "top ten" algorithms of the 20th centrury. The individual journal articles require a passwork, but many can be found somewhere on the internet.

### Tentative Lecture Schedule

Eventually, this section will list who is presenting what material on which day.

Mon Jan 23: First class.
Introduction to approximation theory. Discuss textbook, the Weierstrass theorem, different notions of best approximation.
Wed Jan 25: Learning MATLAB, Chapters 1 and 2.
Basic MATLAB commands and arrays: arithmetic, built-in functions, plotting, close all, exporting plots, arrays, linear algebra, sparse matrices, logical indexing, rand, randi, strings, vpa, strings, strfind, save,
Mon Jan 30: Learning MATLAB, Chapter 2.
SG 2.9, HL 2.2, DM 2.8, AT 2.5.
Plotting, scripts and functions.
Wed Feb 1: Learning MATLAB, Chapter 3 problems.
SG 3.3, HL 3.2, DM 3.1, AT 3.4.
Anonymous functions. Chebfun Guide, Chapter 1, introduction.
Mon Feb 6 :
Chebfun Guide, Chapter 2, integration and differentiation: DM sections 2.1 and 2.2, HL sections 2.3 and 2.4.
Chebfun Guide, Chapter 3, root finding and extremums: AT sections 3.1 and 3.2, SG sections 3.3 and 3.4.
Wed Feb 8: No class
Mon Feb 13: ATAP Chapter 2, Chebyshev Points and Interpolants:
SG text pages 7-10; DM Ex 2.1, 2.2; HL Ex 2.3, 2.4.
Wed Feb 15:
Finish ATAP Chapter 2: AT Ex 2.5, 2.6.
ATAP Chapter 3. Chebyshev Polynomials and Series: HL text pages 13-16;
Mon Feb 20:
Finish ATAP Chapter 3: DM text pages 17-21; AT Ex 3.1, 3.4; SG Ex 3.6, 3.7.
Wed Feb 22 :
ATAP Chapter 4. Interpolants, Projections, and Aliasing: AT (or TSW) text pages 25-30; HL Ex 4.1; DM Ex 4.2; SG 4.3; TWS 4.4.
Mon Feb 27:
ATAP Chapter 5. Barycentric Interpolation Formula: SG text pages 33-39; HL Ex 5.2 and 5.4; DM Ex 5.5 and 5.6; AT Ex 5.7 and 5.10; TWS 5.8, 5.9.
Wed Mar 1 :
ATAP Chapter 6. Weierstrass Approximation Theorem: HL text pages 43-46; SG Ex 6.1; TWS 6.4; DM Ex 6.5; AT Ex 6.7.
Mon Feb 6 :
ATAP Chapter 7. Convergence for differentiable functions: DM text; SG Ex 7.1, 7.2; HL Ex 7.3, 7.4; TSW Ex 7.5, 7.6;
Wed Mar 8: No Class, CB away.
Mon Mar 13 : No Class, Spring Break
Wed Mar 15: No Class, Spring Break
Mon Mar 20 :
ATAP Chapter 8. Convergence for analytic functions: AT text; DM Ex 8.3; SG Ex 8.7; HL Ex 8.12; TSW Ex 8.9;
Wed Mar 22:
ATAP Chapter 9. Gibbs phenomenon: DM text; AT Ex 9.3; SG Ex 9.5; HL Ex 9.7; TSW Ex 9.8;
Mon Mar 27 :
ATAP Chapter 10. Best approximation: SG text; AT Ex 10.6; DM Ex 10.7; HL Ex 10.8; TSW Ex 10.11;
Wed Mar 29 :
ATAP Chapter 11. Hermite integral formula: HL text; AT Ex 11.1; DM Ex 11.3;
Mon Apr 3 :
ATAP Chapter 12. Potential theory and approximation: TWS text; HL Ex 12.1;
Wed Apr 5 :
ATAP Chapter 13. Equispaced points, Runge phenomenon: AT text; DM Ex 13.1; SG Ex 13.3; HKL Ex 13.4; TWS Ex 13.5;
Mon Apr 10 : ATAP Chapter 14. Discussion of high order polynomial approimation and ATAP Chapter 15. Lebesgue constants
Chap 14: Trefethen NYU lecture
Chap 15: SG text; AT Ex 15.9; HL Ex 15.10; TWS 15.11
Wed Apr 12 : ATAP Chapter 17. Orthogonal polynomials
HK text; AT Ex 17.4; SG Ex 17.5; TWS 17.8
Mon Apr 17 : Trefethen visit, class will meet on Zoom. I will email the link.
Wed Apr 19 : Class canceled
Mon Apr 24 : Report presentation: HK
Wed Apr 26 : Report presentation: SG and TWS
Mon May 1 : Report presentation: AT
Wed May 3 : Report presentation: DM Last class. No final exam.

### Office hours

After class and noon to 1:00 on Wednesdays. I am also happy to make appointments for other times, meet via Zoom, or answer questions via email.

### Online classes

In some unusual circumstances, I may have to hold class online. If this arises, I will send instructions out ahead of time.

### MATLAB publish

It is possible to prepare reports directly in MATLAB in a way that combines text with figures and tables computed in MATLAB. The textbook was prepared this way: each chapter is actaully the output of a MATLAB program. This would be a good way to prepare your own report for the class.

### LaTeX

Another report option is LaTeX, a typsetting program that is widely used in mathematics, physics and computer science. If you are planning to go to graduate school in one of these areas, your thesis and published papers will likely be prepared in some version of LaTex (many journals require manuscripts be submitted in this format).