Title Page

Contents

1. Introduction

2. Key Idea

3. Root finding in one dimension

4. Linear equations

5. Numerical integration

6. First order ordinary differential equations

7. Higher order ordinary differential equations

8. Partial differential equations

These lecture notes are written for the Numerical Methods course as part of the Natural Sciences Tripos, Part IB. The notes are intended to compliment the material presented in the lectures rather than replace them.

- To give an overview of
*what*can be done - To give insight into
*how*it can be done - To give the confidence to tackle numerical solutions

An understanding of how a method works aids in choosing a method. It can also provide an indication of what can and will go wrong, and of the accuracy which may be obtained.

- To gain insight into the underlying physics
- "
*The aim of this course is to introduce numerical techniques that can be used on computers, rather than to provide a detailed treatment of accuracy or stability*" - Lecture Schedule.

Unfortunately the course is now examinable and therefore the material must be presented in a manner consistent with this.

*Numerical Recipes - The Art of Scientific Computing*, by Press, Flannery, Teukolsky & Vetterling (CUP)*Numerical Methods that Work*, by Acton (Harper & Row)*Numerical Analysis*, by Burden & Faires (PWS-Kent)*Applied Numerical Analysis*, by Gerald & Wheatley (Addison-Wesley)*A Simple Introduction to Numerical Analysis*, by Harding & Quinney (Institute of Physics Publishing)*Elementary Numerical Analysis*, 3rd Edition, by Conte & de Boor (McGraw-Hill)

*Numerical Methods for Ordinary Differential Systems*, by Lambert (Wiley)*Numerical Solution of Partial Differential Equations: Finite Difference Methods*, by Smith (Oxford University Press)

For many people, Numerical Recipes is the *bible*
for simple numerical techniques. It contains not only detailed
discussion of the algorithms and their use, but also sample source
code for each. Numerical Recipes is available for three tastes:
Fortran, C and Pascal, with the source code examples being taylored
for each.

While a number of programming examples are given
during the course, the course and examination do **not** require
any knowledge of programming. Numerical results are given to illustrate
a point and the code used to compute them presented in these notes
purely for completeness.

Unfortunately this course is too short to be able to provide an introduction to the various tools available to assist with the solution of a wide range of mathematical problems. These tools are widely available on nearly all computer platforms and fall into two general classes:

These are intended to be linked into your own computer program and provide routines for solving particular classes of problems.

- NAG
- IMFL
- Numerical Recipes

The first two are commercial packages providing object libraries, while the final of these libraries mirrors the content of the Numerical Recipes book and is available as source code.

These provide a *shrink-wrapped* solution to
a broad class of mathematical problems. Typically they have easy-to-use
interfaces and provide graphical as well as text or numeric output.
Key features include algebraic analytical solution. There is fierce
competition between the various products available and, as a result,
development continues at a rapid rate.

- Derive
- Maple
- Mathcad
- Mathematica
- Matlab
- Reduce

Prior to the 1995-1996 academic year, this course was not examinable. Since then, however, there have been two examination questions each year. Some indication of the type of exam questions may be gained from earlier tripos papers and from the later examples sheets. Note that there has, unfortunately, been a tendency to

concentrate on the more analysis side of the course in the examination questions.

Some of the topics covered in these notes are not examinable. This situation is indicated by an asterisk at the end of the section heading.

These lecture notes are written in Microsoft Word 7.0 for Windows 95. The same Word document is used as the source for both printed and HTML versions. Conversion from Word to HTML is achieved through a combination of custom macros to adjust the formatting and Microsoft Internet Assistant for Word.

The Word version of the notes is available for those who may wish to alter or print it out. The Word 7.0 file format is interchangeable with Word 6.0.

The source Word document contains graphics, display equations and inline equations and symbols. All graphics and complex display equations (where the Microsoft Equation Editor has been used) are converted to GIF files for the HTML version. However, many of the simpler equations and most of the inline equations and symbols do not use the Equation Editor as this is very inefficient. As a consequence, they appear as characters rather than GIF files in the HTML document. This has major advantages in terms of document size, but can cause problems with older World Wide Web browsers.

Due to limitations in HTML and many older World Wide
Web browsers, Greek and Symbols used within the text and single
line equations may not be displayed correctly. Similarly, some
browsers do not handle superscript and subscript. To avoid confusion
when using older browsers, all Greek and Symbols are formatted
in **Green**.
Thus if you find a green Roman character, read it as the Greek
equivalent. Table 1of the correspondences
is given below. Variables and normal symbols are treated in a
similar way but are coloured dark **Blue**
to distinguish them from the Greek. The context and colour should
distinguish them from HTML hypertext links. Similarly, subscripts
are shown in dark **Cyan**
and superscripts in dark **Magenta**.
Greek subscripts and superscripts are the same **Green**
as the normal characters, the context providing the key to whether
it is a subscript or superscript. For a similar reason, the use
of some mathematical symbols (such as less than or equal to) has
been avoided and their Basic computer equivalent used in stead.

Fortunately many newer browsers (Microsoft Internet
Explorer 3.0 and Netscape 3.0 on the PC, but on many Unix platforms
the Greek and Symbol characters are unavailable) do not have the
same character set limitations. The colour is still displayed,
but the characters appear as intended.

Greek/Symbol character | Name |

a | alpha |

b | beta |

d | delta |

D | Delta |

e | epsilon |

j | phi |

F | Phi |

l | lambda |

m | mu |

p | pi |

q | theta |

s | sigma |

y | psi |

Y | Psi |

<= | less than or equal to |

>= | greater than or equal to |

<> | not equal to |

=~ | approximately equal to |

vector | vectors are represented as bold |

These notes may be duplicated freely for the purposes
of education or research. Any such reproductions, in whole or
in part, should contain details of the author and this copyright
notice.

Start of this section

Title Page

Contents

Stuart Dalziel, last page update: 17 February 1998