Blog

A Mathematical Mystery

In my previous post on one-dimensional heat flow, I encountered sums of the form:

$$ \sum_{n=0}^\infty \frac{\pm 1}{2n+1} \exp \left( - (2n+1)^2 x \right) $$

A plot (involving the first 1000 terms) is shown below, and looks reasonable enough. Is this curve, which forms the limit of the series, a known function?

Heat Flow

Heat Flow

Imagine a rod that is initially at temperature $T_1$ and then brought into an environment with a lower temperature $T_0 < T_1$. How quickly does the body cool down? When will it have reached the environment’s temperature? What is the temperature profile throughout the rod, as a function of time?

This is essentially a worked homework set: a complete, step-by-step solution of the diffusion (or heat) equation in one dimension.

A Guide to git: Three Essential Hidden Concepts

Like many other people, I have struggled with git. It was obviously all very clever, but somehow inexplicably difficult and frustrating to use.

Eventually, I realized that my difficulties stemmed from three misconceptions: areas, where git did something different from what I thought it did, or different from what I was led to believe it did.

SSG is not CMS - Or is it?

About a year ago, to put a cap on my struggles with Hugo, I wrote up some thoughts on the whole static-site-generator (SSG) concept. One point I made concerned the amount of “meta-data management” that the typical SSG does: creating tag collections; creating sitemaps, and so on. And what a pity it is, that most SSGs don’t seem to surface this information in a way that would be usable by other tools.

Sampling from a Stream

Selecting a random element from an array of length n is easy: simply generate a random integer i, with 0 <= i < n, and use the array element at that index position. But what if the length of the array is not known beforehand, or is, in fact, infinite (i.e. a stream)? And what if we don’t just want a single element, but a set of m samples, without replacement?