- Late breaking news
- Things to print
- Course Overview
- Course Details
- Tentative Schedule
- Related Links

- 2005/04/26: The final exam has been marked, and grades submitted for CPSC 403. If you would like to review your exam, please schedule a time with Ian.
- 2005/04/19: The solution set for Homework #5 is posted below.
- 2005/04/18: Graded homework #4 submissions are available outside Ian's office.
- 2005/04/17: The solution set for Homework #4 is posted below.
- 2005/04/15: Office hours before the exam: Monday April 18 2pm - 3pm, and Tuesday April 19 1pm - 2pm. Meet in Ian's new office.
- 2005/04/06: Ian has moved offices. He is now in ICICS/CS 217 -- same floor of the old building, but on the side facing Main Mall.
- 2005/04/04: Homework #5, questions (4) and (5) are now bonus questions. Each is worth up to 10 points for a full solution, and points earned will be applied to the homework(s) on which you received the lowest percentage grade.
**Homework #5 (including the bonus questions) is still due this Friday, April 8 (no late days permitted)**. Note that there may be a DAE question on the final exam. - 2005/04/01: The midterm and solution set are posted in the Handouts section below. The solution set for Homework #3 is posted in the Homework section.
- 2005/03/21: Homework #5 is available below.
- 2005/03/16: The BDF alpha coefficients for orders 1-8 are posted in the "Other Files" part of Homework #4 below. These coefficients will be useful for solving question (1b) (ie Ascher & Petzold 5.4).
- 2005/02/25: Homework #3, question (3b) (ie Ascher & Petzold 4.15b) deals with the fact that only collocation at Gaussian points will maintain quadratic integral invariants. Consider this part of the question a bonus. You should still do parts (a) and (c), although you may assume the properties in part (b) to help you with part (c).
- 2005/02/25: Homework #4 is available below. Some code to help with question (3) has also been posted.
- 2005/02/24: Solution set for Homework #2 is available below.
- 2005/02/11: The preliminary time for the final exam is noon on Wednesday, April 20. Any conflicts must be reported to the registrar's office immediately.
- 2005/02/07: Homework #3 is available below.
- 2005/02/03: A solution set for Homework #1 is posted below. Unclaimed graded assignments can be claimed outside my office.
- 2005/01/25: Homework #2 is available below.
- 2005/01/14: An example of a suitable solution to the programming component of homework #1, question (5a) has been posted below in the homework section (the ODE used was AP example 3.2). Try to make your programming solutions look similar: label the axes and plots, put markers at the timesteps, and include your name, the date and the homework number in the comments of your m-file.
- 2005/01/12: An additional question has been added at the beginning of homework #1. The modified assignment can be found below.
- 2005/01/10: The first homework assignment is available below.
- 2005/01/05: The first class will be held today in Dempster 301. If you do not know where that is, see Lecture Time and Location.
- 2004/12/23: Recent emails indicate that the course will be held in Dempster 301. But check the web site again in early January...
- 2004/12/22: Course syllabus is available in the Handouts section below.
- 2004/12/10: The first lecture is Wednesday, January 5.

# | Date | Topic |
---|---|---|

1 | Jan. 5 | Course Syllabus |

2 | April 1 | Midterm and Solution Set |

**Collaboration Policy:**

You may collaborate with other students in the class on homework questions prior to writing up the version that you will submit. This collaboration may include pseudo-code solutions to programming components. Once you begin writing the version that you will submit, you may no longer collaborate on that question, either by discussing the solution with other students, showing your solution to other students, or looking at the solutions written by other students. You may never share executable code (including Matlab m-files) for homework questions.

You may seek help from the course instructor or TA at any time while preparing your homework solutions. You may not receive help from any other person.

If you feel that you have broken this collaboration policy, you may cite in your homework solution the name of the person from whom you received help, and your grade will be suitably adjusted to take this collaboration into account. If you break this collaboration policy and fail to cite your collaborator, you will be charged with plagarism as outlined in the university calendar. If you have any questions, please contact the instructor.

More information is available from (among other sources):

- Department of Computer Science Collaboration Policy
- UBC Academic Regulations on Student Discipline
- UBC Library's Plagarism Resource Center (not what it sounds like...)

**Homework Submission Policy:**

- Each student gets four late days to use during the term.
- Apart from using late days, late assignments are not accepted for any reason.

**Homeworks:**

# | Topic | Assigned | Due Date | Assignment | Solution | Other Files |
---|---|---|---|---|---|---|

1 | ODE Property Review | January 10 | January 24 | Problem Set | Solutions | Source code for example of how to solve question 5a (for a different ODE). Example output in postscript, jpeg, or png formats. |

2 | Basic Methods | January 25 | February 7 | Problem Set | Solutions | none. |

3 | Runge-Kutta Single Step Methods | February 7 | February 28 | Problem Set | Solutions | none. |

4 | Linear Multistep Methods & Boundary Value Problems | February 28 | March 21 | Problem Set | Solutions | A driver routine to generate the convergence plot for question 3: converge.m. Implementation of fixed timestep Adams-Bashforth: adamsBashforth.m. Table of BDF alpha coefficients, order 1-8 |

5 | Boundary Value Problems & Differential Algebraic Equations | March 21 | April 8 | Problem Set | Solutions | none. |

- Runge-Kutta and multistep methods for stiff and nonstiff equations;
- adaptive error control and mathematical software;
- methods for boundary value problems;
- methods for constrained problems (DAEs); and
- special methods for dynamical systems.

**Intended Audience: **
Senior undergraduates and junior graduate students in:

- Computer Science,
- Applied Mathematics,
- Quantitative Sciences,
- Engineering.

**Prerequisites: **

- CPSC 303, Numerical Approximation and Discretization: numerical methods for interpolation, differentiation, integration.
- MATH 316, Elementary Differential Equations II: analytic methods for initial value and boundary value problems with ordinary differential equations.
- The assignments will require some programming. Basic experience in Matlab, Java, C, C++ or Fortran should be sufficient.

**Instructor: **Ian Mitchell

- Email: mitchell (at) cs (dot) ubc (dot) ca
- Office Location: ICICS/CS 217
- Office Phone: (604) 822-2317
- Office Hours: Wednesdays 3-4 (or by appointment).

**TA: **Dan Li

- Email: danli (at) cs (dot) ubc (dot) ca
- Office Location: ?
- Office Phone: ?
- Office Hours: ?

**Course Communication:**

- Most information will be disseminated through this web site or in class.
- Occasional important messages will be sent through a private email list maintained by the instructor.
- Contact the instructor and TA through their email addresses (listed above).
- Although there is a newsgroup (ubc.courses.cpsc.403), you are not expected to read it and it will not be monitored by the TA or instructor.

**Lectures: ** 14:00 - 15:00, Monday / Wednesday / Friday, Dempster 301

- Dempster Pavilion is the shorter of the two new buildings between CICSR/CS and the Pulp & Paper center, facing the Forestry building. It can be accessed from Agronomy Road (which runs between CICSR/CS and Forestry) or from Engineering Road (which runs between the two new buildings).
- Location is subject to change; check here or the UBC Course Web Site for updates.
- There is no lecture Monday January 3 (in lieu of New Year's day).
- There are no lectures Monday February 14 to Friday February 18 (Midterm break).
- There is no lecture Friday March 25 (Good Friday).
- There is no lecture Monday March 28 (Easter Monday).
- There are no scheduled labs or tutorials for this course.

**Grades: ** Your final grade will be based on a combination of:

- 3-5 homework assignments (30%)
- 1 midterm (20%)
- 1 final (50%)

**Textbook: **

*Computer Methods for Ordinary Differential Equations and Differential Algebraic Equations*by Uri M. Ascher and Linda R. Petzold. Softcover, required, available at the bookstore.

**Other References: **

*Numerical Analysis*by Burden and Faires.*Scientific Computing: An Introductory Survey*by Heath.*Elementary Differential Equations and Boundary Value Problems*by Boyce and DiPrima.*Single Variable Calculus*and*Calculus of Several Variables*by Adams (or any other undergraduate multivariable calculus text).

- Topics of future lectures are subject to change.
- Required readings are from Ascher & Petzold (AP) unless otherwise specified.
- Optional reading sources: Burden & Faires seventh edition (BF), Heath second edition (H).

# | Date | Topic | Links | Required Readings | Optional Readings | |
---|---|---|---|---|---|---|

1 | Jan 5 | Course syllabus and administration. Collaboration guidelines. Professor introduction. | Ian Mitchell's homepage | none | AP Preface | |

2 | Jan 7 | Types and Applications of Ordinary Differential Equations. | none | AP 1 | H 9.1 | |

3 | Jan 10 | Well posed IVPs. Problem Stability. Scalar Test Equation. | John Polking's pplane software for phase plane plots of ODEs. | AP 2.1 | BF 5.1, 5.9; H 9.2 | |

4 | Jan 12 | Matrix Test Equation. Forward Euler (FE). | none | AP 2.2, 2.4 | AP 2.3, 2.5 | |

5 | Jan 14 | FE. Convergence, Accuracy, Consistency and 0-Stability. | none | AP 3.1-3.2 | BF 5.2, 5.10; H 9.3.1-9.3.2 | |

6 | Jan 17 | Absolute Stability. Backward Euler (BE). | Matlab's Introduction to initial value ODEs | AP 3.3-3.4 | BF 5.10; H 9.3.3 | |

7 | Jan 19 | Stiff ODEs. Stiff Decay. Rough Problems. | m-file for the sawtooth integration. | AP 3.5, 3.7 | BF 5.11; H 9.3.4 | |

8 | Jan 21 | Trapezoidal Method. Taylor Series Methods. Runge-Kutta Methods (RK Methods). | none | AP 3.6, 4.0-4.1 | BF 5.3, 5.4; H 9.3.5-9.3.6 | |

9 | Jan 24 | Properties of Runge-Kutta Methods | none | AP 4.2-4.4 | BF 5.4; H 9.3.6 | |

10 | Jan 26 | Principle Error Function & Global Error ODE. Error Tolerance. Error Control. | none | AP 4.5 | none | |

11 | Jan 28 | Error Estimation. Solution Sensitivity. | m-file for sensitivity analysis of example 4.7 (the toy car). | AP 4.6 | BF 5.5 | |

12 | Jan 31 | Sensitivity. Implicit Runge-Kutta. | none | AP 4.7 | none | |

13 | Feb 2 | Linear Multistep Methods (LMMs). Consistency & Order. | none | AP 5.0, 5.2.1 | BF 5.6; H 9.3.8 | |

14 | Feb 4 | Examples of LMMs: Adams-Bashforth, Adams-Moulton, BDFs. Initial Conditions. | none | AP 5.1 | none | |

15 | Feb 7 | LMM 0-Stability, Convergence & Absolute Stability. | none | AP 5.2.2, 5.2.3, 5.3 | none | |

16 | Feb 9 | Implicit Schemes. Functional Iteration. Predictor-Corrector. Newton & Modified Newton. | none | AP 3.4.2, 5.4 | AP 5.5; BF 2.2-2.3, 10.1-10.2; H 5.5.2-5.5.3, 5.6.1-5.6.2 | |

17 | Feb 11 | A Example of Failure in Matlab ODE45. | m-file for the coupled oscillator example. | none | Analysis Still Matters..." by Skufca. | |

Feb 14-18 | Midterm break (no class). | |||||

18 | Feb 21 | Properties of Boundary Value Problems. | none | AP 6.0 | H 10.1 | |

19 | Feb 23 | Linear BVPs. Stability of BVPs. | none | AP 6.1-6.2 | H 10.2 | |

20 | Feb 25 | BVP Dichotomy. Isolated Solutions. | none | AP 6.2 | none | |

21 | Feb 28 | BVP Stiffness. Reformulation Tricks. Simple Shooting. | none | AP 6.3-6.4, 7.1 | BF 11.1-11.2; H 10.3 | |

22 | March 2 | Problems with Simple Shooting | none | AP 7.1.1 | none | |

23 | March 4 | Multiple Shooting | none | AP 7.2 | none | |

March 7 | Midterm Exam | |||||

24 | March 9 | Guest Lecturer Robert Bridson: Methods for Second Order ODEs. | ||||

25 | March 11 | Guest Lecturer Robert Bridson: Symplectic Methods. | ||||

26 | March 14 | Linear Multiple Shooting Formulation. Introduction to Finite Differences | none | AP 8.0 | none | |

27 | March 16 | Midpoint Method for Finite Difference. | none | AP 8.1.1 | BF 11.3-11.4; H 10.4 | |

28 | March 18 | Finite Difference Scheme Properties. | none | AP 8.1.2 | AP 8.2 | |

29 | March 21 | Higher Order Schemes for BVPs: Extrapolation, Deferred Correction, Runge-Kutta Style Collocation. | none | AP 8.3 | BF 4.2, 11.3-11.4; H 8.7 | |

30 | March 23 | Higher Order Schemes for BVPs: General Collocation, including Spectral Methods | none | none | H 10.5 | |

March 25 | Good Friday Holiday (no class). | |||||

March 28 | Easter Monday Holiday (no class). | |||||

31 | March 30 | Finite Element Methods: Least Squares, Galerkin and Ritz. | none | none | BF 11.5; H 10.6 | |

32 | April 1 | Error Estimation & Mesh Generation. Damped Newton Method | none | AP 8.4.1, 8.5 | AP 8.4; BF 10.5 | |

33 | April 4 | Initial Guess Generation by Continuation. Differential Algebraic Equations. | none | AP 8.4.3, 9.0 | AP 8.8; BF 10.5 | |

34 | April 6 | DAE Index. Solving DAEs by Direct Discretization. | none | AP 9.1, 10.1 | AP 9.3-9.4, 10.3 | |

35 | April 8 | Solving DAEs by Stabilization. Course Review. | none | AP 9.2, 10.2 | none | |

April 20 | Final Exam. 12:00 noon. CEME 1212. |

- CPSC 403 Term 2 Winter 2004-2005 Course Web Page (this page):
`http://www.ugrad.cs.ubc.ca/~cs403/` - CPSC 403 is offered by
- Some numerical packages for solving Ordinary Differential Equations:
- Matlab's Introduction to initial value ODEs (available locally through Matlab's helpdesk command)
- SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers), a collection of C code (with Fortran interfaces) for solving ODE IVPs and DAEs.
- John Polking's dfield and pplane software for phase plane plots of two dimensional ODEs in Matlab.

CPSC 403 Term 2 Winter 2004-2005 Class Page

maintained by Ian Mitchell