Course description
Math 165 is an introduction to the analysis and implementation of
basic numerical techniques. This is a course meant for
anyone who will ever have to solve a mathematical problem with a
computer. In this course, you will learn about fundamental issues
that arise when searching for numerical solutions to equations, and
whether you should trust your answer.
By the end of this course, I hope that you will be able to
- analyze the accuracy, stability, and efficiency of numerical
algorithms, and
- use that information to help you select an appropriate numerical technique for a given problem.
Topics covered: root-finding, interpolation and polynomial
approximation, numerical differentiation and integration, initial
value problems and ordinary differential equations, direct and
iterative methods for solving linear systems of equations.
Notes, handouts and suggested texts
Suggested textbooks:
Lecture notes (CUC IP addresses only):
- Computer arithmetic: Aug 29
- Solving nonlinear equations: Aug 31, Sep 5, MyNewton.m,
f.m,
fp.m, Proof of superlinear convergence of secant method, convergence_of_root_finding_methods.nb
- Interpolating, approximating, fitting: Sep 7, Sep 12, approximating_functions.nb, Sep 14
- Numerical integration: Sep 14, newton_cotes_formulas.nb, Sep 19
- Numerical differentiation: Sep 21, Sep 26, fddemo.nb, fddemo.m, Sep 28, spectralderiv.m
- Ordinary differential equations (IVPs): Oct 3, Oct 5, adams_deriv.nb, eulerdemo.m, ab4demo.m
Oct 10 backeulerdemo.m, pendulumdemo.m
Oct 12, bdfdemo.m
Oct 24, pendulum.m, pendulum.nb
- Ordinary differential equations (BVPs): Oct 26, shootval.m, Oct 31, bvpexample.m, Nov 2
- Solving linear systems: Nov 7, poisson.m, Nov 9, Nov 14, poisson2.m
Nov 16, steepdesc.m, conjgrad.m
- PDEs--method of lines for heat equation: Nov 28, molheat.m, molheatode1.m, molheatode2.m, method_of_lines.nb
PDEs--finite difference methods for heat equation: Nov 30, heat1.m, heat2.m
PDEs--finite difference methods for wave equation: Dec 5, wave1.m
Computing resources
Tip(s) of the day
- 9/5/2006
- Matlab: .m files can either be scripts (lists of commands, executed sequentially) or functions; [] and colon notation for matrices; format long to get more decimal places in answers; use of .* .^ for component-wise operations
Mathematica: To execute commands, remember to press shift-enter
- 9/7/2006
- Matlab: To get help on commands, try "doc" or "lookfor [the thing you're looking for]"
Mathematica: To get help on commands, use help browser. Often you can find what you need using the "Master Index."
Matlab: You can have multiple function definitions in one .m file, but only the first one gets called (the name of the function matches the name of the .m file), and the other functions in that file are only accessible to that function at the top.
- 9/12/2006
- LaTeX: vector-based graphics files (such as .eps) are preferable to raster-based graphics files (such as .jpg or .gif)
Matlab: Basic plotting commands; use "print -depsc2 filename.eps" or "File...Export" from figure's menu to export the current figure as an .eps file
Mathematica: Basic plotting commands; use Export["filename.eps", object to be exported, "eps"] to export a graphics object as an .eps file
LaTeX: Use the graphicx package to insert figures in your documents; .eps graphics are used when compiling using "latex", which generates a .dvi file; .edf graphics are used when compiling using "pdflatex", which generated a .pdf file directly from a .tex file; use the Unix command "epstopdf" to convert your .eps graphics into .pdf graphics.
- 9/14/2006
- Mathematica: substitution rules (eg: a^2 /. a->1), Solve, FindRoot
- 9/21/2006
- Mathematica: Using PrecisionPlot.m to use arbitrary precision arithmetic for plotting; Fit for finding interpolants and fitted curves
Matlab: polyfit and polyval for finding polynomial interpolants and evaluating them
- 10/5/2006
- Mathematica: How to chop off tiny imaginary parts in floating-point calculations; reminder on how to use the output of Solve 2006-10-05tips.nb
- 10/24/2006
- Matlab and Mathematica: How to use built-in ODE numerical solvers pendulum.m, pendulum.nb
Assignments and grading
Most of your learning will occur while completing your homework
assignments, so take them seriously, and complete them thoroughly.
Your homework should show clearly your solution processes. All code
should be properly commented, graphs should be annotated. I encourage
you to describe your solution process in words. Poor presentation may
result in loss of credit.
All homeworks should be written up using LaTeX. Homeworks can be electronically submitted.
No late homeworks will be accepted except for family or medical
emergencies. Your lowest homework grade will be dropped.
You are encouraged to work cooperatively on your homework
assignments with your classmates. However, every student MUST write
up his/her own homework separately. In addition, you must cite any
sources of help that you use. If you work with one of your classmates
on a problem, be sure to acknowledge that person in your homework
write-up; if you use any published source besides our textbook,
acknowledge that too. HMC's
honor code is in effect for
all students in this course.
| Homework Assignment 1: PDF, very minimal template LaTeX file |
due Friday, Sept 1 |
| Homework Assignment 2: PDF, source, MyExp.m |
due Friday, Sept 8 |
Solutions |
| Homework Assignment 3: PDF, source, newtoncoolingeigs.pdf |
due Friday, Sept 15 |
Solutions, Code |
| Homework Assignment 4: PDF, source |
due Friday, Sept 22 |
Solutions, Code |
| Homework Assignment 5: PDF |
due Friday, Oct 13 |
Solutions, Code |
| Homework Assignment 6: PDF, source |
due Friday, Oct 27 |
Solutions, Code |
| Homework Assignment 7: PDF
| due Friday, Nov 10 |
Solutions, Code |
| Homework Assignment 8: PDF, source
| due Friday, Nov 17 |
Solutions, Code |
| Homework Assignment 9: PDF, source
| due Friday, Dec 8 |
Solutions, Code |
There will be two non-cumulative exams in this course.
|
Exam 1 (take-home, due Friday, Nov 3)
|
25% |
|
Exam 2 (take home, during finals week)
|
25% |
|
Homework (lowest score dropped)
|
50% |
|
<dyong@hmc.edu>
|
Last modified: Fri Dec 08 11:53:27 Pacific Standard Time 2006
|