I'm a lecturer at the University of Cape Town in the department of Mathematics and Applied Mathematics. I teach mathematics both at undergraduate and at honours levels and my research interests lie in the intersection of applied mathematics and many other areas of science, from biology and neuroscience to fundamental particle physics and psychology.

Taking a pipe round a corner corridor optimisation question

You have a corridor which has an L-shape in it. The corridor looks like this:

where a and b are the widths of the sections of the corridor. The question is to find the longest pipe that can be carried down this corridor. The word pipe here just means something long and with essentially 0 thickness. There is a huge simplification which is being assumed here, which is that the corridor is only 2 dimensional. Of course in a 3 dimensional corridor we have a lot more room to manoeuvre.

Let’s think about a pipe going round the corner. The longest pipe that can go through is the length of the shortest gap that it has to go through. So let’s think of a pipe at a particular angle with respect to the corner:

The pipe here is the blue line and $\theta$ is the angle that it makes with respect to the corner.…

Prove that for every positive integer n, 9^n – 8n -1 is divisible by 64.

Prove that for every positive integer $n$, $9^n-8n-1$ is divisible by 64.

This question screams proof by induction, so we start with the base case, which in this case is $n=1$:

$9^1-8-1$ which is indeed divisible by 64.

Now, let’s assume that it holds true for some positive integer $n=k$. ie:

$9^k-8k-1=64p$ for $p\in\mathbb{Z}$.

Now let’s see how we can use this to prove that the statement holds true for $n=k+1$. For $n=k+1$ we have:

$9^(k+1)-8(k+1)-1=9(9^k)-8k-8-1=9(9^k-8k-1)+64k$

where we have manipulated the expression to contain the left hand side of the inductive hypothesis. Thereby, plugging in the inductive hypothesis, we get:

$9^(k+1)-8(k+1)-1=9(9^k)-8k-8-1=9(64p)+64k=64(9p+k)$

but clearly $9p+k$ is an integer, so this is divisible by 64 and thus the statement holds true for $n=k+1$, thus it holds true for all positive integers $k$

 How clear is this post?

A tricky complex numbers problem

The question is as follows:

If $\frac{\pi}{6}\in arg(z+a)$ and $\frac{2\pi}{3}\in arg(z-a)$ and $a\in \mathbb{R}$, find $z$.

So, let’s think about the information given and what we are trying to find. We want to find the complex number $z$ which satisfies this slightly strange set of constraints, and the constraints are given in terms of $z$ and $a$. So, by the looks of things, the answer will depend on $a$ and so the final expression should be a function of $a$.

Now let’s explore the constraints. In fact, let’s simply take $z+a$ and $z-a$ as two complex numbers, but importantly two numbers which differ only by a real number $2a$, so wherever they lie in the complex plane, they have the same imaginary part and differ only by an real part.

Now, the constraints are about the arguments of the two complex numbers. It doesn’t tell us anything about the magnitude of the numbers, so all the information tells us is the direction are in relation to the origin.…

Using polynomials to solve differential equations

One of the aims of MAM1000W isn’t just to teach you individual mathematical topics, but over time to allow you to see the links between these subjects. Sometimes we do this explicitly, and sometimes you should notice the connections yourself simply by seeing one topic pop up in the middle of another. As I’ve written before, so much of it is about noticing patterns.

Today in class I gave a differential equation which wouldn’t be solvable by any of the methods we have looked at.

$y''(x)+\cos(x)y'(x)+e^xy(x)=x^2$

This is second order linear but its coefficients are not constant. We don’t have any way in to solve this. We actually wanted to solve this with the initial conditions $y(0)=1$ and $y'(0)=-1$.

Actually, that’s a lie. We didn’t want to solve it, but we wanted to get an approximation for the solution close to $x=0$. This is like saying: OK, so we have a differential equation for population dynamics, or climate change, or the heating of an object, and we don’t worry too much about the very far future, but we want to know what it’s going to do in the short term.…

 How clear is this post?

How Behavior Spreads: The Science of Complex Contagions, by Damon Centola, a review

NB. This book was sent to me as a review copy.

The idea of this book is relatively simple, but the consequences are huge, and in fact some of the ideas are far more subtle and complex than they may first appear.

Essentially this book is based on a series of experiments which Damon Centola has run, which are all related to changes in behaviour which can be tracked, and made to occur, through a social network (in the broadest sense of the word). This is the study diffusion in a network.

The fundamentals of the research lie on two distinctions: One in the complexity of a contagion/behaviour, meaning how many connections with others who have the contagion/behaviour do you need until you adopt it, and the other in the topology of the social network, meaning loosely, how much like a street where each person only talks to their neighbours, versus a small world-network where there are a lot of disparate connections does the network look like.…

Why did we choose that range for theta when doing trig substitutions?

Remember when we are doing a trig substitution, for instance for an integral with:

$\sqrt{a^2-x^2}$

We said that we should choose $x=a\sin\theta$, which seemed reasonable, but we also said that $-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}$. Where did this last bit come from?

Well, we want a couple of things to hold true. The first is that any substitution that we make, we have to be able to undo. That is, we will substitute $x$ for a function of $\theta$ but in the end we need to convert back to $x$ and so to do that we have to be able to write the inverse function of, in this case $x=a\sin\theta$. The $\sin$ function is itself not invertible because it’s not one to one, so we have to choose a range over which it is one to one. We could choose $-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}$ or we could choose $\frac{\pi}{2}\le\theta\le\frac{3\pi}{2}$ (amongst an infinite set of possibilities). That would also be invertible. However, remember that we are going to end up with a term of the form:

$\sqrt{1-\sin^2\theta}=\sqrt{\cos^2\theta}$

So if we want this to simplify, we had better choose our range of $\theta$ such that $\cos\theta$ is positive, so that we can write $\sqrt{\cos^2\theta}=\cos\theta$.…

Integrals with sec and tan when the power of tan is odd

We went through an example in class today which was

$\int tan^6\theta \sec^4\theta d\theta$

In this case we took out two powers of sec and then converted all the other $\sec$ into $latex\ tan$, which left a function of tan times $sec^2\theta d\theta$. We wanted to do this because the derivative of $\tan$ is $\sec^2$ and so we can do a simple substitution. If we have an odd power of $\tan$, we can employ a different trick. Let’s look at:

$I=\int \tan^5\theta\sec^7\theta d\theta$.

Here, sec is an odd power and so we can’t employ the same trick as before. Now we want to convert everything to a function of $\sec$ and have only a factor which is the derivative of $\sec$ left over. The derivative of $\sec$ is $\sec\tan$, so let’s try and take this out:

$I=\int \tan^5\theta\sec^7\theta d\theta=\int \tan^4\theta\sec^6\theta (\sec\theta\tan\theta)d\theta$.

Now convert the $\tan$ into $\sec$ by $\tan^2\theta=\sec^2\theta-1$:

$I=\int (\sec^2\theta-1)^2\sec^6\theta (\sec\theta\tan\theta)d\theta=\int (\sec^{10}\theta-2\sec^8\theta+\sec^6\theta) (\sec\theta\tan\theta)d\theta$

where here we have just expanded out the bracket and multiplied everything out.…

Fundamental theorem of calculus example

We did an example today in class which I wanted to go through again here. The question was to calculate

$\frac{d}{dx}\int_a^{x^4}\sec t dt$

We spot the pattern immediately that it’s an FTC part 1 type question, but it’s not quite there yet. In the FTC part 1, the upper limit of the integral is just $x$, and not $x^4$. A question that we would be able to answer is:

$\frac{d}{dx}\int_a^{x}\sec t dt$

This would just be $\sec x$. Or, of course, we can show that in exactly the same way:

$\frac{d}{du}\int_a^{u}\sec t dt=\sec u$

That’s just changing the names of the variables, which is fine, right? But that’s not quite the question. So, how can we convert from $x^4$ to $u$? Well, how about a substitution? How about letting $x^4=u$ and seeing what happens. This is actually just a chain rule. It’s like if I asked you to calculate:

$\frac{d}{dx} g(x^4)$.

You would just say: Let $x^4=u$ and then we have:

$\frac{d}{dx} g(x^4)=\frac{du}{dx}\frac{d}{du}g(u)=4x^3 g'(u)$.…