COMPUTATIONAL PHYSICS (for undergraduate students)
Tuesdays and Thursdays 2-3:15 (Meyer 105)
Instructor: Roman Scoccimarro

In this course we will use computational techniques to solve problems in physics.
There will be no exams, grades will be based on homework.
You will need to (or learn how to) program (e.g. C, Fortran, Mathematica, MATLAB), use LaTeX (to write up each homework) and plotting software (e.g. gnuplot, pgplot, if you use C/Fortran).


Please return a brief summary of your work (including figures) as a printout generated by LaTeX (see below for a template), or email me a PDF file.
You should also send me the code you use to generate results by email.

Hwk1[Oct01], Hwk2[Oct22], Hwk3[Nov12]( datafiles), Hwk4[Dec15],

Lecture Notes

Lec01, Lec02, Lec03, Lec04, Lec05(pages 1-4), Lec06(pages 1-4), Lec07, Lec08, Lec09, Lec10,
Lec11, Lec12, Lec13, Lec14(pages 1-5), Lec15(pages 1-4), Lec16, Lec17(pages 1-6), Lec18,
Lec19 (pages 1-6), Lec20 (pages 2-8), Lec21, Lec22 (pages 1-4)

Useful Additional Material

  • Gaussian Random Fields notebook (if you don't have Mathematica, y ou can download the Player to view it)

  • Wikipedia on Aliasing

  • FFTW


    There is no formal textbook that I will follow, although if you want to buy one,

  • Gould, Tabochnik and Christian, Computer Simulation Methods, 2007, Addison Wesley

    has a good overlap with what we will do, and at the right level. In addition, Numerical Recipes can be very useful.

    Other general books that you may want to check are,

  • A.L. Garcia, Numerical Methods for Physics, 2000, Prentice Hall
  • M.T. Heath, Scientific Computing: An Introductory Survey, 2002, McGraw Hill
  • A. Iserles, A First Course in the Numerical Analysis of Differential Equations, 1996, Cambridge University Press (more on the mathematical side)
  • R.H. Landau & M.J.Paez, Computational Physics, 1997, Wiley
  • T. Pang, An Introduction to Computational Physics, 1997, Cambridge University Press

    LaTeX Help

    You can find a sample latex file to present your homework here.
    There are many tutorials on LaTeX on the web, see e.g.

  • LaTeX Primer

    C, Fortran, Mathematica, MATLAB Help

    There is a lot of useful material on the web, see e.g.

  • C help
  • Fortran Help
  • Mathematica Help
  • MATLAB Help

    Plotting Software

    You can use Mathematica or MATLAB (see above) or the freely available GNUPLOT, see

  • gnuplot website

    Or if you want a graphics subroutine callable from C or Fortran, see e.g.


    Course Outline

  • Basics of Numerics (2 weeks)
    - Numerical Math: Roundoff error, representation of numbers, etc
    - Interpolations and Approximations
    - Computing Derivatives and Integrals
    - Random Number Generators

  • Ordinary Differential Equations (2 weeks)
    - Basic Methods: Euler, Runge-Kutta
    - Applications: Motion with friction, Chaotic Systems, Planetary motion in General Relativity

  • Spectral Methods (3 weeks)
    - Random Gaussian Fields, Power Spectrum
    - Fast Fourier Transform
    - Windowed Fourier Transforms, Wavelets
    - Applications: Spatial and Temporal Distributions: Analysis and Generation, Normal Modes

  • Partial Differential Equations (3 weeks)
    - Finite Differences
    - Grid Methods: FFT, Relaxation, Multigrid
    - Lax, Lax-Wendroff, Staggered Leapfrog Methods
    - Methods of Characteristics
    - Applications: Water Waves and Tsunamis, KdV Solitons, Traffic Problems

  • Monte Carlo (3 weeks)
    - Basic Ideas of Renormalization Group
    - Random Walks, Monte Carlo, Markov Chains
    - Applications: Ising Model, Phase Transitions, Percolation, Fractals