e02 : Second Midterm
exam date | description | ready? | info |
---|---|---|---|
03/05 09:30AM | Second Midterm | true | e02 |
The midterm exam will be in class on Tuesday, March 5 from 9:30am to 10:45am.
Rules
Phones off!
Closed book exam. You may bring one sheet of paper with notes on both sides, and you must turn that sheet in with your exam. (If you want it returned later, please put your name on it.) No electronic devices of any kind. You won’t need to do any complicated numerical calculations, and if we ask you for Python code we won’t mark it off for exact syntax or details of argument lists.
Use a dark pen (preferred) or dark soft pencil, and write your answers legibly within the boxes provided.
Syllabus
The exam covers everything discussed in class from data fitting (which began with non-square QR factorization on January 28) through all the material on ODEs that finished on March 4. The exam is not cumulative: We won’t ask questions from the Midterm 1 syllabus, but of course you need to know some of that material to solve problems from the Midterm 2 syllabus.
You should review all of the readings, topics, interesting matrices, numpy/scipy routines, and lecture codes listed in the lecture outlines. To find the lecture outlines, click on “Calendar” at the top of the course web page and then on “lect07”, “lect08”, etc. on the calendar.
You should also review (download and run) the Jupyter transcripts from all of the lectures, and understand what’s going on in them. To find Jupyter transcripts, click on “Lecture Files” at the top of the course web page. That GitHub site contains all the Jupyter transcripts listed by date and topic, and also contains subdirectories with the slides I used in the lectures on PageRank and ODEs.
You should review all the problems on homeworks h04 through h07.
Summary of assigned readings:
- NCM sections 1.7, 2.9, 5.1-5.5, 7.1-7.5, 7.9, 10.1, 10.2, 10.5.
- Online references on floating-point from Lecture 10.
- The $25B Eigenvector: All of Section 1 and Section 2, Section 3 through 3.1, Section 4 first two paragraphs.
- The MIT page on forward and backward Euler (just the methods themselves, not the detailed error analysis).
Summary of topics:
- The factorization A = QR for non-square matrices A
- Data fitting by least squares using QR factorization
- Fitting polynomials by least squares
- Matrix norms (1-norm, 2-norm, infinity-norm)
- Condition number of a matrix
- Floating-point arithmetic
- Definitions of eigenvalues & eigenvectors
- The three eigentheorems from Lecture 12
- The power method to compute one eigenvector and eigenvalue
- Directed graphs, indegree, outdegree, dangling vertices
- Adjacency matrix of a graph (with edges from columns to rows)
- The PageRank algorithm
- Standard form of an ODE
- Systems of ODEs
- The Lotka-Volterra predator/prey equations
- Phase space plots
- ODEs with higher-order derivatives
- The harmonic oscillator (bouncing weight)
- The forward Euler algorithm
- Stiff ODEs (covered Tue March 4)
- The backward Euler algorithm (covered Tue March 4)
Summary of numpy/scipy routines (not complete):
- spla.qr()
- npla.lstsq()
- scipy.sparse.csr_matrix()
- npla.norm()
- npla.cond()
- np.inf, np.nan
- np.isinf(), np.isnan()
- np.random.randn()
- spla.eig()
- np.sort()
- np.argsort()
- np.max()
- np.argmax()
- np.linspace()
- plt.plot(), plt.xlabel(), plt.ylabel(), plt.title(), plt.legend()
- integrate.solve_ivp() with method=’RK23’ and method=’Radau’
Summary of lecture codes:
- cs111.print_float64()
- cs111.ode1()
- cs111.ode2()
Sample problems
-
The TA will answer questions about the sample problems in section on Wednesday before the exam, but you will have to work them yourself before section in order to be prepared!
-
We won’t ask you to do any coding on the exam (more than one line), but the exam may ask questions related to any of the homework problems.
-
Here are some sample problems.
Regrade requests
The deadline for regrade requests (via GradeScope) for Midterm 2 is noon on Sunday, March 15.