1 Introduction 1
1.1 Computation and science 1
1.2 The emergence of modern computers 4
1.3 Computer algorithms and languages 7
Exercises 14
2 Approximation of a function 16
2.1 Interpolation 16
2.2 Least-squares approximation 24
2.3 The Millikan experiment 27
2.4 Spline approximation 30
2.5 Random-number generators 37
Exercises 44
3 Numerical calculus 49
3.1 Numerical differentiation 49
3.2 Numerical integration 56
3.3 Roots of an equation 62
3.4 Extremes of a function 66
3.5 Classical scattering 70
Exercises 76
4 Ordinary differential equations 80
4.1 Initial-value problems 81
4.2 The Euler and Picard methods 81
4.3 Predictor-corrector methods 83
4.4 The Runge-Kutta method 88
4.5 Chaotic dynamics of a driven pendulum 90
4.6 Boundary-value and eigenvalue problems 94
4.7 The shooting method 96
4.8 Linear equations and the Sturm-Liouville problem 99
4.9 The one-dimensional Schrodinger equation 105
Exercises 115
5 Numerical methods for matrices 119
5.1 Matrices in physics 119
5.2 Basic matrix operations 123
5.3 Linear equation systems 125
5.4 Zeros and extremes of multivariable functions 133
5.5 Eigenvalue problems 138
5.6 The Faddeev-Leverrier method 147
5.7 Complex zeros of a polynomial 149
5.8 Electronic structures of atoms 153
5.9 The Lanczos algorithm and the many-body problem 156
5.10 Random matrices 158
Exercises 160
6 Spectral analysis 164
6.1 Fourier analysis and orthogonal functions 165
6.2 Discrete Fourier transform 166
6.3 Fast Fourier transform 169
6.4 Power spectrum of a driven pendulum 173
6.5 Fourier transform in higher dimensions 174
6.6 Wavelet analysis 175
6.7 Discrete wavelet transform 180
6.8 Special functions 187
6.9 Gaussian quadratures 191
Exercises 193
7 Partial differential equations 197
7.1 Partial differential equations in physics 197
7.2 Separation of variables 198
7.3 Discretization of the equation 204
7.4 The matrix method for difference equations 206
7.5 The relaxation method 209
7.6 Groundwater dynamics 213
7.7 Initial-value problems 216
7.8 Temperature field of a nuclear waste rod 219
Exercises 222
8 Molecular dynamics simulations 226
8.1 General behavior of a classical system 226
8.2 Basic methods for many-body systems 228
8.3 The Verlet algorithm 232
8.4 Structure of atomic clusters 236
8.5 The Gear predictor-corrector method 239
8.6 Constant pressure,temperature,and bond length 241
8.7 Structure and dynamics of real materials 246
8.8 Ab initio molecular dynamics 250
Exercises 254
9 Modeling continuous systems 256
9.1 Hydrodynamic equations 256
9.2 The basic finite element method 258
9.3 The Ritz variational method 262
9.4 Higher-dimensional systems 266
9.5 The finite element method for nonlinear equations 269
9.6 The particle-in-cell method 271
9.7 Hydrodynamics and magnetohydrodynamics 276
9.8 The lattice Boltzmann method 279
Exercises 282
10 Monte Carlo simulations 285
10.1 Sampling and integration 285
10.2 The Metropolis algorithm 287
10.3 Applications in statistical physics 292
10.4 Critical slowing down and block algorithms 297
10.5 Variational quantum Monte Carlo simulations 299
10.6 Green’s function Monte Carlo simulations 303
10.7 Two-dimensional electron gas 307
10.8 Path-integral Monte Carlo simulations 313
10.9 Quantum lattice models 315
Exercises 320
11 Genetic algorithm and programming 323
11.1 Basic elements of a genetic algorithm 324
11.2 The Thomson problem 332
11.3 Continuous genetic algorithm 335
11.4 Other applications 338
11.5 Genetic programming 342
Exercises 345
12 Numerical renormalization 347
12.1 The scaling concept 347
12.2 Renormalization transform 350
12.3 Critical phenomena:the Ising model 352
12.4 Renormalization with Monte Carlo simulation 355
12.5 Crossover:the Kondo problem 357
12.6 Quantum lattice renormalization 360
12.7 Density matrix renormalization 364
Exercises 367
References 369
Index 381