Posts

Visual calculus

Image
I've been wondering: is it possible to visualize the rules of calculus? 1. Integration by parts To simplify things, in the above visualization $v(x_1) = 0$, so that $\int^{x'}_{x_1}\frac{dv}{dx}dx = v(x')$.  This means that $v(x_2)$ is simply the area of the cross-section facing us on the LHS, and the volume  on the LHS is $u(x_2)v(x_2)$. The RHS shows the same volume split into two parts.  The rectangle embedded in the first is $u\frac{dv}{dx}$, and so its volume is $\int^{x_2}_{x_1}u\frac{dv}{dx}dx$.  The cross section of the 2nd part is $v(x)$, so its volume is $\int^{u_2}_{u_1}vdu$, which becomes $\int^{x_2}_{x_1}v\frac{du}{dx}dx$ when rewritten as an integral over $x$. So the picture is visual proof that the equation in pink holds, provided that $v(x_1) = 0$.  To prove it in general we just need to check that when we replace $v$ with $v+v_1$ in the equation, both sides change by the same amount. 2. The chain rule This picture demonstrates the cha

Determinants and parallelepipeds

Image
Connecting Geometry and Algebra Matrix determinants have the following strange definition that seems to have been pulled out of thin air: $$ det(A) = \sum_{\sigma}{sign(\sigma)a_{1\sigma(1)}...a_{n\sigma(n)}} $$ where $A = (a_{ij})$ is a real $n\times n$ matrix $\sigma$ ranges over all permutations of $\{1,...,n\}$ $sign(\sigma)$ is $+1$ if $\sigma$ is a product of an even number of transpositions and $-1$ otherwise$^\dagger$ However, in the geometric world the definition is far more intuitive: The determinant of A is the volume of the parallelepiped formed by its columns, multiplied by minus one if these have the opposite handedness to the unit vectors. Why are these two definitions the same?  To begin to answer this we need to first define elementary matrices and then show that every square matrix can be written as a product of these. Definition The elementary matrices are $E_{i, j}$ for $1 \le i,j \le n$ $E_{i,\lambda}$ for every real $\lambda$ and $1 \l

Passenger Plane Puzzle

Image
In this post I will attempt to show that sitting down and having a nice cup of tea is the best approach to solving any new mathematical problem.  So, here's a problem: A plane has 100 seats and 100 passengers each with an allocated seat number.  The first passenger to get on the plane is blind and chooses a seat at random.  Each subsequent passenger to board chooses their own seat if still available, or a seat at random if not.  What is the probability that the 100th passenger gets their allocated seat? This is more subtle than it seems at first.  The last passenger could get their own seat because the blind passenger chooses the correct seat, or because the 2nd passenger chooses the blind person's seat, or because the first 87 passengers occupy the first 87 seats.  In fact there's a huge number of ways in which it could happen. Knuckleheaded Compsci solution Suppose we've forgotten to have a cup of tea.  Then we might just dive in and start modelling

Lagrange in the news

Image
Queqiao and Chang'e-4 Exciting news from the BBC Website: China Moon mission lands Chang'e-4 spacecraft on far side .  The page includes a video with sinister background music as if to suggest they're the baddies (a la Drax in Moonraker).  However, the part that really intrigued me was the mention of the L2 Lagrange point - the first I've ever seen in a news story! As I described in my post Lagrange Points   there are 5 locations in the Earth-moon-Sun plane in which - in the rotating frame of reference and taking centrifugal forces into account - there is no overall force and an object can be parked indefinitely.  One of them is just beyond the moon and is called L2 . Now the problem with landing a probe on the far side of the moon is that you can't talk directly to it: there's a big rock in the way!  So, according to the BBC article the Chinese Space Agency has parked a satellite Queqiao at L2 to relay messages.  This left me a bit confused, as

Moonlight

Image
If the sky were covered in moons it'd be almost a bright as day! Walking to the pub through the Yorkshire Dales on a particularly brilliant moonlit evening, when everything was clearly visible, I wondered just how much less light there was than during daytime?  It turns out to be quite easy to estimate an upper bound - all you need to do is measure the angle subtended by the moon! Let $A_e$ and $A_m$ be the cross sectional areas of the Earth and moon, $d$ be the distance to the moon, and $r$ be the distance to the Sun.  Now, suppose the Sun releases some energy $E_s$ then the amounts $E_{se}$ and $E_{sm}$ which land on the Earth and the moon are given by: $$ \begin{align} E_{se} &= \frac{A_e E_s}{4\pi r^2}\\ E_{sm} &\approx \frac{A_m E_s}{4\pi r^2} \end{align} $$ On a full moon, let's assume for the sake of calculating an upper bound that the moon reflects all of $E_{sm}$ equally in all hemispheric directions.  Then the energy reflected to the Earth is giv

Fundamental Theorem of Algebra

Image
Theorem of the week This week's theorem of the week is the fundamental theorem of algebra , and the picture is the proof! Theorem Every non degree-zero polynomial $p(z) = a_nz^n + ...+ a_1z +  a_0$ has a root in $\mathbb{C}$. Picture proof To see how the picture proves this, write $z$ as $Re^{i\theta}$, then for all $k$ $$ z^k = R^ke^{k i \theta} $$ So for sufficiently large $R$ the $a_nz^n$ term dwarfs all the others and so the image of $\{z\in\mathbb{C}: \lvert z \rvert = R\}$ must go around the origin $n$ times, like the rubber band in the photo.  But when $R= 0$ the image is just $\{a_0\}$ which goes around the origin zero times.  So, for some $0 < r < R$ the image of $\{z\in\mathbb{C}: \lvert z \rvert = r\}$ must cross the origin.  QED. Less handwavy proof In order to obtain a contradiction assume $p(z)$ has no zeros.  Then $\frac{z^{n-1}}{p(z)}$ is everywhere differentiable, which in turn means that its closed loop integrals are zero$^{(\dagger)}$.

Swivel Chair Theorem

Image
Can you always reorient a four legged chair to make it stable on an uneven surface? If we can assume the feet form a perfect square, then: Yes! Without loss of generality let's suppose that the chair starts off in the position shown top left, with its front right foot in the air and the others on the ground.  If we keep the two left feet on the ground while pushing down on the other two, the above ground foot will eventually touch the floor and the remaining foot will sink below it. Now imagine instead rotating the chair by 90$^\circ$, keeping the same 3 feet touching the ground at all times, and ending with the two back feet in the positions previously occupied by the two left feet.  The two back feet and the front left foot occupy three corners of the square described by the feet at the end of the previous paragraph, so the fourth must be below ground.  Since the front right foot starts off in the air and ends up below ground we can infer from the interme

Déjà vu

Image
 Déjà vu Reality Checkpoint Cambridge ... the feeling of having been somewhere or experienced something before when you know you haven't.  Déjà vu demonstrates that knowing we've been somewhere before and feeling that we have are different things. What makes it so difficult to convince skeptics of the reality of Everett's parallel worlds is that it feels as if time flows through the present moment like water flowing through a hosepipe.  It doesn't feel like the present moment just exists as a droplet in a sea of moments, some of which happen to be a bit future- like , some a bit past- like (but most neither).  Past-like moments invoke a feeling of recognition in us, and we line them up like dominoes and call them the past.  But if you've ever experienced déjà vu you know that such feelings of recognition can't be trusted. So, if we could determine what neural activity or hormone , is associated with déjà vu, then maybe we could develop a drug th

Xylophone Octave Radical!

Image
A few Christmases ago I was playing with a toy xylophone meant for my nephew when I noticed something odd.  I expected going up an octave to halve the bar length, but it didn't.  A quick measurement confirmed my suspicion: to go up one octave you divide by $\sqrt{2}$ instead of by $2$.  I remembered this earlier this week while at my son's school concert, and decided to see if I could work out why! Strings First a bit of background.  Why did I expect halving the length to result in a note one octave higher (i.e. double the frequency)?  The answer is because I'd learned that this was the case with stringed instruments.  Assume that the tension is a constant $T$, and let $z(y,t)$ be the vertical displacement of the string at position $y$ and time $t$.  Then the upward force on a small element of  size $\delta y$ is approximately $$ T \left(\left. \frac{\partial z}{\partial y}\right|_{y+\delta y} - \left.\frac{\partial z}{\partial y}\right|_y\right) = T\delta y \frac{\

Digital Radio

Image
Image by Goodtiming8871 CC-BY-SA 4.0 Most people learn how AM and FM radio works at some point or another.  These are methods for transmitting and receiving an analogue signal, but nowadays most radio signals are digital.  How is it possible to send bytes from one place to another using analogue electromagnetic radiation?  I thought I'd write a post to try to demystify it.

Lagrange points

Image
Imagine you were a hamster in a hamster ball living on a hilly surface.  Base camp is surrounded on all sides by high summits, but you have a powerful catapult there that can fire you to the top of any of them.  Once fired you can influence your trajectory, but it's hard work and you don't have much energy in your little legs.  Suppose you know where you want to end up beyond the hills.  What's the best strategy for getting there?

Poem

Image
ESA/Rosetta/NavCam – CC BY-SA IGO 3.0 In November 2014 the Philae lander touched down on 67P.  As I tried to imagine what was happening there now, I realized that "there now" doesn't really have much meaning when "there" is 30 light minutes away.  And maybe "what's happening" doesn't have much meaning either, given that the region of spacetime outside of one's light cone provides the sort of causal isolation quantum computing engineers would kill for. In a lapse of character brought on by mental fug I penned a poem On Everett's Peak  Rosetta, Philae, half an hour away if you're travelling light Packed with meters, big and small And a single transistor failure could ruin it all Cosmic ray, beta decay, a single gamma misplaced State changed, plan deranged, non-redundant memory defaced It hasn't happened yet, at mission control, as far as it is known At mission control, it hasn't happened yet, anyti

WTF, QFT?

Image
The following equation can be viewed in a couple of ways $$ action =  \int_{\Omega} \mathcal{L} (\phi_a, \partial_{\mu}{\phi_a}) d^4x $$ 1. Classically Every physical law can be written in terms of an Action Principle .  An action principle states that measurable values $\phi_a(\mathbb{x},t)$ over a region of spacetime $\Omega$ will be such that the action is stationary.  Or to put it another way, if you infinitesimally deform the $\phi_a$ then either  however you do it the action will increase, or  however you do it the action will decrease. There is an important caveat though: the action is stationary because we only consider deformations of the $\phi_a$ that preserve its values on the boundary $\partial \Omega$. This is an alternative to the differential way of describing the universe, in which only a single point of spacetime is considered.  In the differential formulation, instead of being told the values of $\phi_a$ on a boundary of a region of spacetime, and asked

On teleportation: A thought experiment

Image
I would be glad to know your Lordship's opinion whether when my brain has lost its original structure, and when some hundred years after the same materials are fabricated so curiously as to become an intelligent being, whether, I say that being will be me; or, if, two or three such beings should be formed out of my brain; whether they will all be me, and consequently one and the same intelligent being. —  Thomas Reid letter to Lord Kames , 1775 If only nature could provide some way to distinguish between identical and the same  then one could answer Thomas Reid's question.  If a reconstructed Thomas Reid were the same being then that being would be him; if it were an identical being then it would merely be a person with the same memories, but without any continuity of experience linking it to the original Thomas Reid.  Incredibly, it turns out that nature does provide a way! A well known feature of modern physics is that if you perform the same experiment t

Why is the universe like a tortoiseshell cat?

Image
COBE CMB fluctuations. Original Source: NASA All tortoiseshell cats are female.  Males can be black, or ginger, but never tortoiseshell.  The reason for this is that the mechanism by which tortoiseshell cats get the patterns on their coats depends on having two X chromosomes.  This is all described beautifully in Chapter 7 of "Junk DNA", by Nessa Carey . Females have twice as many X chromosomes as males, which on the face of it should result in 100% more expression for the genes on that chromosome.  This should lead to much greater differences between males and females than we actually see.  To put this in perspective, Down's syndrome is caused by individuals having 3 copies of chromosome 21 instead of 2.  But this is a far smaller chromosome than X and the difference is only 50%, rather than 100%.  (The fact that chromosome 21 is so small is the reason Down's syndrome is more common than syndromes in which there are too many copies of more important chromosome

Infinite Jenga Half Bridge

Image
How much can you make the top Jenga brick overhang the base by stacking them together? Surprisingly, you can go as far as you want. Suppose your bricks are length $l$ and you have one brick (not including the base).  Obviously you can overhang by $\frac{l}{2}$ without the centre of mass being unsupported.  What if you have two?  Now you have two conditions The centre of mass of the top brick is supported The centre of mass of the top 2 bricks are supported A quick calculation gives us that if the top brick is displaced (relative to the one below) by $\frac{l}{2}$ then the one below could be displaced by at most $\frac{l}{4}$ (relative to the one below it). Now suppose you have $n$ bricks (not including the base), then  you have $n$ conditions.  Let's guess the answer based on the result for $n=2$ and let's set $d_k = \frac{l}{2}\frac{1}{k}$ where $d_k$ is the displacement relative to the brick below and $k$ is the brick number starting at the top.  Then the centre

Selfish Genes

Image
  Original Image: Mariuswalter CC BY-SA 4.0 I've just finished reading "A Crack In Creation" by Jennifer Doudna and Samuel Sternberg.  Doudna is the co-creator of CRISPR, the gene editing tool that genuinely is a Cracking Creation.  (I don't think the pun was intended since the word Cracking is not used much outside of and Wallace and Grommit appreciation societies, however, it would have been incredibly apt if it were!) If you are interested in How-Things-Work then this is a book for you.  I knew next to nothing about cell biology before starting it and now I feel like a pro.  The authors' writing style is incredibly clear, but what really saves you from the sense of drowning in acronym soup are the excellent illustrations throughout the book.  So, if you have heard the terms: DNA, RNA, base pair, ribosome, amino acid, protein, phage, virus, prokaryote, ... and so on, but aren't really sure what these things are or how they relate to each other then