## Math Topics

### Trigonometry Yoga

Which is bigger, the sine of 40$$^{\circ}$$ or the sine of 50$$^{\circ}$$?

This is a great trigonometry assessment question.   Unfortunately, virtually none of my college students who haven’t used trig for a while can answer it (without a calculator).   For a lot of students, trig is one of those subjects that just didn’t stick very well.

So, we start trig functions all over, but this time with circle definitions and some “trigonometry yoga” (no trademark; I made up the name when I was thinking of a title for this post).

### $$k^x-x^k$$ Slider and $$x^y=y^x$$ graph

Use the slider to change the value of k, and to see dynamically how the graph of $$h(x)=k^x-x^k$$ changes. Negative values have $$x^k>k^x$$. Which value of k gives a graph that is never negative? Why?

Here is a very pretty graph of $$x^y=y^x$$ with areas where $$x^y < y^x$$ shaded in green and areas where $$x^y > y^x$$ shaded in purple.

I am working on an article about some problems related to these equations, including The Biggest Product Problem. There’s a lot of interesting stuff here!

### The Tangent is a Tangent!

In my post Trigonometry Yoga, I discussed how defining sine and cosine as lengths of segments in a unit circle helps develop intuition for these functions.

I learned the circle definitions of sine and cosine in my junior year of high school, in the class that would now be called pre-calculus (it was called “Trig Senior Math”). Two years earlier, I’d learned the triangle definitions of sine, cosine, and tangent in geometry class. I don’t remember any of my teachers ever mentioning a circle definition of the tangent function.

The geometric definition of the tangent function, which predates the triangle definition, is the length of a segment tangent to the unit circle. The tangent really is a tangent! Just as for sine and cosine, this one-variable definition helps develop intuition. Here is the definition, followed by an applet to help you get a feel for it:

### Random Cool Math Thing #2

Pythagorean Card Table

### Pick a Number Between 0 and 1 — with Fractions!

This applet is a pick a number game, where the secret number is a fraction between 0 and 1. Enter a numerator and denominator and the computer will tell you if your fraction is too high or too low, until you guess the Secret Fraction and win.

Your previous high and low guesses are listed on the page (unless you hide the list), and there is a number line that graphs the guesses. You can change the number of divisions in the number line; the labels update automatically.

The game has several levels. Level 1 uses only fractions with denominators 2, 4, and 8, whereas Level 6 uses denominators from 2 to 16.

The applet doesn’t fit well on the page with my website theme, so you can open a new window and try it here. (Note: if you don’t see a fraction in the pink box, go to the bottom of the page and choose, “View as Java Applet,” which is what I wrote this applet as.  It does not seem to have converted correctly to HTML 5).

This applet was the most challenging to write of all the GeoGebra applets I’ve written to date — I wasn’t sure it was possible to create this game using GeoGebra, so it was quite satisfying when it came together. Here were some of the tricky parts (you can download my original file here):

### Random Cool Math Thing #3

Odd Perfect Squares

### Real Life Fraction Problems

It’s hard to make sense of multiplication and division of fractions.   Before fractions, multiplication can almost always be seen as repeated addition, and the answer is never smaller than both the numbers you started with.   Division is usually sharing, and the number of cookies each child gets is always smaller than the total number of cookies (unless someone is selfishly dividing by 1 and not sharing with any of her friends).

### Farey Fraction Visual Patterns

The Farey Sequence, $$F_{n}$$ is the list of all simplified fractions between $$\dfrac{0}{1}$$ and $$\dfrac{1}{1}$$ with denominator less than or equal to $$n$$. For example,

$$\large F_{5}=\dfrac{0}{1},\dfrac{1}{5},\dfrac{1}{4},\dfrac{1}{3},\dfrac{2}{5},\dfrac{1}{2},\dfrac{3}{5},\dfrac{2}{3},\dfrac{3}{4},\dfrac{4}{5},\dfrac{1}{1}$$

### Constructive Criticism of Khan Academy’s 1st Video on Fractions

The video below is my entry into the MTT2 contest, where people are making commentary videos on videos from the Khan Academy (KA). This contest began when John Golden and David Coffey posted their “Mystery Teacher Theater 2000” video, where they provided running commentary on a KA video on arithmetic with integers. Their video was quite sarcastic, and many people criticized it for not being constructive. I aimed for constructive in my video, but I think the effect of John and David’s video was also quite constructive, as it’s opened up more space for dialogue (some productive, some less so) than a less provocative video (like mine) is likely to do. Read more >>

### Polyhedral Waltz

Here is a new video Polyhedral Waltz.  I made the animation, and Maurice Page composed the music.   The video shows how Platonic Solids (regular polyhedra) inscribed in the same sphere fit together. If you click on the “cc” button on the player, you can see captions which show the name(s) of what you’re looking at (black with white background looks better than the default).

I’ve always liked polyhedra and been especially fascinated by the compounds, where several of the same Platonic solids intersect in symmetrical and pleasing ways:

Compounds of Five Cubes, Five Octahedra, and Five Tetrahedra

Physical models of the compounds are hard to build — I made a model of the compound of five cubes from a kit and a less sturdy model of the tetrahedra from origami — but mostly I’ve seen them in museums and in flat pictures in books. I was amazed when I found out from the Geometricks books by Bonnie Roskes that it isn’t that hard to create a compound in Google (now Trimble) Sketchup; after some preliminaries, one “rotate-copy” command can turn one cube into the above compound of five cubes.

I was curious how different polyhedra that are the “same size,” meaning they can be inscribed in the same sphere, intersect. I knew, for example, that  cubes fit inside a dodecahedron,

One cube and Five Cubes in a Clear Dodecahedron

but what about octahedra? I knew they peeked out from the sides of the cubes,

Cube and Octahedron, 5 cubes and 5 Octahedra

but did they also peek out from the dodecahedron?  Turns out they do.

Five Octahedra and Dodecahedron (Clear and Opaque)

I wanted to build all the Platonic Solids centered at the origin, with the same radius (of the circumscribed sphere) and then show and hide different combinations. I knew the results would have a lot of symmetry, and thus were likely to be pretty. Here are a few of my favorite combinations:

Blue = Icosahedron, Red = Five Cubes, Yellow = Five Octahedra

The model is in the Sketchup Warehouse (search for dborkovitz).   A lot is lost in seeing the static pictures; it’s more fun to rotate, hide, and show polyhedra yourself.

Two mathematically interesting issues came up in making the video. The first involved the tetrahedra. Two different tetrahedra can be inscribed in a cube. They are dual to each other, and together are called the stella octangula.

Stella Octangula

Since there are five different cubes that can be inscribed in the dodecahedron, and two different tetrahedra that can be inscribed in each cube, there are ten tetrahedra that can be inscribed in the dodecahedron.   The tetrahedra form two different compounds of five tetrahedra, whose intersection is the compound of ten tetrahedra.

Two Different Compounds of Five Tetrahedra and Their Intersection

To make the model on the right, I “exploded” the intersection and repainted it by hand.  When I first let Sketchup intersect the model itself,  the model flickered back and forth between triangles in the two shades of purple, creating a headache inducing disco ball effect during the animation.  The circled “pentagon” below shows one of the areas where the flickering happened.

The Circled Area Flickered Between Colors

For quite a while I was convinced that the problem was either with Sketchup itself or with my inexperience in using Sketchup. Finally I asked for help on a Sketchucation forum,  and I found that what was happening was a common issue in 3D modeling called “z fighting:” Sketchup couldn’t decide which color to paint the areas, because I was telling it to paint the same planes two different colors.

The issue was mathematical, not technical — the dark purple areas are common to both sets of tetrahedra.   In retrospect, I see that my doubts about my Sketchup abilities muddled some basic mathematical thinking  — there are five planes in the circled region, and it looked like they “should” alternate between the two colors, but five is an odd number, so such alternation is impossible.

To avoid the flicker, I painted the intersecting areas a darker color; here is what the region looks like by itself.

Intersection of the Two Sets of Five Tetrahedra

(I am relying on the accuracy of Sketchup and of my model to claim that this is what the intersection looks like. )

The second mathematically interesting issue was deciding how to rotate the model in the animation.  At the end of each scene the polyhedra in that scene are in a different place than they were at the beginning, so if I wanted to introduce a new polyhedron in the next scene, I had to first rotate it into position.  I could have avoided the problem by using 360 degree rotations, but then the video would have either been too long or too fast. I decided that 90 degree rotations showed the features of the polyhedra well, and these rotations were also simple to do in Sketchup, as they used the built-in axes.

A sequence of six 90 degree rotations about the axes in the order green-red-blue-green-red-blue brings everything back to the start — this is the equivalent of rotating a cube twice about an axis through the midpoints of opposite edges.   I represented each rotation as a permutation of the four long diagonals of the cube, and worked things out algebraically.

I made the video in sets of six rotations.  For each scene change within a set,  I rotated all the polyhedra that appeared in any of the six scenes and then hid the polyhedra that weren’t in the next scene. This procedure was more efficient than rotating everything for every scene and then hiding most of the polyhedra (the model includes twenty-seven layers, where the visibility of each layer has to be checked or unchecked).

## Some Technical Details:

I used the Keyframe Animation plugin, which was the only software I paid for in making the animation. Originally I used the built in Sketchup animation, which only animates the camera. With such symmetrical figures, keeping the figure still and rotating the camera looks like rotating the figure itself, so the native animation could have worked, but it was jerky and things kept getting shifted in ways I didn’t want. The keyframe animation gave me more control.   I also am planning to make some videos that show the polyhedra growing and shrinking, and the built in animation can’t do that.

I made all the 83 scenes in one sketch, which was too big to export without crashing my laptop, so I broke that sketch into six smaller files. I exported each file into a set of 1280 x 720 png files. I had seen on many forums that putting together stills made higher quality animation than exporting to an avi file directly from Sketchup, which did seem to be the case. I used FastStone Photo Resizer to rename the files so they were numbered correctly.

I used VirtualDub to make the stills into a video, with the XVid compression algorithm and running at 30 frames per second. It took a while to figure out how to get the individual parts of the video to fit together correctly, and I made some mistakes and had to run some patches. One big mistake was leaving VirtualDub open while I was running FastStone to add in 30 frames. FastStone kept the old file for the frame that was open and then after that every 30 frames had the wrong file. Fortunately the mistake was near the end of the video, so I could fix it by hand (there were over 12,000 image files, so I worked with the originals rather than keeping backups, which would have taken a long time to copy).

Initially I was unhappy with the visual quality of the video on YouTube — the video looks much better on my computer and on DropBox than on YouTube. I asked for help on Sketchucation, and got some suggestions, but they didn’t help that much. I asked Tessil Collins, who teaches video courses at my college, and he pretty much said that the video looked great for YouTube, so I mostly stopped worrying about the quality. The video looks much better with the lighter colors; the sides of the blue icosahedron are not as distinct, but I liked the blue enough to keep it.

I made the subtitles with Aegisub, which was straightforward to use. I made a style that looked nice on my computer, but then found that YouTube gives the user control over the font, color, and size of the subtitles, which makes sense for how subtitles are regularly used. I liked the idea of being able to turn the captions on and off, and didn’t want to embed them in the video directly, so I also stopped worrying about getting them to look as I preferred. With the names as captions rather than embedded in the video, they can also be more easily translated into other languages.

I made the introductory frames and credits using illustration software (I have Xara, but there are free alternatives) and used VirtualDub to copy the frames and export to an avi, and then to string together the pieces.

I showed an earlier draft of the video to my Fall 2012 Math 245: Geometry class, and they suggested some color changes, which I adopted. They also encouraged me to pursue including music with the video.

I asked Maurice Page, who also teaches math at my college, and who is involved in many musical pursuits, if he’d be interested in composing music for the video. He was cautious, saying that we’d probably need four or five iterations to get something we both liked, but I loved the first thing he sent me — which somehow was both not at all what I was expecting and also more-or-less perfect. I think the music makes the animation several orders of magnitude better. Maurice used imovie to put the score and animation together on his computer, and then later sent me an MP3 with just the music, which I added to the video using VirtualDub.

We debuted the music video at a math faculty meeting a few weeks ago, and the others there came up with the title; my working title, “Platonic Solids Inscribed in the Same Sphere,” was not very catchy.

Almost all the technical things I used in making this video were new to me — I learned to use Keyframe Animation, VirtualDub, FastStone, and Aegisub. I had tried to make the Sketchup model several years ago, but I couldn’t get it to be accurate enough, and enough time had passed that I needed to redo all the tutorials on how to make the polyhedra.

The video took a lot longer than I’d hoped (sigh, how often do we say this?) but I am very pleased with the result, and sometimes a bit amazed that I learned how to make a video like this.