# Examples

These examples can be downloaded or viewed statically in a web
browswer. Using the `Notebook`

link you can download the
notebook file and run on your own computer using a locally installed
Jupyter notebook server. Alternatively, the `NBViewer`

link gives you a static version of the notebook. You will not be able
to interact with it, but you will be able to see the results of
executing the notebook.

- Numbers and precision
- An example showing the main difficulty with numerical work: finite precision.
- Notebook : NBViewer
- Lecture 2: Recursion algorithms
- An example showing that all mathematically equivalent algorithms do not behave the same way numerically.
- Notebook : NBViewer
- Root Finding
- An example showing the use of routines from scipy.optimize for one dimensional root finding.
- Notebook : NBViewer
- Interpolation
- An example showing the use of routines from scipy.interpolate for interpolation.
- Notebook : NBViewer
- Numerical Derivatives
- An example describing Richardson extrapolation as applied to center differencing and some examples of its use.
- Notebook : NBViewer
- Numerical Integrals
- An example showing numerical integration. Mostly focuses on scipy.integrate.quad. We use the incandescent light bulb as a test case.
- Notebook : NBViewer
- ODE
- An example showing the solutions of ordinary differential equations using scipy.integrate.odeint. A discussion of how to construct a system of differential equations suitable for solution is included. We study the anomalous precession of the perihelion of Mercury as a test case.
- Notebook : NBViewer
- Midterm Exam
- The computational part of the midterm exam and solutions.
- Exam Notebook : NBViewer
- Exam Solutions Notebook : NBViewer
- Problem Solving
- To review many of the things we have learned we analyzed how to calculate the mass of a star from tabulated data. This example is the implementation of the analytical work performed in class.
- Notebook : NBViewer