Installation. First you will need to install Python 2.5 or later, if it is not available on your system. For Windows, binary installers for SciPy and NumPy are available at the SciPy download page. On a Mac, the recommended way to install SciPy is using fink. In addtion to SciPy, please install matplotlib.
More detailed installation instructions. If you have any trouble with installation, please contact the teaching assistant immediately!
Assignment 1, due Thursday, February 7. PDF If you typeset your assignment, you can send it to the instructor by e-mail. If parts of it are hand-written, please submit the whole assignment on paper.
Assignment 2, due Thursday, February 28. PDF
Assignment 3, due Thursday, April 3. PDF
Assignment 4, due Thursday, May 1. PDF
|January 24||Introduction to Python.|
I recommend reading sections 3-5 and 9 of Python Tutorial by Guido van Rossum. A somewhat more concise introduction covering most of what we need is Steven Thurlow's "A Beginner's Python Tutorial" You can find links to a large number of tutorials and resources at www.python.org.
|January 29||IEEE 754 floating point arithmetics.|
A brief overview of the standard by Steve Hollasch.
Minifloats are useful for understanding the details of f.p. operations.
by. W. Kahan, the architect of IEEE 754.
Python code for conversion of floats to binary strings.
|January 31||Types of errors: modeling, discretization, roundoff, convergence.
Absolute and relative error.|
Textbook, Chapter 1 and (optionally) Chapter 2. example 1.1 from Ch. 1 in Python.
|February 5||Linear equations and matrices, review. |
Textbook, chapter 4.
|February 7||Example: optimal curves. Optimization problem,
differential equation, discretization.|
|February 12||Example: optimal curves, implementation using scipy and matplotlib.|
Source files: direct_linear.py (matrix construction and solve), curve.py (GUI), myarray.py (array helper functions).
|February 14||Gaussian elimination, LU factorization, pivoting.|
Source file: lu.py (LU factorization with partial pivoting, back and forward substitution.
|February 19||LU factorization continued, conditioning, condition number,
|February 21|| (Yotam Gingold) Surface editing example, matrix conditioning in one and two dimensional case, bandedness.
Surface optimization: direct_linear_2d.py, surface.py.
|February 26|| Least squares, normal equations.
Textbook, Section 7.4.
|February 28|| Least squares continued, implict curve fitting.
QR factorization. |
Textbook, Section 7.4. Additional reading (password required) Code: least_squares.py
|March 4|| QR factorization continued.
Polynomial and piecewise polynomial
Code: bezier.py, bspline.py,
Polynomial and piecewise polynomial
interpolation: Lagrange polynomials, Bezier curves, B-splines.
Textbook: Sections 10.1 and 10.2, 11.1-11.4
Notes: Bezier curves and B-splines
(you do no have to read the part about blossoming)
Solving nonlinear equations: bisection, one-dimensional
Newton's method (Chapter 3).
Mass-spring system in equilibrium: formulation.
High-dimensional Newton method.
Spring system in equilibrium: energy point of view.|
Chapter 9 (not on the web page above, new revision of text!), linked here.
Code: springs.py, springs_gui.py
Ordinary differential equations: review of linear equations
and systems of linear equations: reduction of high-order to
first order, reduction of a system to the diagonal form.
Euler's method for integration of ODEs, forward and backward Euler,
Chapter 17, sections 17.1 and 17.5, (not on the web page above, new revision of text!),
Forward and backward Euler's method for a spring, osciallations.
Increasing the order of accuracy; midpoint method.
Chapter 17, sections 17.2, (not on the web page above, new revision of text!),
Dynamic mass-spring system: forward and backward Euler.
Leapfrog(Verlet) integration. Review of integration techniques for ODEs.
a brief explanation of the leapfrog method.
Computing eigenvalues and eigenvectors. Power method. Inverse power method.
Iterative methods for linear systems. Stationary iteration: Jacobi and
Gauss-Seidel. The idea of Krylov subspace methods.
Chapter 7 from new version of the book, linked here
Fourier series. Discerete Fourier Series, Fast Fourier transform.
Application to sound analysis.
Chapter 14, linked