A little tipple *before* marking Quantum Mechanics sheet 3 can be excused as a demonstration to my students about why operators don’t necessarily commute with each other. It remains to be seen what [drink,mark] turns out to be.

# Category: Maths

## Fluid dynamical chant

I have been invited to give a talk on fluid dynamics at Queens’ Mathematical Society this term. Details are yet to be decided, but the talk will be an introduction to fluids and a focus on boundary layers, including the mathematical notion of a singular limit.

While writing the talk, I thought it might be nice to have a little *fun* with it.

The flow of a | fluid is | governèd

By the interact-si | -on of | four main | forces:

Viscosity * gravity * inert-si- | -a and | pressure.

Depending on the context | one may | dominate an- | -other.In fast flows | or large | lengthscales

Inert-si- | -a is | domin- | -ant

These include many im- | -portant | contexts

Such as household plumbing * oil pipelines * submar- | -ines : and the | upper | atmosphere.Unfortunately * the | limit of | Reynolds number

Going to infinity | is a | singular | limit.

The behaviour of an in- | -viscid | fluid

Is quite different from | that of | one with low vis- | -cosity.

## A problem for the Sorting Hat

My secondary school, CRGS, admits (or used to admit–I’m not sure now) 100 people each year (technically, 96+4). They are to be split into *h* = 4 houses, such that the houses have equal numbers and siblings are in the same house as each other. What happens if they have a year of fifty pairs of twins, or twenty-five sets of quadruplets?

(I believe there’s also a condition on how the four houses should be distributed evenly across the forms, but for simplicity let us ignore it.)

**More serious question:** Let us call an intake *unresolvable* if the two conditions cannot be satisfied. For a given probability distribution of twins, triplets, *etc.*, consider the probability P(*n*) that an intake of *h**n* people will be unresolvable. What values of *n* are local minima of P(*n*)?

## Fractal awfulness

The mathematical justification for the adage ‘never read the comments’ is the notion of ‘fractal awfulness’. This says that there exist arbitrarily petty people that have misguided or bigoted views about decreasingly small communities, and that their inflammatory language and style are all self-similar to each other.

It would be interesting to look for a scaling law between ‘number of people who have/identify as X’ and ‘number of people who have a negative view of people who have/identify as X’.

## A spectral solver for Schrödinger’s equation

Here is a MATLAB program for solving the 1D time-dependent Schrödinger equation:

http://jftsang.com/code/schrodinger_spectral.m

You can specify a potential function and an initial condition, and the solver calculates the wavefunction at future times. Hopefully this will be useful for getting some intuition as to how solutions to Schrödinger’s equation behave.

## Details

The solver uses a spectral method which performs the time-integration exactly. Errors come from the spatial discretisation. The calculation is done in a periodic domain, so edge effects may affect your solution, especially in scattering problems.

## Postprocessing

Fourier-transforming the solution in space tells you about the relative strengths of different wavenumber components of the solution, and therefore about the momentum distribution at each time.

Fourier-transforming in time tells you about the different frequency components in the solution, which you can use to identify energy eigenstates. Note that you might have to calculate the solution for a long time before you have enough periods for the Fourier transform to be precise enough.

## Not-so-continuum mechanics: A talk for the LMS

I will be speaking at the London Mathematical Society’s Graduate Students’ Meeting tomorrow morning, on *Not-so-continuum mechanics: Mathematical modelling of granular flows*. It’s meant to be a gentle introduction to granular phenomena, and I will introduce a basic version of the *μ*(*I*) rheology, a fairly (but not universally!) successful description of granular flow. Here’s a practice version of the talk.

The talks are meant to be aimed at `a general mathematical audience’. My talk assumes no mathematical knowledge beyond A-level Mechanics. I’m having some trouble understanding some abstracts for the other talks, and I’m not sure if my talk is just better-aimed at a general audience, or if theirs are, and there are just huge gaps in my mathematical training (which there are: I’ve never done any algebra beyond basic group theory, or any number theory or combinatorics).

## Genesis, academia version

In the beginning, God created the universe. On the first day, God said: ‘Let there be light.’ And there was light. And God saw the light, that it was good.

On the second day, God made the firmament to divide the waters which were under the firmament from the waters which were above the firmament.

On the third day, God created the dry land, and the trees, flowers and grass, and saw that it was good.

On the fourth day, God created the sun, the moon and the stars, and introduced the seasons.

Whilst doing so, the Head of Department (on whose right hand sits God) asked him to review a number of funding proposals, which meant he didn’t have time to make more stars to fill up the vast void of space.

On the fourth evening, God noticed a bug with the light code that meant that the speed of the light from distant stars depended on the season. So he stayed up late fixing that.

On the fifth day, God unexpectedly had to give a lecture because his colleague went to a conference without telling anybody.

On the sixth day, God was creating Man, and was trawling through pages and pages of Matlab documentation when a system administrator decided it was time for a server reboot. The code for telepathy has been lost.

On the seventh day, God finally had some time to catch up with a huge number of emails. Undergraduates will understand why human supplications seldom receive a response.

## Counting semiprimes

The prime-counting function returns the number of prime numbers less than or equal to . The prime number theorem gives the asymptotic behaviour .

We shall call a number *semiprime* if it is the product of two primes. Let denote the semiprime-counting function. What is the asymptotic behaviour of ? I claim that

**Edit (17 September 2016) **Based on experiments in Mathematica, the above seems to be a lower bound, while an upper bound is given by

I obtain these by the following heuristic, probabilistic argument. The probability that a random integer chosen between 1 and is ; loosely, this means that the probability of a randomly chosen large number is approximately . Similarly, is the probability that a randomly-chosen is semiprime.

An exact formula for is

The sum over is trivially . Hence

We split the sum at into two parts, and assume that the first part is dominated by the second. In the second part, is large and we invoke and approximate the sum as an integral, to get

Evaluating the integral and keeping only the highest-order terms, we get the desired formula.

The semiprime-counting function can be implemented in Mathematica by

SemiprimeQ[n_] := SemiprimeQ[n] = Module[{f}, f = FactorInteger[n]; ( ((Length[f] == 2) && (Total[Last /@ f] == 2)) || ((Length[f] == 1) && f[[1]][[2]] == 2) ) ]; w[n_] := w[n] = Length[Select[Range[n], SemiprimeQ]]

(where we memoise the results to speed things up). The following code produces a graph showing the validity of these approximation:

W1[n_] := n/Log[n] Log[Log[n]]; W2[n_] := n/Log[n] Log[Log[n]/Log[2]]; nn = 150000; nj = 500; Show[ ListPlot[Table[{n, w[n]/W1[n]}, {n, 1, nn, nj}], PlotStyle -> Red], ListPlot[Table[{n, w[n]/W2[n]}, {n, 1, nn, nj}], PlotStyle -> Green] ]

## ‘Buoyancy frequency’ is such a boring name

Revising my notes on internal gravity waves. Obsessively trying to pronounce ‘Väisälä’. Feeling ve’y silly.

## Speed dating and graph theory

Suppose you are organising a speed dating event. You are given a graph . The event consists of a number of rounds; in the th round of the event, you must pick a subset such that no appears in two elements of , and for all . (That is, no person may be in two dates at the same time, and the same date may not occur in two rounds.) The event lasts for rounds, finishing when . (That is, when all possible dates have occurred). The ‘idle time’ is defined as .

For example, consider an event for straight men and straight women. Then is the complete bipartite graph , and a simple solution is to have all the men seated around the inside of a ring-shaped table, all the women around the outside, and to have one set rotate around after each round while the other set stays still. In this case, and .

How can you choose the to minimise ?