## 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.