During a lecture on the solution of standard ODEs, a student asked why we use as the solution of the integral in the exponent of an integrating factor rather than the formally correct antiderivative . In particular, the student was concerned about the omission of the modulus symbol around the . The explanation is notContinue reading “Why we can omit the modulus symbol in ln(|x|) in the integrating factor method”
Category Archives: Uncategorized
Using Prüfer sequences to count and classify irreducible labelled 10-node trees
In the cult classic movie Good Will Hunting (Miramax, 1997), a maths-genius janitor played by a young Matt Damon secretly solves challenge problems in graph theory written on a blackboard by an MIT maths professor for his students. One of these problems, which Will can be seen solving in the above screenshot from the movie,Continue reading “Using Prüfer sequences to count and classify irreducible labelled 10-node trees”
A max-flow/min-cut network problem solved both manually and with Python
For a lecture on digraphs and network flows, I prepared the following capacitated directed network problem in order to explore its solution both manually via a maximum-flow/minimum-cut algorithm and computationally using the NetworkX library in Python: The number on each arc represents the flow capacity of that arc and the vertices and are the sourceContinue reading “A max-flow/min-cut network problem solved both manually and with Python”
Using the Python library NetworkX to find all Hamiltonian cycles in a graph
For the purposes of a lecture in graph theory, I created the following example of a Hamiltonian graph consisting of the complete graphs , and joined pairwise by an edge: The Python library NetworkX can be used to perform many of the calculations that arise in graph theory and networks and I used it inContinue reading “Using the Python library NetworkX to find all Hamiltonian cycles in a graph”
Boltzmann distribution, Gibbs-Shannon entropy and Helmholtz free energy
Consider a so-called canonical ensemble consisting of a system , a heat bath , and the total closed system containing and , with corresponding energies , and respectively so that with fixed. For example, could represent a single 1-D lattice of spins in the Ising Model, could consist of a heat bath with which isContinue reading “Boltzmann distribution, Gibbs-Shannon entropy and Helmholtz free energy”
Zero-field singularity of magnetic susceptibility in a 4-D Ising model
For the purposes of a lecture on simulating the Ising model of ferromagnetism using the Metropolis-Hastings algorithm, I explored the behaviour of magnetic susceptibility on a four-dimensional hypercube lattice. In particular, I wanted to test a well-known prediction of theoretical physics that a zero-field singularity should appear at a certain critical temperature. The idea isContinue reading “Zero-field singularity of magnetic susceptibility in a 4-D Ising model”
Fourier transform of a function that is scaled and translated in either order
Consider a function with Fourier transform where Then it is straightforward to show that the Fourier transform of the scaled function is and the Fourier transform of the -translated function is What is a little less straightforward is to deduce from these what the Fourier transform must be of a function that has been bothContinue reading “Fourier transform of a function that is scaled and translated in either order”
Ornstein-Uhlenbeck process: derivation and simulation of its pdf and moments
The Ornstein-Uhlenbeck process is widely used in the stochastic modelling of mean-reverting processes. In the present note, I want to record a derivation I produced for a lecture of the pdf and moments of an Ornstein-Uhlenbeck process exhibiting mean-reversion to zero with a stochastic differential equation (SDE) of the form where and are constants andContinue reading “Ornstein-Uhlenbeck process: derivation and simulation of its pdf and moments”
From simple random walk to Wiener process and diffusion equation
For the purposes of a lecture, I wanted a very straightforward mathematical setup leading quickly from a simple random walk to the Wiener process and also to the associated diffusion equation for the Gaussian probability density function (pdf) of the Wiener process. I wanted something simpler than the approach I recorded in a previous postContinue reading “From simple random walk to Wiener process and diffusion equation”
Canonical derivation of the mean and variance of the binomial distribution
The mean and variance of the binomial distribution can be derived most easily using a simple indicator function approach but, in the course of studying a stochastic process involving the binomial distribution, I became interested in deriving the mean and variance from the canonical probability-weighted sum of random variable values. I found it instructive toContinue reading “Canonical derivation of the mean and variance of the binomial distribution”
