The City College of New YorkCCNY
Department of Mathematics
Division of Science

Math 32800 Spring 2023

Topics

Topic List

Five Ways to Download Python for this course. Choose One.

  1. Install Anaconda Python 3.7 (Recommended) with a user's guide

  2. Install MiniConda Python 3.7 (if the above Anaconda download is too big for your computer.)

  3. Use Python Online without installation at SageMath

  4. Basic Install

  5. Collab: online python does not require any downloads.

Python: A Three Week Crash Course

You must know learn basic Python, Matlab, or even C++ programming skills.... I think that Python is the easiest to get started but Matlab can more convenient for non computer science students. Matlab suffers from being expensive after you leave CCNY.

During the first three weeks we will focus on using loops to approximate infinite sequences, series, Riemann sums, and Euler's method for IVPs. We will also discuss data structures for vectors, matrices, and functions, and how to work with these data structures. During the first three weeks we will not focus on convergence speed, and approximation errors. Convergence speed and error will be the focus of the remainder of the semester.

Readings:

  1. Computational Physics (free sample chapters 2,3,4, ONLY. Do NOT buy.)

"Computational Physics" is a well-written introduction to scientific computing in Python and numpy. It also illustrates how physics students use computation. I find it helpful to understand how other scientists use the algorithms in this course before studying the convergence and errors involved in using these algorithms.

  1. Calculus in Context

The first two chapters of the freely available textbook "Calculus in Context" provide a very basic introduction to using Euler's method to approximate solutions to initial value problems (IVP). Approximating solutions to IVPs numerically is one of the key topics of this course and one of the reasons numerical analysis is of great interest to many scientists and engineers. This introduction will ultimately be too basic for our course since convergence and error are not discussed in a meaningful way. However it can be helpful to work through the basic exercises concerning Euler's method in these first two chapters before thinking about the difficult numerical analysis topics of convergence speed and approximation errors.

Watch the first three videos of Arthur Mattuck Differential Equations Lecture Videos provide solid geometric motivation of Euler's method, as well as explanations of some higher order methods we will study at the end of our course. Please watch these three videos.

The notes and exercises linked below will help you better appreciate the videos.

Graphical and Numerical Methods (Notes)

Graphical and Numerical Methods Exercises (1C)

Solutions to Graphical and Numerical Exercises

Python Code

Python Code for "Calculus in Context"

Python Code for "A First Course in Numerical Analysis"

Textbook Discount

Follow these instructions to receive a 20% discount when purchasing our textbook, "A First Course in Numerical Methods", by Ascher and Greif, Siam, 2011. There is a digital version as well. You must get access to this text. I will place a copy on reserve in the Science library in Marshak.

Assignments from "A First Course in Numerical Methods", by Ascher and Greif

Here is some good advice: Read the textbook. Learning how to read a math textbook will be helpful in all your future math courses. Start practicing reading your math textbook during our three week python crash course by reading all assignments.

Here is some more good advice: Consistently do lots of problems. Between textbook examples and exercises, and my problem sets linked below there are more problems than any one student can complete. It is better to consistently to spend an hour every day doing an assortment of math problems than to spend the weekend before an exam cramming. Consider the final exam like running a marathon and the problems as your training sessions. If you consistently do problems (train) then you will be well-prepared for the final exam but if you take long gaps between working on problems you will always have difficulty getting back into the math mindset necessary to complete the problems. The first day of training is always the most painful.

Final piece of good advice: Form study groups and go to office hours or tutoring when stuck. There is evidence that students who form study groups perform better in college math classes than students who work alone. A quick conversation with a group of students after class sometimes clear up a confusing point. Do not spend more than a day or two being stuck on a problem or idea. There is not enough time in the semester to remain stuck and not practicing. Ask for help instead.

Chapter 1 and partial solutions

Chapter 3 and partial solutions

Chapter 4 and partial solutions

Chapter 5 and partial solutions

Chapter 6 and partial solutions

Chapter 7 and partial solutions

Chapter 8 and partial solutions

Chapter 9 and partial solutions

Chapter 10 and partial solutions

Chapters 14, 15, 16 and partial solutions

Class Slides from "A First Course in Numerical Methods", by Ascher and Greif

Chapter 1

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Chapters 14, 15, 16

Practice Final Exam

Practice Final Exam

Practice Computer Final Exam

HW Quizzes

Instead of collecting the homework problems, I give hw quizzes almost every Monday. On some quizzes I allow students to use computers and on some I do not allow computers. Here are some hw quiz questions I've used in past semesters as well as some solutions, solutions2.

Matlab (Optional)

CCNY students can download Matlab free of charge. Visit the Artino Lab. Download information for CCNY students is on the whiteboard. (As an alternative to downloading the full Matlab program students may try to use Matlab through the CUNY Virtual Desktop.)

Kelly Black's MATLAB Tutorial is a solid introduction to the basic code we will study in our course. In particular she includes code for a Gaussian elimination algorithm and code for Euler's method. These are two of the most important algorithms we will study.

Grading Factors

Quiz Average: 20% of course grade.

Midterm Exam 1: 20% of course grade.

Midterm Exam 2: 20% of course grade.

Final exam 40% of course grade

However at then end of the course if your final exam average is superior to your quiz average, your midterm 1 grade, or your midterm 2 grade, then you can use your final exam grade to replace all lower average(s). For instance if your quiz average is 85, midterm 1 grade 70, midterm 2 grade 77, and final exam grade 81 then your course grade will be computed as 20% * 85 + 80% * 81 = 81.8 course grade. Even if you miss multiple quizzes and both midterms but do well on your final exam, you will then use your final exam grade as your full course grade. One way to think of these grading factors is that your performance on quizzes and midterms cannot hurt your final grade, as compared to your final exam grade. Your performance on the quizzes and midterms can only help your grade in comparison to your final exam score.

If possible you should take all the quizzes and midterms because the quizzes and midterms will help you prepare for the final exam. With these grading factors you will be less stressed taking quizzes and midterms knowing that you can replace a bad score with your final exam score. Moreover if you feel ill, test positive for covid, are a close contact, or must assist a sick family member or friend, you can skip any assessment, except the final. You must take the final. If you are sick for the final, do not come to campus. There will be a make-up. There will be no other make-ups. Please remain off campus when you are feeling unwell.

Quiz and exam questions will be similar to the assigned homework questions, exact replicas sometimes. You should at least attempt all the assigned homework problems to learn the material and prepare for quizzes and exams. If you have done all assigned hw problems there should be no surprises on quizzes and exams.

Review of Linear Algebra

Many students struggle with the numerical linear algebra component of this course because their linear algebra skills are weak. Most students need to review linear algebra while taking 328. I will place a few copies of our ccny linear algebra textbook by Gilbert Strang on reserve in the science library. You should be familiar with chapters 1,2,3,4,6,7 in this text. Strang's text is an excellent introduction for the numerical linear algebra we will study in this course. You can also watch video lectures based on Strang's text but many topics covered in the videos will not be needed in this course.

Review of Differential Equations

It is not as important that you can solve many differential equations from math 391 at CCNY. In fact, if you watch the first two lecture videos here: Arthur Mattuck Differential Equations Lecture Videos and then work through the Euler's method exercises during the Python crash course, you should be ok. It is important to understand the difference between exact solutions and approximate solutions to IVPs. We will study approximate solutions in this course while exact solutions are the focus of math 391.

The City College of New YorkCUNY
Instagram iconFacebook iconLinkedIn iconYouTube icon
© The City College of New York. All rights reserved.