Saturday, November 29, 2014

MY FAVORITE TAKEAWAY

We come to the end of the semester, and it seems like the time to share the pinnacle of the knowledge I will take away from this experience: THE TRIGONOMETRIC CIRCLE!!!  I have always been a visual learner, and to see the interconnectedness of all the principal trig functions as they relate to a unit circle was, well, like oxygen to a flame.  Suddenly it all made sense, and all I could think was, "Man, if I had been shown this in high school, I wouldn't be struggling so much with this now!"  And now I would like to share it with the world!
 
Okay, enough hyperbole.  Now let's explain how it works.  But first, let's start with the basics, the relationship of sine and cosine.  Take a look at this graphic:
 
This shows how sine and cosine cycle between 1 and -1 as we travel around the unit circle.  As the point on the perimeter travels towards the x-axis, sine approaches 0 and cosine approaches 1 or -1.  As the point approaches the y-axis, sine approaches 1 or -1 and cosine approaches 0.  It is from this basic relationship that all the other trig relationships are derived.

First, there's tangent, which is sine/cosine.  So, as sine approaches 1 or -1 and cosine approaches 0, tangent approaches positive or negative infinity, but it is undefined when cosine equals 0.  Conversely, as sine approaches 0 and cosine approaches 1 or -1, tangent approaches a value of 0. 

Second, there's cotangent, which is 1/tangent, or cosine/sine.  This means when sine is getting smaller and smaller, cotangent approaches positive or negative infinity, and it approaches 0 as cosine approaches 0.

Thirdly, there is cosecant, which is 1/sine.  We can see from the values of sine that cosecant can never be smaller than 1 or -1, and it stretches towards infinity as sine closes in on that zero value.

Fourthly, there is secant, which is 1/cosine.  Again, secant is never less than 1 or -1, and it, too, goes on to infinity as cosine approaches 0.

So, what do all of these six (!) functions look like on the unit circle?  See below:



Play around with the circle for a spell, especially in the first quadrant.  What do you notice?  As expected from our first graphic, sine and cosine oscillate between 1 and 0 and -1, depending on which axis we are approaching.  But it is the other four derived trig functions that are really interesting to observe here.  As the pink point moves closer and closer to the x-axis, sine approaches 0 and cosine approaches 1.  Take a look at the green tangent line; it approaches a length of zero as well, which is to be expected when we recall that tangent is sine/cosine.  Cotangent, aka tangent's inverse, heads towards infinite length, a likewise unsurprising result.  Secant, derived from cosine, heads towards its minimum value of 1, and cosecant, derived from sine, heads towards an infinite length.
Now, move the pink point to where the angle centered at the origin is 45 degrees, or as close as the graphic will allow (I have been unable to get closer than 45.04 degrees).  Notice the marvelous square symmetry of it all.  Sine is equal to cosine, secant is equal to cosecant, and tangent is equal to cotangent.  Again, all of this makes perfect sense when we recall how each function is derived, but now we can see that similarity in visual form. 
Finally, start moving the pink point towards (0,1).  Notice sine approaches 1, cosine approaches 0, tangent moves towards infinite length, cotangent towards zero, secant is likewise approaching infinity, and cosecant is heading towards a value of 1. 
The truly exciting aspect of this graphic for me is how simple it is to derive other trig identities by using a little Pythagorean algebra.  For example, sine and cosine are always two legs of an inscribed right triangle with a length of 1, so we can derive that sin2(a) + cos2(a) = 1.  We can also observe that tangent and the radius of the circle form the legs of a right triangle with secant as the hypotenuse, so we can now derive that sec2(a) = tan2(a) + 1.  The same process gives us csc2(a) = cot2(a) + 1.  Even if we forget the identities themselves, we can very easily figure them out if we remember visually exactly what is going on with the unit circle. 

So that's it.  My most fulfilling learning experience of the semester.  If and when I get around to teaching trigonometry, the unit circle seen here will definitely be my go-to learning device for helping students grasp the trig functions.  Hopefully I can save all my students the years of anguish and confusion I went through. 
Thanks for reading; it's been fun.  Cheers!
 

Saturday, November 15, 2014

 

THE MATHEMATICS OF "FROZEN"

(Wait, there's math in Frozen?)

 
There are probably a great many children today whose first hearing of the word "fractal" was in the song "Let It Go" from the Disney film Frozen.  Come on, you know the song... sing with me:
          "My power flurries through the air into the ground.
          "My soul is spiraling in frozen fractals all around."
But just in case you forgot which part of the song this is, here is something to help you remember...
Ahhhh, those frozen fractals!
 
 Virtually everything you see in this shot is created using fractal geometry!
 

Okay, so exactly what is fractal geometry anyway?!?

I'm so glad you asked.  To some extent, a fractal is a repeating geometric pattern that is similar to itself at every scale, meaning, it looks the same as you zoom in and zoom out.  The word was first coined by Benoit Mandelbrot in the 1970's (which makes Elsa's use of the term pretty anachronistic, ja?), and he borrowed from the Latin word "fractus", which means "broken" or "fractured".  Beyond this, there is a lot of disagreement on how exactly to define a fractal.  Right now, it seems that a fractal simply must pass the eye test: "I don't know how to define it, but I know it when I see it."  To generate a fractal, one simply needs to take a basic geometric shape or pattern or rule or even a function, then repeat it over and over in an orderly fashion at increasingly micro and macro levels.  Still confused?  Here is a basic example to help explain....
 

The Koch Curve

Here is a simple fractal known as the Koch Curve:
Does this remind you of something?
This is what is known as a fourth power fractal.  What does that mean?  It means that a simple geometric shape is generated (first power) and then repeated three more times (fourth power), creating a geometric pattern of ever increasing complexity.  Still confused?  Let's look at the first power fractal of the curve:
 
The green line in this picture represents the basic shape used to generate the Koch curve, and since this is the first use of the shape, this is a first power fractal.  To generate the second power curve, simply repeat the pattern on each of the four green line segments, like this:
 

The lavender line is the second power fractal.  The picture above shows the second power fractal overlain on the first power one so you can see how the fractal scales down as it becomes more complicated.  We have gone from one large peak to four smaller ones.  The picture below shows the second power fractal by itself so we can see how with each repetition we are approaching the final shape created by the fourth power fractal:
Repeat this process again to get the third power fractal, like this:
Again, the third power fractal, shown by the purple line, overlays the second power fractal, and we have 16 even smaller peaks now.  Here is the third power fractal by itself:
 
One more repetition of the pattern gives us our final, fourth power fractal!  Put six of these fourth power fractals together, and you get something like this:
Eureka!  We have our snowflake!!
Looking at how much this very simple artificial snowflake begins to resemble the real thing, the utility of fractal geometry in a movie like Frozen becomes clear.  It is, in fact, no accident that this fractal resembles something from nature, for indeed fractals were first created to try and explain and explore the complicated designs of the natural world.  The fledgling computer animation industry of the late 1970's and early 1980's saw the usefulness of this type of geometry immediately.
 

Math versus Nature

The problem facing the first computer animators was finding a shortcut to create a simple digital landscape that emulates all the nooks and crannies and seeming randomness and complexity of a real landscape.  So, they turned to fractals.  Take a look at the following picture:
 
This is a fractal rendering to model the surface of a mountain, and one can easily see that as the power of the fractal increases, its approximation of a real mountain gets better and better.  The problem for early computer animators was that as the power of their fractals increased, it took longer for the computers to complete the calculations, known as renderings. In fact, rendering times increased exponentially as the powers of the fractals increased.  This was a severely limiting factor for the animators.  Some of the early results, while quite arresting at the time, seem positively quaint by today's supercomputer standards (as a side note, when Pixar was created in 1986, its primary purpose was to create animations to show off the computing power of Apple computers!).  Here is an early example from the 1985 film Young Sherlock Holmes:
This was the first example of a computer generated character in film.  The stained glass figure of a knight is able to come down from his window and walk around.  Because the character was made up of large, simple geometric shapes, the computers of the day were able to render the character in a reasonable amount of time.  In hindsight, he looks pretty dorky, but it was a start.  For another, perhaps better example, we turn to the 1982 film Star Trek 2: The Wrath of Khan.  Take a look at the following video:
Also Spock Zerathustra!  The spreading fire and the resulting mountain landscape were all rendered using fractals.  The geometry of the mountain ranges, while being a reasonable approximation for the real thing, is still pretty obvious.  However, as computing power has increased, so has the delicate complexity of CGI rendering, making it harder to tell truth from fiction.  Let's take a look at a few more examples:
 One of these ferns is the real thing, the other is a fractal.  Okay, so it isn't too difficult to tell which is which, but the fractal fern is a 20th power fractal and is more complex than anything in the Star Trek video.  Now we begin to see how more powerful computers allows for better approximations of nature's complexity. 
 

 Final thoughts

So, the next time you watch Frozen, keep a watchful eye for the fractals at play in creating the vaguely Norwegian world.  Chances are you won't notice most of them.  Some examples are easy to spot, like this:
The frost and the snowflake are created using fractal geometry.  How about this:
Elsa's ice palace is pretty obviously fractally generated.   And another:
Perhaps this one is not immediately obvious.  Fractals are also used to help simulate complex patterns of movement of large numbers of individual objects, like the snow particles in the picture above.  Fractals, fractals everywhere!!!
 
I will bet that from now on you will take more notice of the tremendous amounts of math that go into creating animated movies, but chances are most kids will not, and, at least until the movie is over, you might want to consider keeping it that way!!!  Cheers.
 
 
 
 
 


Tuesday, November 4, 2014

THE TROUBLE WITH RULES, or "WHAT DOES ZERO TO THE ZERO POWER EQUAL?"


So, what is your answer?  A number of you, I am sure, said "one", and I am sure some of you said "zero".  Maybe even a few of you said "undefined".  The truth is, there is no consensus to the answer on this.  The best answer one can give is, "well, it depends on your point of view", but more on that later.

First off, I wanted to do an informal, non-scientific poll to see what people think zero to the zero equals, so naturally I asked all my facebook friends to sound off.  The results went like this:

ONE                                                             ZERO                                                  UNDEFINED
   7                                                                    2                                                                1

These were the only sure answers.  There were some less certain responses.  What I found most telling, though, was the explanations for why people chose as they did.  Here are some of the choicest quotes......
  • "It has to be 1 or you break math (italics are mine).  If it were not one you couldn't solve binomials or other exponential equations".
  • "1-ish".
  • "A very tough question!  Still calculating.  One maybe or maybe not.  I'll get back to you (ed.: she still hasn't gotten back to me...)".
  • "Anything raised to the power of zero is one.  In order of operations, exponents come first."
  • "So the general consensus with my math colleagues is that one is the answer, but you aren't wrong if you say 'undefined' (ed.: this is from a friend of mine who is a high school math teacher, and she polled her school's math department on my behalf.)".
  • "I have to chime in with one".
  • "Gosh, I thought it was zero".
  • "I think it's zero (ed.: this was from the math teacher at Forest Hills Central High whose class I have been observing the last few months)".
Quite a bit of disagreement, even amongst those that agree, no?  Here's where I think the problem occurs.  In the study of exponents, we are given two different rules.  They are as follows:

1.     
 
   2.
So, which rule applies?  Which do we follow?  There is a third way to think of this problem:


 
 With this equation we can now take the limit as x approaches zero, which looks like this:
 

 
 
To truly understand what is going on here, let's look at a graph of all three functions:
In the graph above, the purple line at the bottom is, the green line at the top is, and the red line is the graph of .  The purple and green lines are destined never to meet as they doggedly head towards their expected values of zero and one respectively, but the red line shows us something interesting.  As x gets closer and closer to zero, the graph gets closer and closer to 1!  So, clearly it equals 1, right?
 
Not so fast.  Why does something to the zero power equal one anyway?  The standard explanation goes something like this:
 

We can also solve using another rule of exponents, the sum of powers rule, like so:
And here is where the trouble really starts; try replacing 3 with 0 and we get this:
 
 
We have long been told you cannot divide by zero, so now we are desperately stuck in a hopeless paradox brought about by a dastardly construction of contradictions! And I feel the real trouble is not the rules themselves, it is how they are presented to us.
 

THE REAL TROUBLE


All our lives, math has been presented to us in a very concrete fashion, with a seemingly overwhelming amount of rules to follow that, if implemented correctly, govern all mathematical problems that ever were, are, or will be, created by the likes of Leibnitz, Newton, Euler, Pythagoras, etc.  These great mathematicians are not to be questioned or doubted.  Our teachers teach us these rules as if they are absolute and unwavering, so when they fail us, we are left scratching our heads and (perhaps) questioning the meaning of life.  It turns out that math isn't so concrete, that sometimes the rules fail, and there are still vast stores of discoveries still to be made.  Students need to know that math is fluid, dynamic, expansive, and revealing more and more of its secrets to us even today. 
 
I truly feel the four most powerful words a teacher can say when asked a question are "what do you think".  This response opens up the possibility for personal discovery by the asker, not imposition by the asked.  So, if and when my students ever get around to asking me "what does zero to the zero equal", I am definitely going to respond with "what do you think?"  Because sometimes, as we have seen here, the lack of a definitive answer is really the worthier discovery.  Cheers!