PC5215, ``Numerical Recipes with Applications'' Semester I, Aug-Nov 2025

INSTRUCTOR: Prof. Wang Jian-Sheng

CLASS SCHEDULE: Mon/Thu 2:00-4:00 at UTown LT53. Final exam 28 Nov 2025 9:00am. For more info, login to Canvas.

TEXTBOOKS: "Introducing Python", B. Lubanovic; ``Numerical Recipes in C (1992), the Art of Scientific Computing,'' W. H. Press, et al.

MODULE DESCRIPTION: Covers computational techniques for the solution of problems arising in physics, with an emphasis on molecular simulation and modelling. Topics will be from the text, "Numerical Recipes", Press et al, supplemented with example problems in materials and condensed matter physics. The textbook is in C, but this course will use Python for programming. This course insures that graduate students intend to do research in computational physics will have sufficient background in computational methods and programming experience. Assessment: 4 labs assignments and quizzes 40%, midterm 15%, final 45%.

COURSE OUTLINE (lecture slides)

week 0, 4-8 Aug, no class

week 1 , 11,14 Aug, introduction, Python

week 2, 18,21 Aug, Chap 1, Python continued, floating point representation, error, accuracy, etc

week 3, 25,28 Aug, Chap 2, LU decomposition, lab 1

week 4, 1,4 Sep, Chap 3, interpolation and extrapolation

week 5, 8,11 Sep, Chap 4, integration, trapezoidal, Romberg, lab 2

week 6, 15,18 Sep, Chap 7, Monte Carlo integration

week 7, recess week, no class

week 8, 29 Sep,2 Oct, Monte Carlo method, (midterm test at Thursday lecture time)

week 9, 6,9 Oct, Monte Carlo, continued

week 10, 13,16 Oct, Chap 10, optimization, conjugate gradient

week 11, 23 Oct, Chap 15, modeling of data (least square) (Monday is Deepavali)

week 12, 27,30 Oct, Chap 16, ordinary differential equations, molecular dynamics

week 13, 3,6 Nov, ODE, continued

week 14, 10,13 Nov, revision (last week)

---

Review Problems (with partial answers)

2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2022, 2023, 2024. final exam and answers.

Some sample codes: stability.py, ludcmp.py, polint.py, trapzd.py, mnist.py, conjugategradient.py, nfit.dat, testieee.c.

Some interesting sites related to the course: LAPACK, an easy to read article on conjugate gradient method, fast Fourier transform FFTW, symplectic integrator.

We recommend to install Anaconda (www.anaconda.com) with Jupyter notebook for Python programming.