Introduction

Why Mathematical Physics?

Mathematical physics is the toolkit of theoretical physics — the collection of analytical and numerical methods that physicists use to solve the equations governing nature. Fourier transforms decompose signals into frequencies. Special functions — Legendre polynomials, Bessel functions, Hermite polynomials — are the exact solutions to the differential equations of quantum mechanics, electrostatics, and wave propagation. Green's functions express the response of a system to any forcing in terms of its response to a point source.

This course implements these methods from scratch in pure Python. No scipy, no numpy — just the mathematics expressed as functions. Each lesson introduces one technique, explains why it matters in physics, and asks you to write the algorithm as code.

You will implement:

  • Fourier series — Decompose a periodic function into sine and cosine harmonics
  • Discrete Fourier Transform — Compute the frequency spectrum of a discrete signal
  • Legendre polynomials — Solutions to Legendre's equation; appear in multipole expansions and quantum angular momentum
  • Gamma function — The Lanczos approximation; generalizes the factorial to real and complex arguments
  • Bessel functions — Solutions to Bessel's equation; govern waves in cylindrical geometries
  • Hermite polynomials — Eigenfunctions of the quantum harmonic oscillator
  • Heat equation — Separation of variables and Fourier mode decomposition
  • Wave equation — d'Alembert's solution and standing waves
  • Euler-Lagrange equation — The calculus of variations; the pendulum and the principle of least action
  • Runge-Kutta RK4 — Fourth-order numerical integration of ordinary differential equations
  • Laplace transform — Analytic transform pairs and numerical integration
  • Green's functions — The impulse response of the 1D Poisson equation
  • Perturbation theory — First-order energy corrections for the particle in a box
  • Tensor operations — Metric tensor, Christoffel symbols, and index gymnastics in polar coordinates
  • Monte Carlo integration — Random sampling, variance reduction, and π from uniform deviates
Next →