Preface
About the Authors
1 A First Numerical Problem
1.1 Radioactive Decay
1.2 A Numerical Approach
1.3 Design and Construction of a Working Program: Codes and Pseu-docodes
1.4 Testing Your Program
1.5 Numerical Considerations
1.6 Programming Guidelines and Philosophy
Realistic Projectile Motion
2.1 Bicycle Racing: The Effect of Air Resistance
2.2 Projectile Motion: The Trajectory of a Cannon Shell
2.3 Baseball: Motion of a Batted Ball
2.4 Throwing a Baseball: The Effects of Spin
2.5 Golf
3 Oscillatory Motion and Chaos
3.1 Simple Harmonic Motion
3.2 Making the Pendulum More Interesting: Adding Dissipation, Non-
linearity, and a Driving Force
3.3 Chaos in the Driven Nonlinear Pendulum
3.4 Routes to Chaos: Period Doubling
3.5 The Logistic Map: Why the Period Doubles
3.6 The Lorenz Model
3.7 The Billiard Problem
3.8 Behavior in the Frequency Domain: Chaos and Noise
4 The Solar System
4.1 Kepler's Laws
4.2 The Inverse-Square Law and the Stability of Planetary Orbits
4.3 Precession of the Perihelion of Mercury
4.4 The Three-Body Problem and the Effect of Jupiter on Earth
4.5 Resonances in the Solar System: Kirkwood Gaps and Planetary
Rings
4.6 Chaotic Tumbling of Hyperion
Potentials and Fields
5.1 Electric Potentials and Fields: Laplace's Equation
5.2 Potentials and Fields Near Electric Charges
5.3 Magnetic Field Produced by a Current
5.4 Magnetic Field of a Solenoid: Inside and Out
Waves
6.1 Waves: The Ideal Case
6.2 Frequency Spectrum of Waves on a String
6.3 Motion of a (Somewhat) Realistic String
6.4 Waves on a String (Again): Spectral Methods
Random Systems
7.1 Why Perform Simulations of Random Processes?
7.2 Random Walks
7.3 Self-Avoiding Walks
7.4 Random Walks and Diffusion
7.5 Diffusion, Entropy, and the Arrow of Time
7.6 Cluster Growth Models .
7.7 Fractal Dimensionalities of Curves
7.8 Percolation
7.9 Diffusion on Fractals
8 Statistical Mechanics, Phase Transitions, and the Ising Model
8.1 The Ising Model and Statistical Mechanics
8.2 Mean Field Theory
8.3 The Monte Carlo Method
8.4 The Ising Model and Second-Order Phase Transitions
8.5 First-Order Phase Transitions
8.6 Scaling
9 Molecular Dynamics
9.1 Introduction to the Method: Properties of a Dilute Gas
9.2 The Melting Transition
9.3 Equipartition and the Fermi-Pasta-Ulam Problem
10 Quantum Mechanics
10.1 Time-Independent Schrodinger Equation: Some Preliminaries
10.2 One Dimension: Shooting and Matching Methods
10.3 A Matrix Approach
10.4 A Variational Approach
10.5 Time-Dependent SchrSdinger Equation: Direct Solutions
10.6 Time-Dependent SchrSdinger Equation in Two Dimensions
10.7 Spectral Methods
11 Vibrations, Waves, and the Physics of Musical Instruments
11.1 Plucking a String: Simulating a Guitar
11.2 Striking a String: Pianos and Hammers
11.3 Exciting a Vibrating System with Friction: Violins and Bows
11.4 Vibrations of a Membrane: Normal Modes and Eigenvalue Problems
11.5 Generation of Sound
12 Interdisciplinary Topics
12.1 Protein Folding
12.2 Earthquakes and Self-Organized Criticality
12.3 Neural Networks and the Brain
12.4 Real Neurons and Action Potentials
12.5 Cellular Automata
APPENDICES
A Ordinary Differential Equations with Initial Values
A.1 First-Order, Ordinary Differential Equations
A.2 Second-Order, Ordinary Differential Equations
A.3 Centered Difference Methods
A.4 Summary
B Root Finding and Optimization
B.1 Root Finding
B.2 Direct Optimization
B.3 Stochastic Optimization
C The Fourier Transform
C.1 Theoretical Background
C.2 Discrete Fourier Transform
C.3 Fast Fourier Transform (FFT)
C.4 Examples: Sampling Interval and Number of Data Points
C.5 Examples: Aliasing
C.6 Power Spectrum
D Fitting Data to a Function
D.1 Introduction
D.2 Method of Least Squares: Linear Regression for Two Variables
D.3 Method of Least Squares: More General Cases
E Numerical Integration
E.1 Motivation
E.2 Newton-Cotes Methods: Using Discrete Panels to Approximate an Integral
E.3 Gaussian Quadrature: Beyond Classic Methods of Numerical Inte-gration
E.4 Monte Carlo Integration
F Generation of Random Numbers
F.1 Linear Congruential Generators
F.2 Nonuniform Random Numbers
G Statistical Tests of Hypotheses
G.1 Central Limit Theorem and the X2 Distribution
G.2 X2 Test of a Hypothesis
H Solving Linear Systems
H.1 SolvingA.x=b,b≠0
H.I.1 Gaussian Elimination
H.1.2 Gauss-Jordan elimination
H.1.3 LU decomposition
H.1.4 Relaxational method
H.2 Eigenvalues and Eigenfunctions
H.2.1 Approximate Solution of Eigensystems
Index