Tuesday, January 29, 2013

Functions

A common term in mathematics is "function".  (Which tends to be displayed like f(x), which is to say the function of the variable "x".)  What is this?

A function is merely a way of explaining how two different numbers relate to each other, in mathematical form.

For instance, if we say y  = f(x), all that we're saying is that some mysterious value (y) can change.  And it changes in accordance with some other number that also changes (called x in this case).

For instance, we might say that distance in a car varies with time.  So distance (d) is a function of t (time).  So d = f(t). If we know that we're going at a constant speed, we might write d = s*t (or distance = speed times time).  Our description as to how this varies is a function.

Some of the time, something measurable might vary by more than *one* variable.  (i.e. if you hit a billiard ball, it's location might vary both by *when* you hit it, how hard you hit it, *and* the location you hit it in.  So we might get something like d = f(t, angle, force)

Pretty much anything you can express in numerical form can have a function attached to it.  Which is really handy for figuring out how things work. (i.e. where a ball goes when you hit it, how plants grow, how chemical reactions work, etc.)

Friday, January 25, 2013

Achilles and the Tortoise

Although most of us think of Isaac Newton (or maybe Leibnitz) as founding calculus, the Ancient Greeks were actually working on it well ahead of them.

 There were a lot of questions that they sort of - but not quite - knew the answers to, that are answered by the basic calculus functions, the integral and the derivative.

 One of these questions was "how much area is there under a line"? (Answer, the integral of the line's function.) The other was, what happens when you divide something into tiny little pieces.

 The answer to the second is the derivative, and it comes with a fun story parodied by Lewis Carroll.

 The original version goes something like this. Achilles is the fastest runner out of all the Greeks, so he runs very fast. A tortoise runs very slowly. They want to race, but intend to make it fair. So Achilles starts say, a mile from the finish line. The tortoise gets a head start and starts half a mile away. They start running and Achilles goes *twice* as fast as the tortoise. Who wins? Well...we can divide the race like this. Half way through the race, Achilles is at the half way point. But by now, the tortoise is 3/4 of the way through. Divide that in half again and we get...3/4 and 7/8. And again and again, in smaller and smaller chunks until Achilles is *nearly*, but not quite, caught up.

 So neither finish the race, and Achilles doesn't win, right? We all know that this is a silly answer from observing the world around us. (And the whole point of this story was to prove that math is ridiculous.) We intuitively think that the two tie - but how do we prove this? We do it using either algebra (which the ancient Greeks didn't know existed), or we use calculus.

 We'll solve this for algebra later. But the way we do it in calculus is that we keep dividing these lengths into tinier and tinier amounts, and notice that each time we do this, we get a number closer to 1 for both runners. So close, in fact, that eventually they both *equal* one, at the time the race ends (at the time it takes for them to race).

So there's a tie. A derivative, in fact, is nothing more than the comparison of one number going to zero at the same time another is doing the same thing. (Although we can also check this out going towards infinity - calculus is pretty awesome in this way. Very versatile.)

 Distance over time (or velocity) is the classic derivative example, because it's intuitive to us. We know that distance/time = speed. (And are very familiar with the concept of miles per hour thanks to driving.) We also know that change in speed over time = acceleration (i.e. "my car can go zero to 60 in 60 seconds" - this would be an acceleration of one mile per hour per minute - or a second derivative - a second derivative is just the derivative of a first derivative). 

You can even use derivatives for non-speed related measurements. How does temperature change over time? (i.e. how fast can you heat a room?) How does water empty into a bucket? (Does it do it at a perfectly constant rate, or does it speed up and slow down?) These are all very useful questions to be able to answer for certain applications. And calculus gives us a method of solving them without having to actually test the applications thousands of times.

 And it all started with a silly question about tortoises racing heroes.