Scientific computing with Python

Chapter 1: Initial value problems for Ordinary Differential Equations

Introduction

Taylor's method

Reduction of Higher order Equations

Example 1: Reduction of higher order systems

Example 2: Sphere in free fall

Python functions with vector arguments and modules

How to make a Python-module and some useful programming features

Differences

Euler's method

Example 3: Falling sphere with constant and varying drag

Example 4: Numerical error as a function of \( \Delta t \)

Heun's method

Example 5: Newton's equation

Example 6: Falling sphere with Heun's method

Runge-Kutta of 4th order

Example 7: Falling sphere using RK4

Example 8: Particle motion in two dimensions

Example 9: Numerical error as a function of \( \Delta t \) for ODE-schemes

Chapter 6: Convection problems and hyperbolic PDEs

The advection equation

Forward in time central in space discretization

Example 10: Burgers equation

References

This digital compendium is based on the first chapter of the
compendium *Numeriske Beregninger* by J.B. Aarseth. It's intended to
be used in the course TKT4140 Numerical Methods with Computer Laboratory at NTNU.

The development of the technical solutions for this digital compendium results from collaborations with professor Hans Petter Langtangen at UiO (hpl@simula.no), who has developed Doconce for flexible typesetting, and associate professor Hallvard Trætteberg at IDI, NTNU (hal@idi.ntnu.no), who has developed the webpage-parser which identifies Python-code for integration in Eclipse IDEs (such as LiClipse). The latter part of the development has been funded by the project IKTiSU.