Monday, 4 January 2016

The Code on US Netflix

Very exciting that my 3 part BBC series The Code is now available on US Netflix. Some viewers have written to me very excited to have freeze framed an extraordinary pattern made by the flock of starlings that we filmed in Denmark, the so-called black sun (which I've posted above). Was this some amazing message the starlings were trying to communicate? Is the answer to life the universe and everything 6 not 42. So perhaps I should explain... When The Code first aired in the UK we ran an online competition which involved spotting clues in the show. It was made with the great game developer who also do the fantastic Zombies, Run app. Here is an article from Wired about the competition. One of the clues was the number 6 hidden in the flock of starlings. There was another clue for example painted onto the nails of one of the Rock-Paper-Scissors competitors. There were also online games you needed to play. One of my favourites was Master of the Mosaics, all about reading symmetry in the walls of Moorish Palace like the Alhambra. You can play an extended version of the game here The Open University here in the UK helped create a lot of supporting material that you can find here It was a really great competition culminating in an extraordinary Code Book you had to download and complete once you'd unlocked the password. The first three to complete the book the were involved in a grand finale at Bletchley Park. The winner got a unique mathematical sculpture designed by Californian sculpter Bathsheba Grossman. You can find out more about the sculpture here:…/…/2011/07/the-treasure-unveiled.shtml There is more here about the competition. and a video here of the finale Marcus.

Thursday, 13 February 2014


The equation


is shorthand for how to meromorphically continue the Riemann zeta function beyond its region of convergence.

If you add up the integers there is no way you will get anything other than infinity. The equation needs to be understood in its context. The Riemann zeta function is defined as

If you put s equal to any number bigger than 1 then the infinite sum of fractions converges. For example put s=2 and the function says add together 1+1/4+1/9+1/16+... This infinite series can be added up and you get rather beautifully

However if you put s equal to a number less than 1 the infinite series doesn't make sense. For example put s=-1 and you get 1+2+3+4+...

But if you now allow s to be a complex number (not just a real number) then there is a unique way to smoothly extend the definition of the function into the region where it doesn't converge. It is essentially taking another formula which will make sense for values of s less than 1 but which seamlessly meshes with the function you have already defined. It is essential to put this in the context of complex numbers because we have a theorem which says there is a unique way to do this. So if you can extend the function there is only one way to do it. This new function gives the value -1/12 when you put in s=-1.

The story of this equation is discussed more in chapter 4 and chapter 6 of The Music of the Primes.

Do not trust physicists bearing divergent series. You will lose your wallet.

Saturday, 1 June 2013

Geometric Unity

Physics has a problem. In fact quite a few problems. Why are there three generations of fundamental particles, each seemingly just a heavier copy of the generation before? What is dark matter? Why is the expansion of the universe accelerating? How can one reconcile Einstein’s Field Equations which control the curvature of space time and represent our theory of gravity with the Yang-Mills equations and the Dirac equation which represent our theory of particle interactions on a quantum level?

Two years ago Eric Weinstein, working from outside the academic system, came to me with some bold and unorthodox ideas that he had come up with as an attempt to answer these problems. My initial reaction to this was the same as to any such proposal of this type: skepticism. Like many academics I regularly receive hundreds of emails, letters, books from a whole range of people claiming the discovery of a theory of everything or proofs of the Riemann Hypothesis or the Goldbach Conjecture. However I have always kept in the back of my mind the story of Ramanujan writing out of the blue to GH Hardy. Ramanujan’s approaches had been rejected by two academics in London before Hardy responded positively to his letters. So I try to give serious proposals a hearing regardless of whether they come from inside or outside the academy.

My initial skepticism began to wane though as I heard Weinstein’s ideas unfold. By the end of our meeting I was intrigued enough to dedicate time during the last two years to work through the ideas. I don’t understand every detail, but the ideas are beautiful and I believe extremely natural. It is a highly mathematical story but with clear implications to questions of physics. His approach is in line with Einstein’s belief in the power of mathematical geometry. Einstein talked about his conviction that the universe was made of marble not wood. Weinstein’s proposal which he calls Geometric Unity realizes Einstein’s dream.

Geometric elegance is of course no guarantee that the mathematical universe that Weinstein describes must match the reality of our universe. However, if the details survive scrutiny it will still be a beautiful mathematical landscape Weinstein has uncovered, as well as one with uncanny similarities to the world we inhabit.

Weinstein has kept many of these ideas to himself for nearly three decades. It took some courage for him to discuss the ideas with me. I was sworn to secrecy. Weinstein has also been discussing the ideas in secret with mathematician Ed Frenkel and physicist David Kaplan. But as I spent time with the ideas I believed that they were too important to be kept private and needed to be discussed more broadly.

I debated with myself whether it was appropriate for me to host a lecture where Weinstein could begin to explain his ideas. Was this an appropriate use of my position as the Simonyi Professor for the Public Understanding of Science? Charles Simonyi prepared a manifesto when he endowed my chair to guide the holders of the chair in their mission. I would like to quote one part of the manifesto:

“Scientific speculation, when so labelled, and when the concept of speculation and its place in the scientific method has been made clear to the audience, can be very exciting. It is a very effective communication tool, and it is by no means discouraged.”

It was in the spirit of this part of my mission as the Simonyi professor that I decided to persuade Weinstein to give a special lecture in which he could start to propose the ideas he has been working on. The decision to try to publicise his ideas was not taken lightly as all attempts at a Unified Theory have failed so far. However, a little thought reveals that whenever a final theory is at last found, it will first begin its public life with an overwhelming statistical likelihood of failure.

As Charles Simonyi suggested let me make very clear how the scientific method can work. If you have new ideas it is perfectly acceptable to try to articulate these ideas through a seminar or lecture before publishing a paper. The ideas might go through some revision and evolve through dialogue with other scientists. Ultimately these ideas must be written down and evaluated by the communities to which they are relevant. The lecture that Weinstein gave last week was the beginning of that process. A paper which Weinstein is currently working on will in due course appear.

As Charles Simonyi expressed in his manifesto “scientific speculation can be very exciting”. It is an excitement that I think the public can share. No one other than the relevant scientific communities will be able to evaluate the merit of the work, but why shouldn’t the public see science in action? It can help communicate the challenging problems that physics still faces.

It took a lot of courage for Weinstein to come forward and talk about his ideas. He comes as something of an outsider but with the sensibilities and knowledge of an insider, a difficult place from which to propose bold ideas. He has a PhD from Harvard, post-doctoral experience from MIT and the Hebrew University. Not a bad grounding. But rather than staying in academia he went a more independent route working in economics, government and finance. But I have always been a believer that it doesn’t matter who the person is and what is their background, it is the ideas that speak for themselves. I believe science has much to gain if the ideas turn out to be correct and little to lose if they turn out to be wrong.

For a general description of the ideas being proposed check my Guardian blogpost

Sunday, 24 February 2013

BBC Radio 6: Maths and Music with Miranda Sawyer

I did an interview for Miranda Sawyer on BBC Radio 6 for her forthcoming series which will include a programme about maths and music. I did a radio series about maths and music for The Essay on BBC Radio 3 some years ago which you can listen to here That series was mostly concerned with my love of classic music. So I was interested to find out about good examples of maths in popular music. Radiohead, Bjork, Gorillaz all have good examples of interesting time signatures and mixtures of beats which give an unsettling feel of not quite knowing where the beat is. For example: Radiohead 15 Step is in 10/8, Gorollaz 5/4 does what it says on the tin...moves between 5 and 4 beats per bar in an unsettling way, Bjork's Crystalline is in 17/8 (I think Messiaen would have enjoyed that!).

But I was intrigued to know about other examples. So who better to ask than my twitter followers. Below are some of their replies. I thought it worth sticking them here because it's hard sometimes for everyone to see all the interesting responses. It's also worth checking out the wiki entry which is full of good examples of songs with interesting rhythms and metres.

One of the most striking examples was Tool's Lateralus which uses the Fibonacci Series via @SalisburyHill Reminded me of my post on fibs

Here are some of the replies I had from twitter:

Jon Saunders ‏@fygaro146 the Birdie Song is based on fractals. However hard you listen it remains just as annoying as it was before.
Paul O'Hagan ‏@pmohagan Golden Brown by Stranglers has that extra beat in the instrumental. Think it goes 6/8 to 7/8 v. effective
MaST@EdgeHill ‏@EdgeHill_MaST @RobertSmyth Golden Brown by Stranglers is in 13/4 time
Richard Hopkins ‏@dadhopdog Golden Brown by the Stranglers is in 3 time but sticks in a 4 beat bar on the 4th bar between verses.
Julian Peace ‏@JulianPeace1 As mentioned, Lateralus by Tool varies from 9/8 - 8/8 - 7/8. 987 being the 16th Fibonaci number.
Julian Peace ‏@JulianPeace1 Lateralus by Tool is worth looking at. It's all rather clever...
Paul Firth ‏@TedInCanada Check out the information online about tool, particularly the album lateralus. fibonnaci rhythms! Tool's Lateralus uses Fibonacci Series via @SalisburyHill@msmirandasawyer Check out …and …
Damian Armitage ‏@iAxiom78 All You Need is Love, by the Beatles swap between 3/4 and 4/4. Some think it's 7/8 but its not
Damian Armitage ‏@iAxiom78 Excuse my language but "Bastard" by Ben Folds mixes it up; 3/2, 3/4, 4/4, 5/4, 6/4 & 7/4.
Stuart ‏@20Hotels Jeff Buckley’s “So Real” moves from 4/4 to 6/8 to 2/4 in space of a few bars. Quite unnerving. Cream “White Room” opens 5/4
Brett Callacher ‏@bcbluesy Jacobs Ladder by Rush alternates 5/4 6/4 and 6/8 7/8. Results in a really ominous feel.
Brett Callacher ‏@bcbluesy also intro: this song was originally done in 1968 but we are going to do it 4/4 so you can clap along.
Geoff Smith ‏@GeoffBath "Strawberry Fields Forever" is all over the shop.
Robert Smyth ‏@RobertSmyth two faves: tessellate by Alt J, and Dodecahedron by Beth Jeans Houghton
Michael Sheen ‏@SheenNotHeard And the overture to Class's Akhnaten uses the same phrase but in 1/4 notes, then 16th notes, then 32 notes
Michael Sheen ‏@SheenNotHeard More popularly, Kashmir by Led Zep: the riff is 3/4 or 6/8, and the drums 4/4. Black Dog is similar.
Michael Sheen ‏@SheenNotHeard Math rock and metal acts like Meshuggah will play a riff in 17/8 etc over a 4/4 drum so the accent shifts
Eddie Rumkee ‏@eddrumkee Penguin Cafe Orchestra's Perpetuum Mobile has 15 beat phrases.
Mike Pitt ‏@mhpitt Serenade by Derek Bourgeois. Cuts from 11/8 (3323) to 13/8 and 7/8 etc. Wedding march for his wife... …
Mike Pitt ‏@mhpitt I assume you've got Brubeck on the list...
Leighton Pritchard ‏@widdowquinn Not time sig, but 'phasing' may also be of interest: e.g. … and …
EP ‏@Phonosexual Conlon Nancarrow even experimented with using irrational and even transcendental musical proportions!
EP ‏@Phonosexual Blackened, by Metallica also goes through a range of time signatures.
EP ‏@Phonosexual Soft Machine also play a lot with time signatures. And Debussy allegedly used measures the length of Fionacci numbers.
EP ‏@Phonosexual Lobachevsky, by Tom Lehrer! Frank Zappa's Little House I Used To Live In also has am interesting time sig.
Tariq Desai ‏@tariqDesai Also, interesting thing about the Gorillaz song is the 20-beat phrasing; 20 being LCM of 5 and 4.
Tariq Desai ‏@tariqDesai Pink Floyd's Money is interesting: 7/4 over melody but 4/4 over the guitar solo; illusion of speeding up.
Tariq Desai ‏@tariqDesai Outkast's Hey Ya features a queer combination of 4/4 and 2/4 bars.
RespectMyCrest ‏@RespectMyCrest @msmirandasawyer money changes sigs as Gilmore couldn't do a solo in original sig, unlike the saxophonist
Dave Brown ‏@youldave
David Gower ‏@Gowerly Skimbleshanks (from cats) starts in 13/8 and Gershwin's Chichester Psalms changes time whenever it wants
hooperdave ‏@hooperdave Wikipedia claims Meheeco by Sky is 8/8 and 7/8. I'm sure they've done one in 3/4 and 4/4 or arguably 15/4
Jon Dickenson ‏@Newtonfrisky Didn't 'Money' by Pink Floyd do 7/8 or 7/4 with 4/4 or something? It does sound a bit odd?!
Peter Jeal ‏@redziller … Second part (from ~ 7mins) 4s & 3s classic Edgar Froese
Si Prentice ‏@Mr_fermion Under a Glass Moon by Dream Theater, it's all over the show.
John Wilson ‏@JohnWilson14 Try Radiohead's Pyramid Song - 7/8 time or something? - But you mean songs that interchange time sigs?
Laura Fearn ‏@oulaura Some sections of Radiohead's Paranoid Android are in 7/8 timing in contrast to the general 4/4
Steve Skipper ‏@SteveSkipper Nine Inch Nails March of the Pigs … plus @trent_reznor had an interest in maths
Stephen J Henstridge ‏@HenstridgeSJ I think "Money" (Pink Floyd) used a combination of 7/4 & 4/4
Alabaster Crippens ‏@AlabasterC Outkast's Hey ya is probably the biggest pop hit of recent years to be so off kilter.
Alabaster Crippens ‏@AlabasterC Blue Rondo alla Turk, 15 Steps, Money, Hey Ya!, two differently time signatured versions of Morning Bell.
davidjwbailey ‏@davidjwbailey so many: for starters Foo fighters have intros in 7/4, and Genesis messed about with rhythm endlessly
Helen Ferguson ‏@HelenFerguson5 love plus one by Haircut 100. What's the total?
Jane Bromley ‏@jmbromley I like "New Math" composed and sung by Tom Lehrer.
Chris Marshall ‏@oxbow_lakes American Pi: apparently it's 4
Helen Ferguson ‏@HelenFerguson5 Senses Working Overtime by XTC. All together now 1, 2, 3, 4, 5 etc
Mark Fletcher ‏@mdfletcher I am the Walrus: I = he as you = he therefore you = me and we are all together
FrankH ‏@2FrankH Mathematic by Cherry Ghost
Jim Spinner ‏@Vim_Fuego I believe when Queen recorded We Will Rock You @DrBrianMay used delay times that were prime numbers on the intro.
Raymond Vander Metal ‏@MetalJudge Obvious - Karma Police "arrest this man he talks in maths" Radiohead
Matt Foster ‏@matt_j_foster Quasimoto - Microphone Mathematics (which samples De La Soul) or The Pointer Sisters - Pinball Number Count
andy hilton ‏@iamandyhilton The amazing Kate Bush and Pi
Johnny Daukes ‏@jdaukes Violent Femmes 'Add it up...'
Richard Hopkins ‏@dadhopdog I've always loved the five beat rhythm of Take Five or the seven beat rhythm of Sabine-Gould's Gabriel song
Alfred Walker ‏@donawalf Bobby Darin's multiplication.
Dz3k0 ‏@JamesDafydd Calculus rhapsody on youtube.
Jerry Roche ‏@JerryRoche no. 6 on this article might be what you're looking for: … #biglink
david kelner ‏@davidkelner The album A Grounding In Numbers by Van Der Graaf Generator has a track called 5533 among other mathematical delights
Jenny Jacoby ‏@pixiecake obviously, three is the magic number. Even with the sums as lyrics I don't remember the three times table.
Cheesy winner Bruno Mars U can count on me like 1 2 3 I'll be there. And I can count on u like 4 3 2 U'll be there
Michael Seaton ‏@mikeo_s Tom Lehrer's New Math and Lovachevsky - arithmetic method vs. results and mathematical plagiarism. :)
Malcolm Chalmers ‏@UrsaMal Jonathan Coulton - Mandelbrot Set. Contains a (slightly adapted) version of the entire formula.
Phil Marsh ‏@Hey_Marshy anything by Joy Division
Justified Left ‏@justified_left Big Audio Dynamite: E=mc2 …
Paul O'Hagan ‏@pmohagan 2 4 6 8 Motorway. (2 times table for the keen eyed).
Lorna ‏@LornaRedpath Inchworm with Danny Kaye - maths isn't just for the classroom! …
Joel Tibbitts ‏@TibbittsJoel It has to be Three is the magic number by Bob Dorough.Kate Bush's song Pi about pi is also good.
sam wollaston ‏@samwollaston Hit Me With Your Logarithm Stick by Ian Dury #bbcradio6 #MathsMusic
Robert Smyth ‏@RobertSmyth The whole Bjork's Biophilia album. One is 17/4.
Louise Brown ‏@LouiseBrown definitely @applesinstereo. Robert did a whole episode of Relatively Prime on it @Samuel_Hansen
James Fowkes ‏@fowkc check out Klein four "finite simple group of order two" …
Norman Dunbar ‏@NormanDunbar One and One is One by Medicine Head? I think they got it wrong!
Oliver Prior ‏@InfraredPanda Most time signature changes in a song for some ~(relaxing) Sunday listening: …

Monday, 15 October 2012

Queen given dominion in hyperspace

An Oxford University mathematician will give Her Majesty The Queen an unusual Diamond Jubilee gift: her very own piece of mathematical infinite dimensional hyperspace. Professor Marcus du Sautoy of Oxford University’s Mathematical Institute has named a new symmetrical object he has discovered ‘The Diamond Jubilee Group’ in Her Majesty’s honour. However, The Queen won’t be able to take a stroll around her new mathematical domain as this symmetrical object exists beyond our three-dimensional universe. Instead, she will receive a framed certificate from Professor du Sautoy describing in mathematical language the contours of her strange new dominion. The contours of this new shape encode three important numbers: 1952, the year of The Queen’s accession to the throne, 2012, and 60 (the years she has reigned). The Queen’s new symmetrical object is one of a seam of such shapes that du Sautoy has uncovered in hyperspace. He has decided to allow members of the public to name some of the other new shapes in a drive to involve the public in the fundamental research that is done in Oxford. In exchange for a donation to an educational charity that du Sautoy supports he will allow the donor to name one of these as yet unidentified symmetrical objects floating in hyperspace. Visit to name your own symmetrical object. ‘Unlike bell towers, ocean liners and Olympic Parks this creation will stand the test of time because mathematical discoveries last forever,’ Professor du Sautoy said: ‘I hope this initiative will give the public a chance not only to get involved in mathematics but also to join The Queen in hyperspace to celebrate her Diamond Jubilee.’ Symmetry is one of the most important concepts in science and underpins many parts of the natural world. Diamond gets its strength from the symmetry of the arrangement of Carbon atoms. The symmetry of a flower is key to attracting bees. Even the particles we’re hunting for in the Large Hadron Collider in CERN are discovered because underlying symmetries tell us where to look. So the discovery of a new symmetrical object always has the potential for exciting new revelations. Naming mathematical shapes has a long history: The fives symmetrical shapes that make good dice are named after Plato: the Platonic solids. Symmetrical shapes like the classic football made from hexagons and pentagons are named after Archimedes: the Archimedean solids. But a strange symmetrical shape with more symmetries than there are atoms in the sun that lives in 196883 dimensional space, discovered in the 1970s, was so daunting it was named ‘The Monster’. Oxford University has a very strong research team exploring the world of symmetry. Professor du Sautoy’s new symmetrical object forges a link with one of the great mysterious in mathematics: solving equations called elliptic curves. Ever since the Ancient Greeks, mathematicians have been trying to find solutions to different equations. Fermat’s Last Theorem, solved by Oxford mathematician Andrew Wiles, proved that equations that generalize Pythagoras’s famous equation do not have solutions. Elliptic curves are the next great challenge. Reported on in The Times , the BBC Website , BBC TV , Wired Magazine

Monday, 11 June 2012

Maths on Stage: The Dramatic Life of Numbers

A packed tent for double maths at 10 on a Saturday morning at the Hay Festival was a very gratifying sight as I came on stage for the first of three events I did at the Hay Festival this year. And the stage was the right place to be discussing the exciting fusion of maths and theatre that has emerged over the last few years. I was exploring my collaboration with Complicite on their award-winning show A Disappearing Number and a new show that I am devising and acting in with actress Victoria Gould. This new show is in some sense a baby of A Disappearing Number as it is growing out of many of the themes we explored while developing the play Complicite did on the extraordinary collaboration between Hardy and Ramanujan. We will be giving people a sneak preview of our work in progress on this new piece at Latitude Festival this year when we perform Act 1.

In my event at Hay I wanted to show the audience why the world of mathematics and theatre are actually much closer than you might imagine. On the spur of the moment I decided to use my event to create our own little bit of mathematical theatre at Hay. I wasn't sure whether it was going to work but in the end it was surprisingly effective. A lot of the theatre games that Complicite use to devise their theatre depend on setting up very simple rules that allow the actors just to concentrate on reacting to their fellow actors. Being given the freedom of the stage and being asked to improvise something can quickly lead to a creative freeze. Simple theatre games often allow something unexpected to emerge that no one could plan.

We started with an exercise that I think can look magical. 20 members of the audience came up on stage. I asked each person to silently choose two others on the stage. When I said "go" they had to move to try to create an equilateral triangle with the two people they'd chosen. (The person and the two they've chosen must be an equal distance from each other). Of course the two people you've chosen are unlikely to have chosen you so a strange dance starts to emerge on stage. As the audience members still in their chairs watched on they observed an extraordinary crowd ebbing a flowing on stage, something that would have been impossible to choreograph without the simple mathematical rule. It was chaos in action...and it was very funny to watch. Three girls did end up choosing each other and very quickly stabilised as a still triangle in the chaos. As the scene developed the others began to get close to stability. A stillness across the group seemed to emerge but then one person moved very slightly, obviously trying to get their equilateral triangle perfect. That caused other triangles to become unequal and more people began to adjust. Very soon manic chaos had flooded the stage again.

The second exercise I did was one that actually appeared in the production of A Disappearing Number. I got 5 volunteers from the audience. They came on stage and immediately formed a group of 3 on one side of the stage and 2 on the other. This is called a "partition of 5". The exercise was to find how many different ways there are to partition the 5 people, how many different groupings were there? The members in each of the groups doesn't matter. It's how many there are in each group that is important. When I said "go" 1 member of the group of 3 peeled off. Suddenly we had 2+2+1. One of the couples separated. We had 2+1+1+1. 3 partitions of 5 people had already been found. But then the one that broke off went to join one of the other actors on their own. We'd returned to 2+2+1. It was a different arrangement of people but the same pattern as the second partition. Gradually they went through the other partitions. 3+1+1, a single group of 5 people. Then suddenly one broke off. We had a group of 4 and one actor on his own. You could feel his sense of loneliness, rejection by the group, the strength of the group of 4 staring at him. We'd got 6 partitions. I said that there was one they'd missed. They thought for a while. And then suddenly all separated into individuals on the stage. 5 groups of 1. 1+1+1+1+1. The exercise had discovered all 7 different ways of partitioning 5 actors. But in the process they'd created a poignant piece of theatre. Partition Numbers are a sequence of numbers that Hardy and Ramanujan had great success investigating. If you have a 100 actors how many ways are there to partition them? Hardy and Ramanujan discovered a formula for telling you.

While working on A Disappearing Number I did a number of workshops with Complicite for Drama and Maths teachers. The Drama teachers of course all want to come to a Complicite workshop but maths teachers are a little more reluctant about doing some physical theatre workshops. So we made it a condition that the drama teacher from a school could only come if they also bought a maths teacher with them. Apparently this was the first time many of them had talked to each other in the school common room. As the teachers gathered at the beginning of the session it was quite easy to spot who were the maths teachers and who were the drama teachers. Half of them were waving their arms around, shaking their legs, rolling their shoulders, warming up for a physical workout. The other half were in a corner looking rather shyly at their shoes. However it didn't take long to get everyone buzzing. The maths teachers came into their own and felt more confident as we took them all off on a journey to explore why one infinity might be bigger than another. The Complicite website has a work-pack that was developed out of the workshops which teachers and others might enjoy.

I might add some more to this post but got to rush down to the National Theatre to do some maths with the cast of A Curious Incident of the Dog In The Time. More maths on stage!

Monday, 28 May 2012

Dara O'Briain's School of Hard Sums

I am co-hosting a mad comedy maths game show with Dara O'Briain on the TV channel Dave.

I was away filming for another series last week when an episode was aired that required some calculus. I got lots of tweets and emails about the problem so thought it worth just explaining how you solve it. It's got some great maths in it.

Problem: A lifeguard at the beach spots a swimmer in distress in the water. They need to run across the sand to the water and then swim out to rescue the swimmer. But what is the fastest path to take? If he can run twice as fast as he can swim, should he run as far as possible to swim the shortest distance possible? Or should he take a shorter path even if it involves more swimming? Here are the dimensions of the beach and locations of the lifeguard and swimmer.

Lets suppose the lifeguard's running speed is v1 and swimming speed is v2. The task is to find x which will minimise the time taken to travel along D1 and D2. The time taken is exactly T=D1/v1+D2/v2.

We note that v1=2*v2. Since v1 is a constant instead of minimising T we minimise v1*T i.e. v1*T=D1 +2D2. Now by Pythagoras D1=√(x2+22) and D2=√((75-x)2+252). To minimise v1*T we differentiate the right hand side with respect to x and set this derivative to zero. We solve for x and this gives us the critical value for x. Explicitly, once the maths is done we compute that x=60.58m. This you can get by Newton approximation method.

There is also a cute physical way you could use to solve this puzzle. Once you realise that you are having to minimise D1+2*D2 you can then take a piece of string which you run from the red spot round the yellow spot and then back to the point where the string crosses the dividing line. You then drag this point on the dividing line along the line and see where the string length is smallest. At x=60.58 you’ll get a point where suddenly you need more string to move in either direction.

When you set the differential to 0 and expand it then they will get a quartic polynomial. If you want to find the exact value (rather than an approximate value) then you are going to need to know how to find roots of a quartic! Also there are 4 solutions. Two are complex but there is another real solution at 89.43. This corresponds in the equation to taking different roots of the square root.

At school you learn about a formula for solving quadratic equations. There is also an extraordinary formula for solving quartic equations discovered by Italian mathematician Ferrari. Details are here. Feeding in the coefficients of our quartic gives the exact solution in the following form:

Glorious...if you like that kind of thing.

Why do we need to do quadratic equations at school? The problem Dara had to solve is an example where a problem of trying to find the optimal solution reduces to solving an equation. This one has x raised to the power 4 which we call a quartic. In school we learn how to solve a quadratic equation using a bit of algebra

Solving quadratic equations is something we do every time you catch a ball. If someone throws, kicks or hits a ball and you want to work out where to stand to catch it then the trajectory is described by a quadratic equation and solving it tells us where to stand. So Wayne Rooney is actually solving quadratic equations in his head every time he works out where to stand in the box to volley a ball in the back of the net.

This skill is very important in warfare too. If you want to hit a target then again you need to solve a quadratic equation to be able to decide the angle to fire the missile at.

We have been solving quadratic equations for millennia. The method we use dates back to ancient Babylon. The mathematicians of Babylon found a cunning way to solve these equations. They were interested in quadratic equations because they also describe areas of land.

But already in the tablets of ancient Babylon you can see people solving these equations not for practical reasons but for the fun of it. A quadratic equation is a bit like a cryptic crossword that hides the solution in some encrypted equation. Your challenge is to undo that cryptic description to reveal the answer to the puzzle.

The problem of finding a formula for solving cubics (things with x to the power 3) was one of the big challenges of the sixteenth century. Mathematical duelling was a public sport and great crowds would gather to watch mathematicians jousting with each other. Mathematicians would offer a cubic equation up and declare “solve that!” Tartaglia was an Italian mathematician who discovered the secret to solving these equations and made a lot of money in this public mathematical jousts. But he was tempted into revealing his secret to Cardano in exchange for the promise of future support. But Cardano betrayed his trust and told his student Ferrari who then saw how to generalize it to solving the quartic equation (x to the power 4 like in our problem). They published and poor Tartaglia lost the credit!

The problem of solving quintic equations (x to the power 5) turned out to be impossible with a simple formula and began the study of group theory which seeks to understand the world of symmetry.

You can find lots about this story in my book Finding Moonshine.

In order to find the value of x for which the time travelled is minimal we used the calculus. The calculus discovered by Newton and Leibniz is an extremely powerful tool for finding the optimal solution to practical problems. This idea of the power of the calculus to home in on the most efficient solutions to problems is one of the reasons it is a central tool in all modern science. It is used to do this day across the industrial and financial world. Investors use it to maximize profits. Engineers exploit it to minimize energy use. Designers apply it to optimize construction. It has now become one of the lynchpins of our modern technological world.

The calculus tries to make sense of what at first sight looks like a meaningless sum: what is zero divided by zero. Such a sum is what you are faced with calculating if you try to understand the instantaneous speed of an accelerating object. Take the famous apple that legend has it fell from the tree onto the young Newton’s head in the garden at Woolsthorpe and inspired his theory of gravity. The speed of the apple is constantly increasing as gravity pulls the apple to the ground. So how can you calculate what the speed is at any given instance of time. For example after one second how fast is the apple falling? Speed is distance travelled divided by time elapsed. So I could record the distance it drops in the next second and that would give me an average speed over that period. But I want the precise speed. Well I could record the distance travelled over a shorter period of time, say ½ a second or ¼ of a second. The smaller the interval of time the more accurately I will be calculating the speed. But ultimately to get the precise speed I want to take an interval of time that is infinitesimally small. But then I am faced with calculating 0 divided by 0. The invention of Newton’s calculus made sense of this calculation. He understood how to calculate what the speed was tending towards as you made the time interval smaller and smaller. It was a revolutionary new language that managed to capture a changing dynamic world. The geometry of the ancient Greeks was perfect for a static frozen picture of the world. But Newton’s mathematical breakthrough was the language that could describe a moving world. Mathematics had gone from describing a frozen still life to capturing a dynamic moving image. In our case we are trying to understand the behaviour of the distance D(1)+2D(2) as the distance x changes. If you draw a graph of this you get a curved graph. The calculus helps you to find the point where this graph reaches its minimum.

Work has been done by Timothy J. Pennings (Associate Professor of Mathematics at Hope College in Holland, Michigan) that suggests dogs are very good at finding such optimal solutions. See here and here Of course the dog isn’t really doing calculus (in the same way Wayne Rooney isn’t really solving quadratic equations) but it illustrates and important point that evolution has wired our brains to be good intuitive mathematicians. Those who can do maths survived. But it is by externalizing this maths that we can solve problems that defy our intuition.

The optimal path lifeguard is also the one light would choose if it travelled twice as fast in air as in water. In actual fact light travels only 1.33 times faster in air than in water so its path would be slightly different. However, this bending of the light waves (called refraction) produces many strange phenomena, such as making a straight pencil seem bent when it is put in water. Total internal reflection can be observed while swimming, if one opens one's eyes just under the water's surface. If the water is calm, its surface appears mirror-like. Another very common example of total internal reflection is a critically cut diamond. This is what gives it maximum sparkle.

The science behind this principle is known as Snell’s law. Snell's law states that the ratio of the sines of the angles of incidence and refraction is equivalent to the ratio of phase velocities in the two media. Using Snell’s law you can create total internal reflection. This occurs when, instead of light travelling from one substance to the next, the light reflects. This is a crucial physical phenomenon that allows us to use optical fibres. The light enters the plastic, and travels until it hits one of the walls. However, when it hits the wall, it is reflected instead of travelling through the clear plastic.